From 538f0972c19b96af2ee361c6af4fc86c41127171 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期三, 13 八月 2025 14:43:09 +0800 Subject: [PATCH] feat: 接口对接 --- packages/components/src/Input/ChooseInputWithAreaPicker.vue | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/components/src/Input/ChooseInputWithAreaPicker.vue b/packages/components/src/Input/ChooseInputWithAreaPicker.vue index 62b687f..502a62c 100644 --- a/packages/components/src/Input/ChooseInputWithAreaPicker.vue +++ b/packages/components/src/Input/ChooseInputWithAreaPicker.vue @@ -18,7 +18,7 @@ type Props = { fieldNames?: object; columns: API.AreaTreeNode[]; - modelValue: Array<string | number>; + modelValue: Array<string>; title?: string; }; @@ -30,12 +30,11 @@ children: 'children', }), }); -const inputValue = computed(() => - props.modelValue.map((x) => findAreaNameFromCode(Number(x))).join(',') -); +console.log('props: ', props); +const inputValue = computed(() => props.modelValue.map((x) => findAreaNameFromCode(x)).join(',')); const emit = defineEmits<{ - (e: 'update:modelValue', val: Array<string | number>): void; + (e: 'update:modelValue', val: Array<string>): void; }>(); function handleOpen() { @@ -63,7 +62,7 @@ onConfirm: ({ selectedValue, selectedOptions }) => { emit( 'update:modelValue', - selectedOptions.map((x) => x.areaCode) + selectedOptions.filter(Boolean).map((x) => x.areaCode) ); onClose(); }, -- Gitblit v1.9.1