轮播图字段类型判断

This commit is contained in:
weiwei committed 2025-03-05 16:18:11 +08:00
1 parent 2b9727224d
commit a0aeecd584
1 file changed
+2 -2
+2 -2
View File
@@ -47,7 +47,7 @@ const props = withDefaults(defineProps<UploadFileProps>(), {
borderRadius: "8px",
})
const imageUrls = defineModel<string>()
const imageUrls = defineModel("modelValue", { default: "" })
const imageBaseUrl = import.meta.env.VITE_IMAGE_BASE_PATH
const dialogVisible = ref(false)
@@ -162,7 +162,7 @@ const self_disabled = computed(() => {
watch(
() => imageUrls.value,
(newValue) => {
if (!newValue) {
if (!newValue || Object.prototype.toString.call(newValue) !== "[object String]") {
fileList.value = []
return
}