forked from github/dataease
Merge pull request #1459 from dataease/pr@dev@fix_仪表板死循环
fix: 老版本过滤组件导致死循环
This commit is contained in:
commit
f6ab7f870e
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user