fix: 🧩 修复打包错误

This commit is contained in:
2025-05-26 10:33:33 +08:00
parent 6e3c0d9ae2
commit 1c33c0d92e
15 changed files with 62 additions and 123 deletions

101
src/components.d.ts vendored
View File

@@ -5,85 +5,24 @@
// Read more: https://github.com/vuejs/core/pull/3399
export {}
declare module 'vue' {
export interface GlobalComponents {
403: typeof import('./components/ErrorMessage/403.vue')['default']
404: typeof import('./components/ErrorMessage/404.vue')['default']
500: typeof import('./components/ErrorMessage/500.vue')['default']
Add: typeof import('./components/ListBtns/components/Add.vue')['default']
ColSetting: typeof import('./components/ProTable/components/ColSetting.vue')['default']
Del: typeof import('./components/ListBtns/components/Del.vue')['default']
DetailsBtns: typeof import('./components/DetailsBtns/index.vue')['default']
DetailsSearch: typeof import('./components/DetailsSearch/index.vue')['default']
Download: typeof import('./components/ListBtns/components/download.vue')['default']
ElAside: typeof import('element-plus/es')['ElAside']
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']
ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
Empty: typeof import('./components/ProTable/components/Empty.vue')['default']
Form: typeof import('./components/Form/index.vue')['default']
FormItem: typeof import('./components/Form/components/FormItem.vue')['default']
FormTable: typeof import('./components/FormTable/index.vue')['default']
Generate: typeof import('./components/ListBtns/components/Generate.vue')['default']
GenerateBox: typeof import('./components/ListBtns/components/GenerateBox.vue')['default']
Grid: typeof import('./components/Grid/index.vue')['default']
GridItem: typeof import('./components/Grid/components/GridItem.vue')['default']
IEpArrowDown: typeof import('~icons/ep/arrow-down')['default']
IEpCircleClose: typeof import('~icons/ep/circle-close')['default']
IEpFolderDelete: typeof import('~icons/ep/folder-delete')['default']
IEpFullScreen: typeof import('~icons/ep/full-screen')['default']
IEpRefresh: typeof import('~icons/ep/refresh')['default']
IEpRemove: typeof import('~icons/ep/remove')['default']
IEpSearch: typeof import('~icons/ep/search')['default']
IEpSwitchButton: typeof import('~icons/ep/switch-button')['default']
ImportExcel: typeof import('./components/ImportExcel/index.vue')['default']
ListBtns: typeof import('./components/ListBtns/index.vue')['default']
ListResultDig: typeof import('./components/ListResultDig/index.vue')['default']
Loading: typeof import('./components/Loading/index.vue')['default']
MyTable: typeof import('./components/MyTable/index.vue')['default']
NumberCode: typeof import('./components/DetailsBtns/components/numberCode.vue')['default']
PackingBox: typeof import('./components/ListBtns/components/PackingBox.vue')['default']
Pagination: typeof import('./components/ProTable/components/Pagination.vue')['default']
Print: typeof import('./components/ListBtns/components/Print.vue')['default']
PrintBox: typeof import('./components/ListBtns/components/PrintBox.vue')['default']
ProTable: typeof import('./components/ProTable/index.vue')['default']
Refresh: typeof import('./components/ListBtns/components/Refresh.vue')['default']
RefreshBox: typeof import('./components/ListBtns/components/RefreshBox.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SearchForm: typeof import('./components/SearchForm/index.vue')['default']
SearchFormItem: typeof import('./components/SearchForm/components/SearchFormItem.vue')['default']
Switch: typeof import('./components/ListBtns/components/Switch.vue')['default']
Table: typeof import('./components/Table/index.vue')['default']
TableColumn: typeof import('./components/ProTable/components/TableColumn.vue')['default']
}
declare module "vue" {
export interface GlobalComponents {
ElAside: typeof import("element-plus/es")["ElAside"];
ElButton: typeof import("element-plus/es")["ElButton"];
ElContainer: typeof import("element-plus/es")["ElContainer"];
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
ElDropdownMenu: typeof import("element-plus/es")["ElDropdownMenu"];
ElHeader: typeof import("element-plus/es")["ElHeader"];
ElIcon: typeof import("element-plus/es")["ElIcon"];
ElInput: typeof import("element-plus/es")["ElInput"];
ElMain: typeof import("element-plus/es")["ElMain"];
ElMenu: typeof import("element-plus/es")["ElMenu"];
ElScrollbar: typeof import("element-plus/es")["ElScrollbar"];
ElTable: typeof import("element-plus/es")["ElTable"];
ElTableColumn: typeof import("element-plus/es")["ElTableColumn"];
IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"];
RouterLink: typeof import("vue-router")["RouterLink"];
RouterView: typeof import("vue-router")["RouterView"];
}
}

View File

@@ -11,9 +11,9 @@
</template>
<script setup lang="ts" name="MyTable">
import { ColumnProps } from "@/components/ProTable/interface";
// import { ColumnProps } from "@/components/ProTable/interface";
export interface ProTableProps {
columns?: ColumnProps[]; // 列配置项 ==> 必传
columns?: any[]; // 列配置项 ==> 必传
tableData?: any[]; // 静态 table data 数据,若存在则不会使用 requestApi 返回的 data ==> 非必传
title?: string;
}

View File

@@ -52,7 +52,7 @@ let title = ref("ORICO品牌官网开放平台");
watch(
() => userStore.languageValue,
newVal => {
const PARAMS_DATA = {
const PARAMS_DATA: any = {
1: "ORICO品牌官网开放平台",
2: "ORICO brand official website open platform"
};

View File

@@ -11,7 +11,7 @@
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="(it, index) in language" :key="index" :command="it.id" :value="it.name">
{{ !it.disable ? it.name : "" }}
{{ it.name }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
@@ -26,11 +26,11 @@ const language = ref([
{ name: "中文", id: 1 },
{ name: "English", id: 2 }
]);
const name = ref("中文");
const name = ref<any>("中文");
userStore.setLanguageValue(1);
//组织改变;
const handleCommand = (val: number | null) => {
const names = {
const handleCommand = (val: any) => {
const names: any = {
1: "中文",
2: "English"
};

View File

@@ -19,7 +19,7 @@
<script setup lang="ts" name="lv1">
import { useUserStore } from "@/stores/modules/user";
const userStore = useUserStore();
defineProps<{ menuList: Menu.MenuOptions[] }>();
defineProps<{ menuList: any[] }>();
let languageValue = ref(1);
const emits = defineEmits<{
(e: "change", item: any): void;

View File

@@ -14,7 +14,7 @@
<a
target="_blank"
:class="{ actived: menu.path == path }"
:href="item.path"
:href="menu.path"
v-else-if="(menu.hidden && menu.path.indexOf('https://') !== -1) || menu.path.indexOf('http://') !== -1"
>{{ menu.meta.title }}</a
>
@@ -30,7 +30,7 @@ import { useUserStore } from "@/stores/modules/user";
const userStore = useUserStore();
const $router = useRouter();
const $route = useRoute();
const path: any = ref("/index");
const path: any = ref("");
let languageValue = ref(1);
defineProps<{ menus: any }>();

View File

@@ -107,11 +107,11 @@ const tabClick = (tabItem: TabsPaneContext) => {
const fullPath = tabItem.props.name as string;
router.push(fullPath);
};
const TABS_ZH_OR_EN = {
const TABS_ZH_OR_EN: any = {
1: TABS_MENULIST_ZH,
2: TABS_MENULIST_EN
};
const TITLES = {
const TITLES: any = {
1: import.meta.env.VITE_GLOB_APP_TITLE_ZH,
2: import.meta.env.VITE_GLOB_APP_TITLE_EN
};

View File

@@ -1,5 +1,5 @@
import { isArray } from "@/utils/is";
import { FieldNamesProps } from "@/components/ProTable/interface";
// import { FieldNamesProps } from "@/components/ProTable/interface";
//import { cloneDeep } from "lodash-es";
/**
@@ -312,7 +312,7 @@ export function handleProp(prop: string) {
* @param {String} type 过滤类型(目前只有 tag
* @returns {String}
* */
export function filterEnum(callValue: any, enumData?: any, fieldNames?: FieldNamesProps, type?: "tag") {
export function filterEnum(callValue: any, enumData?: any, fieldNames?: any, type?: "tag") {
const value = fieldNames?.value ?? "value";
const label = fieldNames?.label ?? "label";
const children = fieldNames?.children ?? "children";

View File

@@ -26,19 +26,19 @@ import { EN_DATA } from "./data/en_data";
import { useUserStore } from "@/stores/modules/user";
import MyTable from "@/components/MyTable/index.vue";
const userStore = useUserStore();
const PARAMS_DATA = {
const PARAMS_DATA: any = {
1: ZH_DATA,
2: EN_DATA
};
const TEXTAREA_TITLES = {
const TEXTAREA_TITLES: any = {
1: "请求示例",
2: "Request Example"
};
const TEXTAREA_TITLES1 = {
const TEXTAREA_TITLES1: any = {
1: "响应示例",
2: "Response Example"
};
const PARAMS_VALUE = {
const PARAMS_VALUE: any = {
1: "公共参数",
2: "Common parameters"
};

View File

@@ -27,19 +27,19 @@ import { useUserStore } from "@/stores/modules/user";
import MyTable from "@/components/MyTable/index.vue";
import { RETURN_VALUE } from "./example/index";
const userStore = useUserStore();
const PARAMS_DATA = {
const PARAMS_DATA: any = {
1: ZH_DATA,
2: EN_DATA
};
const TEXTAREA_TITLES = {
const TEXTAREA_TITLES: any = {
1: "请求示例",
2: "Request Example"
};
const TEXTAREA_TITLES1 = {
const TEXTAREA_TITLES1: any = {
1: "响应示例",
2: "Response Example"
};
const PARAMS_VALUE = {
const PARAMS_VALUE: any = {
1: "公共参数",
2: "Common parameters"
};

View File

@@ -27,19 +27,19 @@ import { useUserStore } from "@/stores/modules/user";
import MyTable from "@/components/MyTable/index.vue";
import { RETURN_VALUE } from "./example/index";
const userStore = useUserStore();
const PARAMS_DATA = {
const PARAMS_DATA: any = {
1: ZH_DATA,
2: EN_DATA
};
const TEXTAREA_TITLES = {
const TEXTAREA_TITLES: any = {
1: "请求示例",
2: "Request Example"
};
const TEXTAREA_TITLES1 = {
const TEXTAREA_TITLES1: any = {
1: "响应示例",
2: "Response Example"
};
const PARAMS_VALUE = {
const PARAMS_VALUE: any = {
1: "公共参数",
2: "Common parameters"
};

View File

@@ -27,19 +27,19 @@ import { useUserStore } from "@/stores/modules/user";
import MyTable from "@/components/MyTable/index.vue";
import { RETURN_VALUE } from "./example/index";
const userStore = useUserStore();
const PARAMS_DATA = {
const PARAMS_DATA: any = {
1: ZH_DATA,
2: EN_DATA
};
const TEXTAREA_TITLES = {
const TEXTAREA_TITLES: any = {
1: "请求示例",
2: "Request Example"
};
const TEXTAREA_TITLES1 = {
const TEXTAREA_TITLES1: any = {
1: "响应示例",
2: "Response Example"
};
const PARAMS_VALUE = {
const PARAMS_VALUE: any = {
1: "公共参数",
2: "Common parameters"
};

View File

@@ -27,19 +27,19 @@ import { useUserStore } from "@/stores/modules/user";
import MyTable from "@/components/MyTable/index.vue";
import { RETURN_VALUE } from "./example/index";
const userStore = useUserStore();
const PARAMS_DATA = {
const PARAMS_DATA: any = {
1: ZH_DATA,
2: EN_DATA
};
const TEXTAREA_TITLES = {
const TEXTAREA_TITLES: any = {
1: "请求示例",
2: "Request Example"
};
const TEXTAREA_TITLES1 = {
const TEXTAREA_TITLES1: any = {
1: "响应示例",
2: "Response Example"
};
const PARAMS_VALUE = {
const PARAMS_VALUE: any = {
1: "公共参数",
2: "Common parameters"
};

View File

@@ -27,19 +27,19 @@ import { useUserStore } from "@/stores/modules/user";
import MyTable from "@/components/MyTable/index.vue";
import { RETURN_VALUE } from "./example/index";
const userStore = useUserStore();
const PARAMS_DATA = {
const PARAMS_DATA: any = {
1: ZH_DATA,
2: EN_DATA
};
const TEXTAREA_TITLES = {
const TEXTAREA_TITLES: any = {
1: "请求示例",
2: "Request Example"
};
const TEXTAREA_TITLES1 = {
const TEXTAREA_TITLES1: any = {
1: "响应示例",
2: "Response Example"
};
const PARAMS_VALUE = {
const PARAMS_VALUE: any = {
1: "公共参数",
2: "Common parameters"
};

View File

@@ -27,19 +27,19 @@ import { EN_DATA } from "./data/en_data";
import { useUserStore } from "@/stores/modules/user";
import MyTable from "@/components/MyTable/index.vue";
const userStore = useUserStore();
const PARAMS_DATA = {
const PARAMS_DATA: any = {
1: ZH_DATA,
2: EN_DATA
};
const TEXTAREA_TITLES = {
const TEXTAREA_TITLES: any = {
1: "请求示例",
2: "Request Example"
};
const TEXTAREA_TITLES1 = {
const TEXTAREA_TITLES1: any = {
1: "响应示例",
2: "Response Example"
};
const PARAMS_VALUE = {
const PARAMS_VALUE: any = {
1: "公共参数",
2: "Common parameters"
};