fix: 老版本过滤组件导致死循环

This commit is contained in:
fit2cloud-chenyw 2021-12-17 11:05:20 +08:00
parent 7b2e42877f
commit 5217a52c5b
3 changed files with 15 additions and 3 deletions

View File

@ -47,10 +47,14 @@ export default {
defaultoptions() {
if (!this.element || !this.element.options || !this.element.options.attrs.default) return ''
return JSON.stringify(this.element.options.attrs.default)
},
defaultValueStr() {
if (!this.element || !this.element.options || !this.element.options.value) return ''
return this.element.options.value.toString()
}
},
watch: {
'element.options.value': function(value, old) {
'defaultValueStr': function(value, old) {
if (this.element.serviceName === 'timeDateWidget' && this.element.options.attrs.default.isDynamic) {
//
return

View File

@ -58,11 +58,15 @@ export default {
computed: {
operator() {
return this.element.options.attrs.multiple ? 'in' : 'eq'
},
defaultValueStr() {
if (!this.element || !this.element.options || !this.element.options.value) return ''
return this.element.options.value.toString()
}
},
watch: {
'element.options.value': function(value, old) {
'defaultValueStr': function(value, old) {
if (value === old) return
this.value = this.fillValueDerfault()
this.changeValue(value)

View File

@ -71,11 +71,15 @@ export default {
computed: {
operator() {
return this.element.options.attrs.multiple ? 'in' : 'eq'
},
defaultValueStr() {
if (!this.element || !this.element.options || !this.element.options.value) return ''
return this.element.options.value.toString()
}
},
watch: {
'element.options.value': function(value, old) {
'defaultValueStr': function(value, old) {
if (value === old) return
this.value = this.fillValueDerfault()
this.changeValue(value)