diff --git a/components/xtUpload.vue b/components/xtUpload.vue index 33e178b..ef1e4c5 100644 --- a/components/xtUpload.vue +++ b/components/xtUpload.vue @@ -24,7 +24,7 @@ const emit = defineEmits(["update:modelValue", "update:obj"]); const props = defineProps({ xtype: { type: String, default: "path" }, // path 或 id - modelValue: { type: [Array, String], default: undefined }, + modelValue: { type: [Array, String], default: "pending" }, obj: { type: Object, default: () => ({}) }, accept: { type: String, default: '' }, countMax: { type: Number, default: 1 }, @@ -44,18 +44,14 @@ const action = `${config.baseUrl}/file/` const inited = ref(false) onMounted(() => { - disabled.value = true checkPropsUntilReady() }) const checkPropsUntilReady = () => { if (inited.value) return - if (props.modelValue !== undefined) { + if (props.modelValue !== "pending") { initFileList() - if (props.disabled == false) { - disabled.value = false - } inited.value = true return }