修复 pnpm run builde 报错

This commit is contained in:
2026-09-10 01:39:18 +08:00
parent 7500d3ab56
commit d578a81b74
11 changed files with 43 additions and 28 deletions
+1
View File
@@ -52,6 +52,7 @@
"axios": "^1.7.8", "axios": "^1.7.8",
"color": "^4.2.3", "color": "^4.2.3",
"element-plus": "^2.9.0", "element-plus": "^2.9.0",
"exceljs": "^4.4.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"path-to-regexp": "^8.2.0", "path-to-regexp": "^8.2.0",
+5
View File
@@ -0,0 +1,5 @@
declare module "@wangeditor/editor-for-vue" {
import type { Component } from "vue";
export const Editor: Component;
export const Toolbar: Component;
}
+1 -1
View File
@@ -62,7 +62,7 @@
<el-table-column label="备注" align="center" prop="comment"> <el-table-column label="备注" align="center" prop="comment">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.comment"> <div v-if="scope.row.comment">
{{ formatComment(scope.row) }} {{ formatComment(scope.row as IntegralPageUserVO) }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
+7 -6
View File
@@ -178,9 +178,10 @@ import ConfigAPI, {
ConfigForm, ConfigForm,
ConfigPageQuery, ConfigPageQuery,
} from "@/api/config"; } from "@/api/config";
import type { FormInstance } from "element-plus";
const queryFormRef = ref(ElForm); const queryFormRef = ref<FormInstance>();
const dataFormRef = ref(ElForm); const dataFormRef = ref<FormInstance>();
const loading = ref(false); const loading = ref(false);
const ids = ref<number[]>([]); const ids = ref<number[]>([]);
@@ -235,7 +236,7 @@ function handleQuery() {
} }
/** 重置系统配置查询 */ /** 重置系统配置查询 */
function handleResetQuery() { function handleResetQuery() {
queryFormRef.value.resetFields(); queryFormRef.value!.resetFields();
queryParams.pageNum = 1; queryParams.pageNum = 1;
handleQuery(); handleQuery();
} }
@@ -268,7 +269,7 @@ function handleRefreshCache() {
/** 提交系统配置表单 */ /** 提交系统配置表单 */
function handleSubmit() { function handleSubmit() {
dataFormRef.value.validate((valid: any) => { dataFormRef.value!.validate((valid: any) => {
if (valid) { if (valid) {
loading.value = true; loading.value = true;
const id = formData.id; const id = formData.id;
@@ -296,8 +297,8 @@ function handleSubmit() {
/** 关闭系统配置弹窗 */ /** 关闭系统配置弹窗 */
function handleCloseDialog() { function handleCloseDialog() {
dialog.visible = false; dialog.visible = false;
dataFormRef.value.resetFields(); dataFormRef.value!.resetFields();
dataFormRef.value.clearValidate(); dataFormRef.value!.clearValidate();
formData.id != undefined; formData.id != undefined;
} }
+7 -6
View File
@@ -222,9 +222,10 @@ defineOptions({
}); });
import DictAPI, { DictPageQuery, DictPageVO, DictForm } from "@/api/dict"; import DictAPI, { DictPageQuery, DictPageVO, DictForm } from "@/api/dict";
import type { FormInstance } from "element-plus";
const queryFormRef = ref(ElForm); const queryFormRef = ref<FormInstance>();
const dataFormRef = ref(ElForm); const dataFormRef = ref<FormInstance>();
const loading = ref(false); const loading = ref(false);
const ids = ref<number[]>([]); const ids = ref<number[]>([]);
@@ -275,7 +276,7 @@ function handleQuery() {
// 重置查询 // 重置查询
function handleResetClick() { function handleResetClick() {
queryFormRef.value.resetFields(); queryFormRef.value!.resetFields();
queryParams.pageNum = 1; queryParams.pageNum = 1;
handleQuery(); handleQuery();
} }
@@ -306,7 +307,7 @@ function handleEditClick(id: number, name: string) {
// 提交字典表单 // 提交字典表单
function handleSubmitClick() { function handleSubmitClick() {
dataFormRef.value.validate((isValid: boolean) => { dataFormRef.value!.validate((isValid: boolean) => {
if (isValid) { if (isValid) {
loading.value = true; loading.value = true;
const id = formData.id; const id = formData.id;
@@ -335,8 +336,8 @@ function handleSubmitClick() {
function handleCloseDialog() { function handleCloseDialog() {
dialog.visible = false; dialog.visible = false;
dataFormRef.value.resetFields(); dataFormRef.value!.resetFields();
dataFormRef.value.clearValidate(); dataFormRef.value!.clearValidate();
formData.id = undefined; formData.id = undefined;
formData.dictItems = []; formData.dictItems = [];
+3 -2
View File
@@ -81,8 +81,9 @@ defineOptions({
}); });
import LogAPI, { LogPageVO, LogPageQuery } from "@/api/log"; import LogAPI, { LogPageVO, LogPageQuery } from "@/api/log";
import type { FormInstance } from "element-plus";
const queryFormRef = ref(ElForm); const queryFormRef = ref<FormInstance>();
const loading = ref(false); const loading = ref(false);
const total = ref(0); const total = ref(0);
@@ -111,7 +112,7 @@ function handleQuery() {
} }
/** 重置查询 */ /** 重置查询 */
function handleResetQuery() { function handleResetQuery() {
queryFormRef.value.resetFields(); queryFormRef.value!.resetFields();
queryParams.pageNum = 1; queryParams.pageNum = 1;
queryParams.createTime = undefined; queryParams.createTime = undefined;
handleQuery(); handleQuery();
+7 -6
View File
@@ -454,9 +454,10 @@ defineOptions({
import MenuAPI, { MenuQuery, MenuForm, MenuVO } from "@/api/menu"; import MenuAPI, { MenuQuery, MenuForm, MenuVO } from "@/api/menu";
import { MenuTypeEnum } from "@/enums/MenuTypeEnum"; import { MenuTypeEnum } from "@/enums/MenuTypeEnum";
import type { FormInstance } from "element-plus";
const queryFormRef = ref(ElForm); const queryFormRef = ref<FormInstance>();
const menuFormRef = ref(ElForm); const menuFormRef = ref<FormInstance>();
const loading = ref(false); const loading = ref(false);
const dialog = reactive({ const dialog = reactive({
@@ -514,7 +515,7 @@ function handleQuery() {
// 重置查询 // 重置查询
function handleResetQuery() { function handleResetQuery() {
queryFormRef.value.resetFields(); queryFormRef.value!.resetFields();
handleQuery(); handleQuery();
} }
@@ -569,7 +570,7 @@ function handleMenuTypeChange() {
/** 菜单保存提交 */ /** 菜单保存提交 */
function submitForm() { function submitForm() {
menuFormRef.value.validate((isValid: boolean) => { menuFormRef.value!.validate((isValid: boolean) => {
if (isValid) { if (isValid) {
const menuId = formData.value.id; const menuId = formData.value.id;
if (menuId) { if (menuId) {
@@ -621,8 +622,8 @@ function handleDelete(menuId: number) {
// 关闭弹窗 // 关闭弹窗
function handleCloseDialog() { function handleCloseDialog() {
dialog.visible = false; dialog.visible = false;
menuFormRef.value.resetFields(); menuFormRef.value!.resetFields();
menuFormRef.value.clearValidate(); menuFormRef.value!.clearValidate();
formData.value.id = undefined; formData.value.id = undefined;
} }
+1 -1
View File
@@ -36,7 +36,7 @@
<i-ep-edit /> <i-ep-edit />
转账 转账
</el-button> </el-button>
<el-button type="warning" size="small" link @click="handleOpenDialog(scope.row)"> <el-button type="warning" size="small" link @click="handleOpenDialog(scope.row as DrawPageVO)">
<i-ep-edit /> <i-ep-edit />
驳回 驳回
</el-button> </el-button>
+1 -1
View File
@@ -71,7 +71,7 @@
<el-table-column label="备注" align="center" prop="comment"> <el-table-column label="备注" align="center" prop="comment">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.comment"> <div v-if="scope.row.comment">
{{ formatComment(scope.row) }} {{ formatComment(scope.row as IntegralPageAdminVO) }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
+5 -5
View File
@@ -101,23 +101,23 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="240"> <el-table-column label="操作" align="center" fixed="right" width="240">
<template #default="scope"> <template #default="scope">
<el-button type="primary" link @click="handleOpenDialog(scope.row)"> <el-button type="primary" link @click="handleOpenDialog(scope.row as StyleVO)">
<el-icon><EditPen /></el-icon> <el-icon><EditPen /></el-icon>
定价 定价
</el-button> </el-button>
<el-button v-if="scope.row.state == 2" type="success" link @click="handleState(1, scope.row)"> <el-button v-if="scope.row.state == 2" type="success" link @click="handleState(1, scope.row as StyleVO)">
<el-icon><CirclePlus /></el-icon> <el-icon><CirclePlus /></el-icon>
上线 上线
</el-button> </el-button>
<el-button v-else type="info" link @click="handleState(2, scope.row)"> <el-button v-else type="info" link @click="handleState(2, scope.row as StyleVO)">
<el-icon><Remove /></el-icon> <el-icon><Remove /></el-icon>
下线 下线
</el-button> </el-button>
<el-button v-if="scope.row.state == 0" type="success" link @click="handleState(1, scope.row)"> <el-button v-if="scope.row.state == 0" type="success" link @click="handleState(1, scope.row as StyleVO)">
<el-icon><Star /></el-icon> <el-icon><Star /></el-icon>
{{ "取消推荐" }} {{ "取消推荐" }}
</el-button> </el-button>
<el-button v-else-if="scope.row.state == 1" type="danger" link @click="handleState(0, scope.row)"> <el-button v-else-if="scope.row.state == 1" type="danger" link @click="handleState(0, scope.row as StyleVO)">
<el-icon><Star /></el-icon> <el-icon><Star /></el-icon>
{{ "设为推荐" }} {{ "设为推荐" }}
</el-button> </el-button>
+5
View File
@@ -210,6 +210,11 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
}, },
}, },
rollupOptions: { rollupOptions: {
onwarn(warning, warn) {
// 忽略 @vueuse/core 依赖中 #__PURE__ 注释位置导致的无效注释警告(仅移除注释,无行为影响)
if (warning.code === "INVALID_ANNOTATION") return;
warn(warning);
},
output: { output: {
manualChunks: { manualChunks: {
vue: ["vue", "vue-router", "pinia"], vue: ["vue", "vue-router", "pinia"],