|
@@ -17,12 +17,13 @@
|
|
:class="{
|
|
:class="{
|
|
'bg-[#c8ceda33]': state.show,
|
|
'bg-[#c8ceda33]': state.show,
|
|
}"
|
|
}"
|
|
|
|
+ :title="value?.length > 0 ? value.map((v) => v.name).join(',') : ''"
|
|
>
|
|
>
|
|
<SvgIcon name="tag" size="14" class="mr-1" />
|
|
<SvgIcon name="tag" size="14" class="mr-1" />
|
|
<span class="max-w-[5rem]" v-title>{{
|
|
<span class="max-w-[5rem]" v-title>{{
|
|
value?.length > 0
|
|
value?.length > 0
|
|
? value
|
|
? value
|
|
- .map((v) => DictionaryStore.knowledgeTags.map.get(v) || v)
|
|
|
|
|
|
+ .map((v) => DictionaryStore.knowledgeTags.map.get(v.id))
|
|
.join(',')
|
|
.join(',')
|
|
: '添加标签'
|
|
: '添加标签'
|
|
}}</span>
|
|
}}</span>
|
|
@@ -184,7 +185,6 @@ const DictionaryStore = useDictionaryStore()
|
|
const DialogStore = useDialogStore()
|
|
const DialogStore = useDialogStore()
|
|
const emit = defineEmits(['onChange'])
|
|
const emit = defineEmits(['onChange'])
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
- options: { default: <any>[] },
|
|
|
|
value: { default: '' },
|
|
value: { default: '' },
|
|
popoverWidth: { default: 0 },
|
|
popoverWidth: { default: 0 },
|
|
})
|
|
})
|
|
@@ -291,7 +291,7 @@ watch(
|
|
const map = new Map()
|
|
const map = new Map()
|
|
if (n) {
|
|
if (n) {
|
|
n?.forEach((v) => {
|
|
n?.forEach((v) => {
|
|
- map.set(v, v)
|
|
|
|
|
|
+ map.set(v.id, v.id)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
state.valueMap = map
|
|
state.valueMap = map
|