Commit a5f08359 by Mr. Lan

fix bug.

parent 8dfa3606
......@@ -300,8 +300,7 @@ export default {
// label width
if (this.widget.options.labelWidthDisabled) {
this.widgetLabelWidth = this.widget.options.labelWidth
} else if (this.widget.type==='divider' ||
(this.widget.type==='text' && this.widget.options.textLabelStatus===false)) {
} else if (this.widget.type==='divider') {
this.widgetLabelWidth = 0
} else {
this.widgetLabelWidth = this.data.config.labelWidth
......
......@@ -23,7 +23,7 @@
:label="$t('fm.config.widget.labelWidth')"
>
<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>
<!-- 兰玉磊结束添加 -->
......
......@@ -258,6 +258,11 @@ export default {
},
'element.options.labelWidthDisabled': function (val) {
this.setLabelWidth(val)
},
'dataConfig.config.labelWidth': function (val) {
if (!this.element.options.labelWidthDisabled && this.element.type!=='divider') {
this.elementLabelWidth = val
}
}
},
mounted() {
......@@ -270,7 +275,7 @@ export default {
}
if (status) {
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
} 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