Merge pull request #6619 from dataease/pr@dev@feat_filter_required
feat: 过滤器设置为必填选项
This commit is contained in:
commit
46a4c07b1c
@ -226,7 +226,11 @@ export default {
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
'values': function(val, old) {
|
||||
if (!this.inDraw) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
'viewIds': function(value, old) {
|
||||
if (typeof value === 'undefined' || value === old) return
|
||||
this.setCondition()
|
||||
|
||||
@ -66,6 +66,11 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'value': function(val, old) {
|
||||
if (!this.inDraw) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
'viewIds': function(value, old) {
|
||||
if (typeof value === 'undefined' || value === old) return
|
||||
this.setCondition()
|
||||
|
||||
@ -105,6 +105,16 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.min': function(val, old) {
|
||||
if (!this.inDraw) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
'form.max': function(val, old) {
|
||||
if (!this.inDraw) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
'viewIds': function(value, old) {
|
||||
if (typeof value === 'undefined' || value === old) return
|
||||
this.setCondition()
|
||||
|
||||
@ -148,6 +148,11 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'value': function(val, old) {
|
||||
if (!this.inDraw) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
'viewIds': function(value, old) {
|
||||
if (typeof value === 'undefined' || value === old) return
|
||||
this.setCondition()
|
||||
|
||||
@ -122,6 +122,11 @@ export default {
|
||||
},
|
||||
|
||||
watch: {
|
||||
'value': function(val, old) {
|
||||
if (!this.inDraw) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
'viewIds': function(value, old) {
|
||||
if (typeof value === 'undefined' || value === old) return
|
||||
this.setCondition()
|
||||
|
||||
@ -477,7 +477,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
widgetValChange(val) {
|
||||
this.widgetValue = val
|
||||
if (val === null) {
|
||||
this.widgetValue = null
|
||||
return
|
||||
}
|
||||
this.widgetValue = val.toString()
|
||||
},
|
||||
requiredChange(val) {
|
||||
this.required = val
|
||||
|
||||
@ -138,6 +138,7 @@
|
||||
:style="element.style"
|
||||
:element="element"
|
||||
:in-draw="false"
|
||||
@widget-value-changed="widgetValChanged"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@ -195,11 +196,26 @@ export default {
|
||||
return 2
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'dval': function(val, old) {
|
||||
if (this.element.options.attrs.default.isDynamic) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setDval()
|
||||
},
|
||||
methods: {
|
||||
widgetValChanged(val) {
|
||||
if (!this.element.options.attrs.default.isDynamic) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
dynamicChange(value) {
|
||||
if (!value) {
|
||||
this.$emit('widget-value-changed', this.element.options.value)
|
||||
}
|
||||
this.setDval()
|
||||
},
|
||||
dkeyChange(value) {
|
||||
|
||||
@ -275,6 +275,7 @@
|
||||
:element="element"
|
||||
class="relative-time"
|
||||
:in-draw="false"
|
||||
@widget-value-changed="widgetValChanged"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@ -334,12 +335,27 @@ export default {
|
||||
return result
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'dval': function(val, old) {
|
||||
if (this.element.options.attrs.default.isDynamic) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fillEmptySuffixTime()
|
||||
this.setDval()
|
||||
},
|
||||
methods: {
|
||||
widgetValChanged(val) {
|
||||
if (!this.element.options.attrs.default.isDynamic) {
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
dynamicChange(value) {
|
||||
if (!value) {
|
||||
this.$emit('widget-value-changed', this.element.options.value)
|
||||
}
|
||||
this.setDval()
|
||||
},
|
||||
dkeyChange(value) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user