wupengfei
5 天以前 925aa1b75bb7611b42309e726a555b8fa5fe9929
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();
                  },