fix: 🐛 修复先渲染多图上传,再更改绑定数据时,多图不展示的问题

修复先渲染多图上传,再更改绑定数据时,多图不展示的问题
This commit is contained in:
theo
2026-04-14 11:36:45 +08:00
parent d17c4abfbf
commit 81b5f94c54

View File

@@ -213,5 +213,12 @@ const handlePreviewClose = () => {
onMounted(() => {
fileList.value = modelValue.value.map((url) => ({ url }) as UploadUserFile);
});
watch(
() => modelValue.value,
(newVal) => {
fileList.value = newVal.map((url) => ({ url }) as UploadUserFile);
}
);
</script>
<style lang="scss" scoped></style>