|
@@ -83,7 +83,7 @@ const {
|
|
|
|
|
|
// 定义组件的 Props
|
|
|
interface Props {
|
|
|
- modelValue: string
|
|
|
+ modelValue: { [key: string]: string }
|
|
|
title?: string
|
|
|
readonly?: boolean
|
|
|
}
|
|
@@ -103,15 +103,15 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
})
|
|
|
const emit = defineEmits<{
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
- (e: 'update:modelValue', value: string): void
|
|
|
+ (e: 'update:modelValue', value: { [key: string]: string }): void
|
|
|
}>()
|
|
|
|
|
|
const origin = computed<{ [key: string]: string }>({
|
|
|
get() {
|
|
|
- return JSON.parse(props.modelValue ?? '{}')
|
|
|
+ return props.modelValue ?? '{}'
|
|
|
},
|
|
|
set(value) {
|
|
|
- emit('update:modelValue', JSON.stringify(value ?? {}))
|
|
|
+ emit('update:modelValue', value)
|
|
|
},
|
|
|
})
|
|
|
|
|
@@ -232,8 +232,8 @@ const flowForms = asyncComputed<{ label: string; value: string; meta?: FlowField
|
|
|
return [...flow_model_cate.value, ...form]
|
|
|
})
|
|
|
|
|
|
-watch(currentSelectCate, (newListSelectCate) => {
|
|
|
- if (newListSelectCate === undefined) return
|
|
|
+watch(currentSelectCate, (newListSelectCate: string) => {
|
|
|
+ if (newListSelectCate === undefined || newListSelectCate === '') return
|
|
|
selectCate(100, newListSelectCate)
|
|
|
})
|
|
|
|