瀏覽代碼

基础信息删除图片

15591641157 2 月之前
父節點
當前提交
322213d71b
共有 1 個文件被更改,包括 4 次插入0 次删除
  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'"