fix: 下拉列表逻辑
This commit is contained in:
parent
fcbe38d040
commit
5701437698
@ -17,13 +17,13 @@
|
||||
{{ $t('commons.all') }}</el-checkbox>
|
||||
|
||||
<el-checkbox-group v-model="value" @change="handleCheckedChange">
|
||||
<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 v-for="item in datas.filter(node => !keyWord || (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.filter(node => node.id && node.id.includes(keyWord))" :key="index" :label="item.id" @click.native.prevent="testChange(item)">
|
||||
<el-radio v-for="(item, index) in datas.filter(node => !keyWord || (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>
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<script>
|
||||
import { multFieldValues, linkMultFieldValues } from '@/api/dataset/dataset'
|
||||
import {getLinkToken, getToken} from "@/utils/auth";
|
||||
import { getLinkToken, getToken } from '@/utils/auth'
|
||||
export default {
|
||||
|
||||
props: {
|
||||
@ -123,10 +123,10 @@ export default {
|
||||
},
|
||||
'element.options.attrs.multiple': function(value, old) {
|
||||
if (typeof old === 'undefined' || value === old) return
|
||||
if (!this.inDraw) {
|
||||
// if (!this.inDraw) {
|
||||
this.value = value ? [] : null
|
||||
this.element.options.value = ''
|
||||
}
|
||||
// }
|
||||
|
||||
this.show = false
|
||||
this.$nextTick(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user