Unverified 提交 6f9eb29c authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw 提交者: GitHub

Merge pull request #1544 from dataease/pr@dev@fix_preview_filter_valid

fix: 仪表板预览过滤条件失效
......@@ -236,7 +236,8 @@ export default {
'nowPanelJumpInfo',
'publicLinkStatus',
'previewCanvasScale',
'mobileLayoutStatus'
'mobileLayoutStatus',
'componentData'
])
},
......@@ -309,7 +310,8 @@ export default {
created() {
this.refId = uuid.v1
if (this.element && this.element.propValue && this.element.propValue.viewId) {
this.getData(this.element.propValue.viewId, false)
const hasFilter = this.componentData.filter(item => item.type === 'custom').some(item => item.options.value)
hasFilter || this.getData(this.element.propValue.viewId, false)
}
},
methods: {
......
......@@ -17,13 +17,13 @@
{{ $t('commons.all') }}</el-checkbox>
<el-checkbox-group v-model="value" @change="handleCheckedChange">
<el-checkbox v-for="item in datas" :key="item.id" :label="item.id">{{ item.id }}</el-checkbox>
<el-checkbox v-for="item in datas.filter(node => node.id && node.id.includes(keyWord))" :key="item.id" :label="item.id">{{ item.id }}</el-checkbox>
</el-checkbox-group>
</div>
<div v-else class="radio-group-container">
<el-radio-group v-model="value" @change="changeRadioBox">
<el-radio v-for="(item, index) in datas" :key="index" :label="item.id" @click.native.prevent="testChange(item)">
<el-radio v-for="(item, index) in datas.filter(node => node.id && node.id.includes(keyWord))" :key="index" :label="item.id" @click.native.prevent="testChange(item)">
<span>{{ item.id }}</span>
</el-radio>
</el-radio-group>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论