Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangjiahao 2021-12-28 18:45:16 +08:00
commit 398d40520c
2 changed files with 6 additions and 4 deletions

View File

@ -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: {

View File

@ -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>