Commit a5f08359 by Mr. Lan

fix bug.

parent 8dfa3606
...@@ -300,8 +300,7 @@ export default { ...@@ -300,8 +300,7 @@ export default {
// label width // label width
if (this.widget.options.labelWidthDisabled) { if (this.widget.options.labelWidthDisabled) {
this.widgetLabelWidth = this.widget.options.labelWidth this.widgetLabelWidth = this.widget.options.labelWidth
} else if (this.widget.type==='divider' || } else if (this.widget.type==='divider') {
(this.widget.type==='text' && this.widget.options.textLabelStatus===false)) {
this.widgetLabelWidth = 0 this.widgetLabelWidth = 0
} else { } else {
this.widgetLabelWidth = this.data.config.labelWidth this.widgetLabelWidth = this.data.config.labelWidth
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
:label="$t('fm.config.widget.labelWidth')" :label="$t('fm.config.widget.labelWidth')"
> >
<el-checkbox v-model="data.options.labelWidthDisabled">自定义</el-checkbox> <el-checkbox v-model="data.options.labelWidthDisabled">自定义</el-checkbox>
<el-input-number v-model="data.options.labelWidth" :min="1" :disabled="!data.options.labelWidthDisabled" /> <el-input-number v-model="data.options.labelWidth" :min="0" :step="10" :disabled="!data.options.labelWidthDisabled" />
</el-form-item> </el-form-item>
<!-- 兰玉磊结束添加 --> <!-- 兰玉磊结束添加 -->
......
...@@ -258,6 +258,11 @@ export default { ...@@ -258,6 +258,11 @@ export default {
}, },
'element.options.labelWidthDisabled': function (val) { 'element.options.labelWidthDisabled': function (val) {
this.setLabelWidth(val) this.setLabelWidth(val)
},
'dataConfig.config.labelWidth': function (val) {
if (!this.element.options.labelWidthDisabled && this.element.type!=='divider') {
this.elementLabelWidth = val
}
} }
}, },
mounted() { mounted() {
...@@ -270,7 +275,7 @@ export default { ...@@ -270,7 +275,7 @@ export default {
} }
if (status) { if (status) {
this.elementLabelWidth = this.element.options.labelWidth this.elementLabelWidth = this.element.options.labelWidth
} else if (this.element.type==='divider' || (this.element.type==='text' && element.options.textLabelStatus===false)) { } else if (this.element.type==='divider') {
this.elementLabelWidth = 0 this.elementLabelWidth = 0
} else { } else {
// 全局 // 全局
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment