From d578a81b7489cc79236b77d202c864d5525affcf Mon Sep 17 00:00:00 2001 From: alex_q <914269@qq.com> Date: Thu, 10 Sep 2026 01:39:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20pnpm=20run=20builde=20?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/types/wangeditor.d.ts | 5 +++++ src/views/account/notes/statement.vue | 2 +- src/views/system/config/index.vue | 13 +++++++------ src/views/system/dict/index.vue | 13 +++++++------ src/views/system/log/index.vue | 5 +++-- src/views/system/menu/index.vue | 13 +++++++------ src/views/website/audition/draw.vue | 2 +- src/views/website/statement/notes.vue | 2 +- src/views/website/styles/index.vue | 10 +++++----- vite.config.ts | 5 +++++ 11 files changed, 43 insertions(+), 28 deletions(-) create mode 100644 src/types/wangeditor.d.ts diff --git a/package.json b/package.json index 75009f9..bf4f2bf 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "axios": "^1.7.8", "color": "^4.2.3", "element-plus": "^2.9.0", + "exceljs": "^4.4.0", "nprogress": "^0.2.0", "path-browserify": "^1.0.1", "path-to-regexp": "^8.2.0", diff --git a/src/types/wangeditor.d.ts b/src/types/wangeditor.d.ts new file mode 100644 index 0000000..30e4164 --- /dev/null +++ b/src/types/wangeditor.d.ts @@ -0,0 +1,5 @@ +declare module "@wangeditor/editor-for-vue" { + import type { Component } from "vue"; + export const Editor: Component; + export const Toolbar: Component; +} diff --git a/src/views/account/notes/statement.vue b/src/views/account/notes/statement.vue index 1d75e07..7e25fbc 100644 --- a/src/views/account/notes/statement.vue +++ b/src/views/account/notes/statement.vue @@ -62,7 +62,7 @@ - {{ formatComment(scope.row) }} + {{ formatComment(scope.row as IntegralPageUserVO) }} diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index d5daf75..1a9431a 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -178,9 +178,10 @@ import ConfigAPI, { ConfigForm, ConfigPageQuery, } from "@/api/config"; +import type { FormInstance } from "element-plus"; -const queryFormRef = ref(ElForm); -const dataFormRef = ref(ElForm); +const queryFormRef = ref(); +const dataFormRef = ref(); const loading = ref(false); const ids = ref([]); @@ -235,7 +236,7 @@ function handleQuery() { } /** 重置系统配置查询 */ function handleResetQuery() { - queryFormRef.value.resetFields(); + queryFormRef.value!.resetFields(); queryParams.pageNum = 1; handleQuery(); } @@ -268,7 +269,7 @@ function handleRefreshCache() { /** 提交系统配置表单 */ function handleSubmit() { - dataFormRef.value.validate((valid: any) => { + dataFormRef.value!.validate((valid: any) => { if (valid) { loading.value = true; const id = formData.id; @@ -296,8 +297,8 @@ function handleSubmit() { /** 关闭系统配置弹窗 */ function handleCloseDialog() { dialog.visible = false; - dataFormRef.value.resetFields(); - dataFormRef.value.clearValidate(); + dataFormRef.value!.resetFields(); + dataFormRef.value!.clearValidate(); formData.id != undefined; } diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 60d3225..c1c40d0 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -222,9 +222,10 @@ defineOptions({ }); import DictAPI, { DictPageQuery, DictPageVO, DictForm } from "@/api/dict"; +import type { FormInstance } from "element-plus"; -const queryFormRef = ref(ElForm); -const dataFormRef = ref(ElForm); +const queryFormRef = ref(); +const dataFormRef = ref(); const loading = ref(false); const ids = ref([]); @@ -275,7 +276,7 @@ function handleQuery() { // 重置查询 function handleResetClick() { - queryFormRef.value.resetFields(); + queryFormRef.value!.resetFields(); queryParams.pageNum = 1; handleQuery(); } @@ -306,7 +307,7 @@ function handleEditClick(id: number, name: string) { // 提交字典表单 function handleSubmitClick() { - dataFormRef.value.validate((isValid: boolean) => { + dataFormRef.value!.validate((isValid: boolean) => { if (isValid) { loading.value = true; const id = formData.id; @@ -335,8 +336,8 @@ function handleSubmitClick() { function handleCloseDialog() { dialog.visible = false; - dataFormRef.value.resetFields(); - dataFormRef.value.clearValidate(); + dataFormRef.value!.resetFields(); + dataFormRef.value!.clearValidate(); formData.id = undefined; formData.dictItems = []; diff --git a/src/views/system/log/index.vue b/src/views/system/log/index.vue index d234135..c6ca139 100644 --- a/src/views/system/log/index.vue +++ b/src/views/system/log/index.vue @@ -81,8 +81,9 @@ defineOptions({ }); import LogAPI, { LogPageVO, LogPageQuery } from "@/api/log"; +import type { FormInstance } from "element-plus"; -const queryFormRef = ref(ElForm); +const queryFormRef = ref(); const loading = ref(false); const total = ref(0); @@ -111,7 +112,7 @@ function handleQuery() { } /** 重置查询 */ function handleResetQuery() { - queryFormRef.value.resetFields(); + queryFormRef.value!.resetFields(); queryParams.pageNum = 1; queryParams.createTime = undefined; handleQuery(); diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 7c9aedb..fe39692 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -454,9 +454,10 @@ defineOptions({ import MenuAPI, { MenuQuery, MenuForm, MenuVO } from "@/api/menu"; import { MenuTypeEnum } from "@/enums/MenuTypeEnum"; +import type { FormInstance } from "element-plus"; -const queryFormRef = ref(ElForm); -const menuFormRef = ref(ElForm); +const queryFormRef = ref(); +const menuFormRef = ref(); const loading = ref(false); const dialog = reactive({ @@ -514,7 +515,7 @@ function handleQuery() { // 重置查询 function handleResetQuery() { - queryFormRef.value.resetFields(); + queryFormRef.value!.resetFields(); handleQuery(); } @@ -569,7 +570,7 @@ function handleMenuTypeChange() { /** 菜单保存提交 */ function submitForm() { - menuFormRef.value.validate((isValid: boolean) => { + menuFormRef.value!.validate((isValid: boolean) => { if (isValid) { const menuId = formData.value.id; if (menuId) { @@ -621,8 +622,8 @@ function handleDelete(menuId: number) { // 关闭弹窗 function handleCloseDialog() { dialog.visible = false; - menuFormRef.value.resetFields(); - menuFormRef.value.clearValidate(); + menuFormRef.value!.resetFields(); + menuFormRef.value!.clearValidate(); formData.value.id = undefined; } diff --git a/src/views/website/audition/draw.vue b/src/views/website/audition/draw.vue index 7218093..94be477 100644 --- a/src/views/website/audition/draw.vue +++ b/src/views/website/audition/draw.vue @@ -36,7 +36,7 @@ 转账 - + 驳回 diff --git a/src/views/website/statement/notes.vue b/src/views/website/statement/notes.vue index 8778873..e980677 100644 --- a/src/views/website/statement/notes.vue +++ b/src/views/website/statement/notes.vue @@ -71,7 +71,7 @@ - {{ formatComment(scope.row) }} + {{ formatComment(scope.row as IntegralPageAdminVO) }} diff --git a/src/views/website/styles/index.vue b/src/views/website/styles/index.vue index c3128ab..2e5e850 100644 --- a/src/views/website/styles/index.vue +++ b/src/views/website/styles/index.vue @@ -101,23 +101,23 @@ - + 定价 - + 上线 - + 下线 - + {{ "取消推荐" }} - + {{ "设为推荐" }} diff --git a/vite.config.ts b/vite.config.ts index db8e897..b56b8df 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -210,6 +210,11 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { }, }, rollupOptions: { + onwarn(warning, warn) { + // 忽略 @vueuse/core 依赖中 #__PURE__ 注释位置导致的无效注释警告(仅移除注释,无行为影响) + if (warning.code === "INVALID_ANNOTATION") return; + warn(warning); + }, output: { manualChunks: { vue: ["vue", "vue-router", "pinia"],