Merge pull request #1459 from dataease/pr@dev@fix_仪表板死循环

fix: 老版本过滤组件导致死循环
This commit is contained in:
fit2cloud-chenyw 2021-12-17 11:06:50 +08:00 committed by GitHub
commit f6ab7f870e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)