refactor: 过滤组件初始化优化,视频历史过滤组件

This commit is contained in:
wangjiahao 2021-12-30 17:14:17 +08:00
parent 4d8bb2d7d5
commit 5f31ed7ed9

View File

@ -314,7 +314,7 @@ export default {
created() {
this.refId = uuid.v1
if (this.element && this.element.propValue && this.element.propValue.viewId) {
const hasFilter = this.componentData.filter(item => item.type === 'custom').some(item => item.options.value || (item.options.attrs && item.options.attrs.default && item.options.attrs.default.isDynamic))
const hasFilter = this.componentData.filter(item => item.type === 'custom').some(item => item.options.value && !(item.options.value instanceof Object) || (item.options.attrs && item.options.attrs.default && item.options.attrs.default.isDynamic))
hasFilter || this.getData(this.element.propValue.viewId, false)
}
},