From 6f2b32391f00f6dbe4fc7dd1b1bdb47ab8c5a68f Mon Sep 17 00:00:00 2001 From: xiaogang <825201136@qq.com> Date: Thu, 11 Jul 2024 10:09:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A5=B6=E8=8C=B6=E9=A6=96?= =?UTF-8?q?=E9=A1=B5provide/inject=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- delete.js | 2 +- src/pages/ycnc/components/product-item.vue | 5 ++--- src/pages/ycnc/index.vue | 7 ++++--- vite.config.js | 2 -- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/delete.js b/delete.js index c52a5a1..0464ff0 100644 --- a/delete.js +++ b/delete.js @@ -15,7 +15,7 @@ function vitePluginRemoveDir(options = {}) { const distDir = path.resolve(process.cwd(), 'dist'); // 构建结束后执行的逻辑 for(const item of dirName){ - const fullPath = path.join(distDir, ['production','test'].includes(process.env.NODE_ENV) ? 'build' : 'dev',process.env.UNI_PLATFORM,`static/${item}`); // 构造要删除的目录的完整路径 + const fullPath = path.join(distDir, ['production'].includes(process.env.NODE_ENV) ? 'build' : 'dev',process.env.UNI_PLATFORM,`static/${item}`); // 构造要删除的目录的完整路径 console.log('fullPath',fullPath); // 尝试删除目录 try { diff --git a/src/pages/ycnc/components/product-item.vue b/src/pages/ycnc/components/product-item.vue index 0cd0cef..b7858cc 100644 --- a/src/pages/ycnc/components/product-item.vue +++ b/src/pages/ycnc/components/product-item.vue @@ -25,8 +25,7 @@