Browse Source

基础信息删除图片

15591641157 2 months ago
parent
commit
322213d71b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/merchant/src/components/data-form.vue

+ 4 - 0
packages/merchant/src/components/data-form.vue

@@ -255,6 +255,10 @@ defineExpose({
   const existingUrls = modelValue[prop]?.split(',') ?? [];
   modelValue[prop] = [...existingUrls, ...newUrls].join(',');
 }"
+            :before-remove="({file,fileList,resolve}) =>{
+              resolve(true)
+              modelValue[prop] = fileList.map(({ url }) => url).join(',');
+            }"
           ></wd-upload>
           <wd-button
             v-if="type === 'Submit'"