fix: defineModel 泛型写法适配 Vue 3.5 + vue-tsc 3.x,修复 26 个 TS 编译错误
- Upload 组件 defineModel 改用泛型 defineModel<T>({ default }) 替代旧的 type + PropType 写法
- 版本号 4.8.3 → 4.8.4
This commit is contained in:
@@ -86,10 +86,7 @@ const props = defineProps({
|
||||
const previewVisible = ref(false); // 是否显示预览
|
||||
const previewImageIndex = ref(0); // 预览图片的索引
|
||||
|
||||
const modelValue = defineModel("modelValue", {
|
||||
type: [Array] as PropType<string[]>,
|
||||
default: () => [],
|
||||
});
|
||||
const modelValue = defineModel<string[]>({ default: () => [] });
|
||||
|
||||
const fileList = ref<UploadUserFile[]>([]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user