fix: 🐛 修复先渲染多图上传,再更改绑定数据时,多图不展示的问题
修复先渲染多图上传,再更改绑定数据时,多图不展示的问题
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user