Sfoglia il codice sorgente

清空按钮 若有封面模式 删除缓存内容图片

DESKTOP-2S67K1S\31396 2 anni fa
parent
commit
8936e1ead7
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      src/views/operation/recommend/detail.vue

+ 5 - 1
src/views/operation/recommend/detail.vue

@@ -441,7 +441,7 @@ export default {
     },
 
     // 清空
-    getEmpty(item) {
+    getEmpty(item, index) {
       for (const key in item) {
         if (key !== 'id') {
           item[key] = key === 'childList' ? [] : key === 'module' ? {} : ''
@@ -452,6 +452,10 @@ export default {
           delete item.forwardUrl
           delete item.contentId
         }
+        // 如果有封面模式 删除缓存的内容图片
+        if (key === 'isCustom') {
+          this.picList[index] = ''
+        }
       }
     },