diff --git a/src/Obj/Base/BatchModel/index.js b/src/Obj/Base/BatchModel/index.js index 48598bf..5e71777 100644 --- a/src/Obj/Base/BatchModel/index.js +++ b/src/Obj/Base/BatchModel/index.js @@ -38,7 +38,7 @@ class BatchModel extends Base { this.options.name = options.name || '批量模型' this.options.type = options.type || '面' this.options.url = options.url || '' - this.options.spacing = options.spacing || 50 + this.options.spacing = options.spacing * 1 || 50 this.options.positions = options.positions || [] this.options.show = (options.show || options.show === false) ? options.show : true this.callback = callback @@ -50,6 +50,10 @@ class BatchModel extends Base { let tools = new Tools(sdk) // BatchModel.computeDis(this) // if (this.options.positions.length > 0 || this.options.positions.lng) { + if (this.options.spacing < 0 || options.spacing * 1 === 0) { + tools.message({ type: 'warning', text: '请输入正确的间距!' }) + return; + } if ((options.type && options.spacing != undefined) || options.type == '点') { // BatchModel.computeDis(this)