ebuilds-shared 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-F2CZ3CMW.js → chunk-BEO5FVOB.js} +49 -37
- package/dist/{chunk-BQBUWOOS.mjs → chunk-STGVPPLP.mjs} +49 -37
- package/dist/{chunk-YXHM6TUN.js → chunk-WHSFNF75.js} +48 -28
- package/dist/{chunk-IFPKQ66A.mjs → chunk-ZGEZYILN.mjs} +48 -28
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.mjs +1 -1
- package/dist/utils/index.d.mts +8 -8
- package/dist/utils/index.d.ts +8 -8
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/vite-config/index.d.mts +12 -0
- package/dist/vite-config/index.d.ts +12 -0
- package/dist/vite-config/index.js +2 -2
- package/dist/vite-config/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -133,7 +133,7 @@ var require_supports_color = _chunkQGM4M3NIjs.__commonJS.call(void 0, {
|
|
|
133
133
|
// src/vite-config/index.ts
|
|
134
134
|
var _vite = require('vite');
|
|
135
135
|
|
|
136
|
-
// ../node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@6.4.1_@types+node@22.19.
|
|
136
|
+
// ../node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@6.4.1_@types+node@22.19.7_jiti@2.6.1_less@4.5.1_sass-embedded@1_gleyv4jjxuxzkop3burc7rdxhq/node_modules/@vitejs/plugin-vue/dist/index.mjs
|
|
137
137
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
138
138
|
|
|
139
139
|
var _vue = require('vue');
|
|
@@ -2677,48 +2677,35 @@ function vuePlugin(rawOptions = {}) {
|
|
|
2677
2677
|
// src/vite-config/plugin/autoImport/index.ts
|
|
2678
2678
|
var _vite3 = require('unplugin-auto-import/vite'); var _vite4 = _interopRequireDefault(_vite3);
|
|
2679
2679
|
var _vite5 = require('unplugin-vue-components/vite'); var _vite6 = _interopRequireDefault(_vite5);
|
|
2680
|
-
var _resolvers = require('unplugin-vue-components/resolvers');
|
|
2681
2680
|
var AutoImportDeps = (isDev) => {
|
|
2682
2681
|
return [
|
|
2683
2682
|
/* 自动导入配置
|
|
2684
2683
|
- imports: 声明需要自动导入的模块(vue核心API和路由API)
|
|
2685
2684
|
- dts: 生成的类型声明文件路径 */
|
|
2686
2685
|
_vite4.default.call(void 0, {
|
|
2687
|
-
resolvers: [
|
|
2686
|
+
// resolvers: isDev ? [] : [ElementPlusResolver()],
|
|
2688
2687
|
imports: ["vue", "vue-router", "pinia"],
|
|
2689
2688
|
dts: "types/auto-imports.d.ts",
|
|
2690
2689
|
eslintrc: {
|
|
2691
2690
|
enabled: true,
|
|
2692
2691
|
filepath: "./.eslintrc-auto-import.json",
|
|
2693
2692
|
globalsPropValue: true
|
|
2694
|
-
}
|
|
2695
|
-
// 排除某些文件
|
|
2696
|
-
exclude: ["**/node_modules/**", "**/dist/**"],
|
|
2697
|
-
// 包含模式
|
|
2698
|
-
include: [
|
|
2699
|
-
/\.[tj]sx?$/,
|
|
2700
|
-
// .ts, .tsx, .js, .jsx
|
|
2701
|
-
/\.vue$/,
|
|
2702
|
-
/\.vue\?vue/,
|
|
2703
|
-
// .vue
|
|
2704
|
-
/\.md$/
|
|
2705
|
-
// .md
|
|
2706
|
-
]
|
|
2693
|
+
}
|
|
2707
2694
|
}),
|
|
2708
2695
|
/* 组件自动注册配置
|
|
2709
2696
|
- globs: 组件文件匹配模式
|
|
2710
2697
|
- dts: 生成的组件类型声明文件路径 */
|
|
2711
2698
|
_vite6.default.call(void 0, {
|
|
2712
|
-
resolvers: isDev
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
],
|
|
2699
|
+
// resolvers: isDev
|
|
2700
|
+
// ? []
|
|
2701
|
+
// : [
|
|
2702
|
+
// ElementPlusResolver({
|
|
2703
|
+
// importStyle: 'sass' // 使用 sass 样式
|
|
2704
|
+
// }),
|
|
2705
|
+
// AntDesignVueResolver({
|
|
2706
|
+
// importStyle: false // css in js
|
|
2707
|
+
// })
|
|
2708
|
+
// ],
|
|
2722
2709
|
globs: ["src/components/**/*.vue", "src/views/**/*.vue"],
|
|
2723
2710
|
dts: "types/components.d.ts",
|
|
2724
2711
|
// 允许子目录搜索
|
|
@@ -2729,18 +2716,43 @@ var AutoImportDeps = (isDev) => {
|
|
|
2729
2716
|
include: [/\.vue$/, /\.vue\?vue/]
|
|
2730
2717
|
}),
|
|
2731
2718
|
// 开发环境:给 main.ts 注入全量 UI 引入
|
|
2732
|
-
|
|
2719
|
+
{
|
|
2733
2720
|
name: "dev-auto-import-antdv",
|
|
2734
2721
|
transform(code, id) {
|
|
2735
2722
|
if (/src\/main\.ts$/.test(id)) {
|
|
2723
|
+
const dayjsConfig = `
|
|
2724
|
+
// \u914D\u7F6E dayjs \u4E2D\u6587 locale\uFF08\u5FC5\u987B\u5728 Element Plus \u6CE8\u518C\u4E4B\u524D\uFF09
|
|
2725
|
+
import dayjs from 'dayjs';
|
|
2726
|
+
import 'dayjs/locale/zh-cn';
|
|
2727
|
+
dayjs.locale('zh-cn');
|
|
2728
|
+
`;
|
|
2729
|
+
const createAppIndex = code.indexOf("createApp");
|
|
2730
|
+
if (createAppIndex !== -1) {
|
|
2731
|
+
const lastImportMatch = code.match(/import[\s\S]*?from[\s\S]*?;[\s\n]*$/m);
|
|
2732
|
+
const insertIndex = lastImportMatch ? lastImportMatch.index + lastImportMatch[0].length : createAppIndex;
|
|
2733
|
+
return {
|
|
2734
|
+
code: code.slice(0, insertIndex) + dayjsConfig + code.slice(insertIndex) + `
|
|
2735
|
+
// \u6CE8\u518C Element Plus \u548C Ant Design Vue
|
|
2736
|
+
import ElementPlus from 'element-plus';
|
|
2737
|
+
import 'element-plus/dist/index.css';
|
|
2738
|
+
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
|
2739
|
+
// import Antd from 'ant-design-vue';
|
|
2740
|
+
// import 'ant-design-vue/dist/reset.css';
|
|
2741
|
+
app.use(ElementPlus, { locale: zhCn });
|
|
2742
|
+
// app.use(Antd);
|
|
2743
|
+
`,
|
|
2744
|
+
map: null
|
|
2745
|
+
};
|
|
2746
|
+
}
|
|
2736
2747
|
return {
|
|
2737
|
-
code: code + `
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2748
|
+
code: dayjsConfig + code + `
|
|
2749
|
+
import ElementPlus from 'element-plus';
|
|
2750
|
+
import 'element-plus/dist/index.css';
|
|
2751
|
+
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
|
2752
|
+
import Antd from 'ant-design-vue';
|
|
2753
|
+
import 'ant-design-vue/dist/reset.css';
|
|
2754
|
+
app.use(ElementPlus, { locale: zhCn });
|
|
2755
|
+
app.use(Antd);
|
|
2744
2756
|
`,
|
|
2745
2757
|
map: null
|
|
2746
2758
|
};
|
|
@@ -2905,7 +2917,7 @@ function createBaseViteConfig(options) {
|
|
|
2905
2917
|
const env = _vite.loadEnv.call(void 0, config2.mode, process.cwd(), "VITE_");
|
|
2906
2918
|
const isDev = config2.mode === "development";
|
|
2907
2919
|
const isProd = config2.mode === "production";
|
|
2908
|
-
const { port = 5e3, plugins = [], proxy, showDevTools = false, enableOptimizeDeps = true, baseUrl } = options;
|
|
2920
|
+
const { port = 5e3, plugins = [], proxy, showDevTools = false, enableOptimizeDeps = true, baseUrl, customConfig = {} } = options;
|
|
2909
2921
|
const buildConfig = build_default(isProd);
|
|
2910
2922
|
return {
|
|
2911
2923
|
plugins: createVitePlugins(plugins, showDevTools, isDev),
|
|
@@ -2920,10 +2932,10 @@ function createBaseViteConfig(options) {
|
|
|
2920
2932
|
pure: ["console.log"]
|
|
2921
2933
|
// 仅标记纯函数,配合 drop 使用
|
|
2922
2934
|
} : void 0,
|
|
2923
|
-
treeshake: isProd ? { preset: "recommended" } : true,
|
|
2924
2935
|
optimizeDeps: {
|
|
2925
2936
|
include: enableOptimizeDeps ? ["vue", "vue-router", "pinia", "axios", "element-plus", "ant-design-vue", "echarts"] : []
|
|
2926
|
-
}
|
|
2937
|
+
},
|
|
2938
|
+
...customConfig
|
|
2927
2939
|
};
|
|
2928
2940
|
});
|
|
2929
2941
|
}
|
|
@@ -133,7 +133,7 @@ var require_supports_color = __commonJS({
|
|
|
133
133
|
// src/vite-config/index.ts
|
|
134
134
|
import { defineConfig, loadEnv } from "vite";
|
|
135
135
|
|
|
136
|
-
// ../node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@6.4.1_@types+node@22.19.
|
|
136
|
+
// ../node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@6.4.1_@types+node@22.19.7_jiti@2.6.1_less@4.5.1_sass-embedded@1_gleyv4jjxuxzkop3burc7rdxhq/node_modules/@vitejs/plugin-vue/dist/index.mjs
|
|
137
137
|
import fs from "fs";
|
|
138
138
|
import { normalizePath as normalizePath$1, isCSSRequest, transformWithEsbuild, formatPostcssSourceMap, createFilter } from "vite";
|
|
139
139
|
import { shallowRef, computed } from "vue";
|
|
@@ -2677,48 +2677,35 @@ function vuePlugin(rawOptions = {}) {
|
|
|
2677
2677
|
// src/vite-config/plugin/autoImport/index.ts
|
|
2678
2678
|
import AutoImport from "unplugin-auto-import/vite";
|
|
2679
2679
|
import Components from "unplugin-vue-components/vite";
|
|
2680
|
-
import { AntDesignVueResolver, ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
|
2681
2680
|
var AutoImportDeps = (isDev) => {
|
|
2682
2681
|
return [
|
|
2683
2682
|
/* 自动导入配置
|
|
2684
2683
|
- imports: 声明需要自动导入的模块(vue核心API和路由API)
|
|
2685
2684
|
- dts: 生成的类型声明文件路径 */
|
|
2686
2685
|
AutoImport({
|
|
2687
|
-
resolvers: [ElementPlusResolver()],
|
|
2686
|
+
// resolvers: isDev ? [] : [ElementPlusResolver()],
|
|
2688
2687
|
imports: ["vue", "vue-router", "pinia"],
|
|
2689
2688
|
dts: "types/auto-imports.d.ts",
|
|
2690
2689
|
eslintrc: {
|
|
2691
2690
|
enabled: true,
|
|
2692
2691
|
filepath: "./.eslintrc-auto-import.json",
|
|
2693
2692
|
globalsPropValue: true
|
|
2694
|
-
}
|
|
2695
|
-
// 排除某些文件
|
|
2696
|
-
exclude: ["**/node_modules/**", "**/dist/**"],
|
|
2697
|
-
// 包含模式
|
|
2698
|
-
include: [
|
|
2699
|
-
/\.[tj]sx?$/,
|
|
2700
|
-
// .ts, .tsx, .js, .jsx
|
|
2701
|
-
/\.vue$/,
|
|
2702
|
-
/\.vue\?vue/,
|
|
2703
|
-
// .vue
|
|
2704
|
-
/\.md$/
|
|
2705
|
-
// .md
|
|
2706
|
-
]
|
|
2693
|
+
}
|
|
2707
2694
|
}),
|
|
2708
2695
|
/* 组件自动注册配置
|
|
2709
2696
|
- globs: 组件文件匹配模式
|
|
2710
2697
|
- dts: 生成的组件类型声明文件路径 */
|
|
2711
2698
|
Components({
|
|
2712
|
-
resolvers: isDev
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
],
|
|
2699
|
+
// resolvers: isDev
|
|
2700
|
+
// ? []
|
|
2701
|
+
// : [
|
|
2702
|
+
// ElementPlusResolver({
|
|
2703
|
+
// importStyle: 'sass' // 使用 sass 样式
|
|
2704
|
+
// }),
|
|
2705
|
+
// AntDesignVueResolver({
|
|
2706
|
+
// importStyle: false // css in js
|
|
2707
|
+
// })
|
|
2708
|
+
// ],
|
|
2722
2709
|
globs: ["src/components/**/*.vue", "src/views/**/*.vue"],
|
|
2723
2710
|
dts: "types/components.d.ts",
|
|
2724
2711
|
// 允许子目录搜索
|
|
@@ -2729,18 +2716,43 @@ var AutoImportDeps = (isDev) => {
|
|
|
2729
2716
|
include: [/\.vue$/, /\.vue\?vue/]
|
|
2730
2717
|
}),
|
|
2731
2718
|
// 开发环境:给 main.ts 注入全量 UI 引入
|
|
2732
|
-
|
|
2719
|
+
{
|
|
2733
2720
|
name: "dev-auto-import-antdv",
|
|
2734
2721
|
transform(code, id) {
|
|
2735
2722
|
if (/src\/main\.ts$/.test(id)) {
|
|
2723
|
+
const dayjsConfig = `
|
|
2724
|
+
// \u914D\u7F6E dayjs \u4E2D\u6587 locale\uFF08\u5FC5\u987B\u5728 Element Plus \u6CE8\u518C\u4E4B\u524D\uFF09
|
|
2725
|
+
import dayjs from 'dayjs';
|
|
2726
|
+
import 'dayjs/locale/zh-cn';
|
|
2727
|
+
dayjs.locale('zh-cn');
|
|
2728
|
+
`;
|
|
2729
|
+
const createAppIndex = code.indexOf("createApp");
|
|
2730
|
+
if (createAppIndex !== -1) {
|
|
2731
|
+
const lastImportMatch = code.match(/import[\s\S]*?from[\s\S]*?;[\s\n]*$/m);
|
|
2732
|
+
const insertIndex = lastImportMatch ? lastImportMatch.index + lastImportMatch[0].length : createAppIndex;
|
|
2733
|
+
return {
|
|
2734
|
+
code: code.slice(0, insertIndex) + dayjsConfig + code.slice(insertIndex) + `
|
|
2735
|
+
// \u6CE8\u518C Element Plus \u548C Ant Design Vue
|
|
2736
|
+
import ElementPlus from 'element-plus';
|
|
2737
|
+
import 'element-plus/dist/index.css';
|
|
2738
|
+
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
|
2739
|
+
// import Antd from 'ant-design-vue';
|
|
2740
|
+
// import 'ant-design-vue/dist/reset.css';
|
|
2741
|
+
app.use(ElementPlus, { locale: zhCn });
|
|
2742
|
+
// app.use(Antd);
|
|
2743
|
+
`,
|
|
2744
|
+
map: null
|
|
2745
|
+
};
|
|
2746
|
+
}
|
|
2736
2747
|
return {
|
|
2737
|
-
code: code + `
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2748
|
+
code: dayjsConfig + code + `
|
|
2749
|
+
import ElementPlus from 'element-plus';
|
|
2750
|
+
import 'element-plus/dist/index.css';
|
|
2751
|
+
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
|
2752
|
+
import Antd from 'ant-design-vue';
|
|
2753
|
+
import 'ant-design-vue/dist/reset.css';
|
|
2754
|
+
app.use(ElementPlus, { locale: zhCn });
|
|
2755
|
+
app.use(Antd);
|
|
2744
2756
|
`,
|
|
2745
2757
|
map: null
|
|
2746
2758
|
};
|
|
@@ -2905,7 +2917,7 @@ function createBaseViteConfig(options) {
|
|
|
2905
2917
|
const env = loadEnv(config2.mode, process.cwd(), "VITE_");
|
|
2906
2918
|
const isDev = config2.mode === "development";
|
|
2907
2919
|
const isProd = config2.mode === "production";
|
|
2908
|
-
const { port = 5e3, plugins = [], proxy, showDevTools = false, enableOptimizeDeps = true, baseUrl } = options;
|
|
2920
|
+
const { port = 5e3, plugins = [], proxy, showDevTools = false, enableOptimizeDeps = true, baseUrl, customConfig = {} } = options;
|
|
2909
2921
|
const buildConfig = build_default(isProd);
|
|
2910
2922
|
return {
|
|
2911
2923
|
plugins: createVitePlugins(plugins, showDevTools, isDev),
|
|
@@ -2920,10 +2932,10 @@ function createBaseViteConfig(options) {
|
|
|
2920
2932
|
pure: ["console.log"]
|
|
2921
2933
|
// 仅标记纯函数,配合 drop 使用
|
|
2922
2934
|
} : void 0,
|
|
2923
|
-
treeshake: isProd ? { preset: "recommended" } : true,
|
|
2924
2935
|
optimizeDeps: {
|
|
2925
2936
|
include: enableOptimizeDeps ? ["vue", "vue-router", "pinia", "axios", "element-plus", "ant-design-vue", "echarts"] : []
|
|
2926
|
-
}
|
|
2937
|
+
},
|
|
2938
|
+
...customConfig
|
|
2927
2939
|
};
|
|
2928
2940
|
});
|
|
2929
2941
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
var _chunkQGM4M3NIjs = require('./chunk-QGM4M3NI.js');
|
|
5
5
|
|
|
6
|
-
// ../node_modules/.pnpm/lodash@4.17.
|
|
6
|
+
// ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js
|
|
7
7
|
var require_lodash = _chunkQGM4M3NIjs.__commonJS.call(void 0, {
|
|
8
|
-
"../node_modules/.pnpm/lodash@4.17.
|
|
8
|
+
"../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js"(exports, module) {
|
|
9
9
|
(function() {
|
|
10
10
|
var undefined2;
|
|
11
|
-
var VERSION = "4.17.
|
|
11
|
+
var VERSION = "4.17.23";
|
|
12
12
|
var LARGE_ARRAY_SIZE = 200;
|
|
13
13
|
var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
|
|
14
14
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
@@ -1936,8 +1936,28 @@ var require_lodash = _chunkQGM4M3NIjs.__commonJS.call(void 0, {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
function baseUnset(object, path) {
|
|
1938
1938
|
path = castPath(path, object);
|
|
1939
|
-
|
|
1940
|
-
|
|
1939
|
+
var index = -1, length = path.length;
|
|
1940
|
+
if (!length) {
|
|
1941
|
+
return true;
|
|
1942
|
+
}
|
|
1943
|
+
var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
|
|
1944
|
+
while (++index < length) {
|
|
1945
|
+
var key = path[index];
|
|
1946
|
+
if (typeof key !== "string") {
|
|
1947
|
+
continue;
|
|
1948
|
+
}
|
|
1949
|
+
if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) {
|
|
1950
|
+
return false;
|
|
1951
|
+
}
|
|
1952
|
+
if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
|
|
1953
|
+
if (isRootPrimitive && index === 0) {
|
|
1954
|
+
continue;
|
|
1955
|
+
}
|
|
1956
|
+
return false;
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
var obj = parent(object, path);
|
|
1960
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
1941
1961
|
}
|
|
1942
1962
|
function baseUpdate(object, path, updater, customizer) {
|
|
1943
1963
|
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
|
@@ -6551,28 +6571,6 @@ async function addVersion({ to, next, version }) {
|
|
|
6551
6571
|
}
|
|
6552
6572
|
|
|
6553
6573
|
// src/utils/dateUtils.ts
|
|
6554
|
-
function listSort(arr, key = "no", callback) {
|
|
6555
|
-
return arr.sort((a, b) => {
|
|
6556
|
-
if (callback && typeof callback === "function") {
|
|
6557
|
-
callback(a);
|
|
6558
|
-
callback(b);
|
|
6559
|
-
}
|
|
6560
|
-
const aParts = a[key].toString().split(/(\d+)/).filter(Boolean);
|
|
6561
|
-
const bParts = b[key].toString().split(/(\d+)/).filter(Boolean);
|
|
6562
|
-
for (let i = 0; i < Math.min(aParts.length, bParts.length); i++) {
|
|
6563
|
-
if (aParts[i] !== bParts[i]) {
|
|
6564
|
-
const aIsNum = /^\d+$/.test(aParts[i]);
|
|
6565
|
-
const bIsNum = /^\d+$/.test(bParts[i]);
|
|
6566
|
-
if (aIsNum && bIsNum) {
|
|
6567
|
-
return parseInt(aParts[i], 10) - parseInt(bParts[i], 10);
|
|
6568
|
-
} else {
|
|
6569
|
-
return aParts[i].localeCompare(bParts[i]);
|
|
6570
|
-
}
|
|
6571
|
-
}
|
|
6572
|
-
}
|
|
6573
|
-
return aParts.length - bParts.length;
|
|
6574
|
-
});
|
|
6575
|
-
}
|
|
6576
6574
|
function duplicateRemovalCompleteSort(months) {
|
|
6577
6575
|
if (months.length === 0) {
|
|
6578
6576
|
return [];
|
|
@@ -6597,6 +6595,28 @@ function duplicateRemovalCompleteSort(months) {
|
|
|
6597
6595
|
}
|
|
6598
6596
|
return allMonths;
|
|
6599
6597
|
}
|
|
6598
|
+
function listSort(arr, key = "no", callback) {
|
|
6599
|
+
return arr.sort((a, b) => {
|
|
6600
|
+
if (callback && typeof callback === "function") {
|
|
6601
|
+
callback(a);
|
|
6602
|
+
callback(b);
|
|
6603
|
+
}
|
|
6604
|
+
const aParts = a[key].toString().split(/(\d+)/).filter(Boolean);
|
|
6605
|
+
const bParts = b[key].toString().split(/(\d+)/).filter(Boolean);
|
|
6606
|
+
for (let i = 0; i < Math.min(aParts.length, bParts.length); i++) {
|
|
6607
|
+
if (aParts[i] !== bParts[i]) {
|
|
6608
|
+
const aIsNum = /^\d+$/.test(aParts[i]);
|
|
6609
|
+
const bIsNum = /^\d+$/.test(bParts[i]);
|
|
6610
|
+
if (aIsNum && bIsNum) {
|
|
6611
|
+
return parseInt(aParts[i], 10) - parseInt(bParts[i], 10);
|
|
6612
|
+
} else {
|
|
6613
|
+
return aParts[i].localeCompare(bParts[i]);
|
|
6614
|
+
}
|
|
6615
|
+
}
|
|
6616
|
+
}
|
|
6617
|
+
return aParts.length - bParts.length;
|
|
6618
|
+
});
|
|
6619
|
+
}
|
|
6600
6620
|
|
|
6601
6621
|
// src/utils/numUtils.ts
|
|
6602
6622
|
var roundOrTruncate = (num, fixed = 2, round = false) => {
|
|
@@ -6907,7 +6927,7 @@ function store(app, option = {}) {
|
|
|
6907
6927
|
|
|
6908
6928
|
|
|
6909
6929
|
|
|
6910
|
-
exports.useDbStore = useDbStore; exports.useCommonStore = useCommonStore; exports.useMenuStore = useMenuStore; exports.store = store; exports.request = request; exports.useLoginHook = useLoginHook; exports.updateDocumentTitle = updateDocumentTitle; exports.filterMenu = filterMenu; exports.setupPermission = setupPermission; exports.
|
|
6930
|
+
exports.useDbStore = useDbStore; exports.useCommonStore = useCommonStore; exports.useMenuStore = useMenuStore; exports.store = store; exports.request = request; exports.useLoginHook = useLoginHook; exports.updateDocumentTitle = updateDocumentTitle; exports.filterMenu = filterMenu; exports.setupPermission = setupPermission; exports.duplicateRemovalCompleteSort = duplicateRemovalCompleteSort; exports.listSort = listSort; exports.roundOrTruncate = roundOrTruncate; exports.formatNumber = formatNumber; exports.parseFormattedNumber = parseFormattedNumber; exports.padZero = padZero; exports.getIntegerPart = getIntegerPart; exports.getDecimalPart = getDecimalPart; exports.numberToChinese = numberToChinese; exports.clamp = clamp; exports.isInteger = isInteger; exports.isNumber = isNumber; exports.prototypeInterceptor = prototypeInterceptor; exports.timeFix = timeFix; exports.welcome = welcome; exports.encryptPwd = encryptPwd; exports.jsonp = jsonp; exports.createFunctionalComponent = createFunctionalComponent;
|
|
6911
6931
|
/*! Bundled license information:
|
|
6912
6932
|
|
|
6913
6933
|
lodash/lodash.js:
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
__toESM
|
|
4
4
|
} from "./chunk-6DZX6EAA.mjs";
|
|
5
5
|
|
|
6
|
-
// ../node_modules/.pnpm/lodash@4.17.
|
|
6
|
+
// ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js
|
|
7
7
|
var require_lodash = __commonJS({
|
|
8
|
-
"../node_modules/.pnpm/lodash@4.17.
|
|
8
|
+
"../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js"(exports, module) {
|
|
9
9
|
(function() {
|
|
10
10
|
var undefined2;
|
|
11
|
-
var VERSION = "4.17.
|
|
11
|
+
var VERSION = "4.17.23";
|
|
12
12
|
var LARGE_ARRAY_SIZE = 200;
|
|
13
13
|
var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
|
|
14
14
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
@@ -1936,8 +1936,28 @@ var require_lodash = __commonJS({
|
|
|
1936
1936
|
}
|
|
1937
1937
|
function baseUnset(object, path) {
|
|
1938
1938
|
path = castPath(path, object);
|
|
1939
|
-
|
|
1940
|
-
|
|
1939
|
+
var index = -1, length = path.length;
|
|
1940
|
+
if (!length) {
|
|
1941
|
+
return true;
|
|
1942
|
+
}
|
|
1943
|
+
var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
|
|
1944
|
+
while (++index < length) {
|
|
1945
|
+
var key = path[index];
|
|
1946
|
+
if (typeof key !== "string") {
|
|
1947
|
+
continue;
|
|
1948
|
+
}
|
|
1949
|
+
if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) {
|
|
1950
|
+
return false;
|
|
1951
|
+
}
|
|
1952
|
+
if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
|
|
1953
|
+
if (isRootPrimitive && index === 0) {
|
|
1954
|
+
continue;
|
|
1955
|
+
}
|
|
1956
|
+
return false;
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
var obj = parent(object, path);
|
|
1960
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
1941
1961
|
}
|
|
1942
1962
|
function baseUpdate(object, path, updater, customizer) {
|
|
1943
1963
|
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
|
@@ -6551,28 +6571,6 @@ async function addVersion({ to, next, version }) {
|
|
|
6551
6571
|
}
|
|
6552
6572
|
|
|
6553
6573
|
// src/utils/dateUtils.ts
|
|
6554
|
-
function listSort(arr, key = "no", callback) {
|
|
6555
|
-
return arr.sort((a, b) => {
|
|
6556
|
-
if (callback && typeof callback === "function") {
|
|
6557
|
-
callback(a);
|
|
6558
|
-
callback(b);
|
|
6559
|
-
}
|
|
6560
|
-
const aParts = a[key].toString().split(/(\d+)/).filter(Boolean);
|
|
6561
|
-
const bParts = b[key].toString().split(/(\d+)/).filter(Boolean);
|
|
6562
|
-
for (let i = 0; i < Math.min(aParts.length, bParts.length); i++) {
|
|
6563
|
-
if (aParts[i] !== bParts[i]) {
|
|
6564
|
-
const aIsNum = /^\d+$/.test(aParts[i]);
|
|
6565
|
-
const bIsNum = /^\d+$/.test(bParts[i]);
|
|
6566
|
-
if (aIsNum && bIsNum) {
|
|
6567
|
-
return parseInt(aParts[i], 10) - parseInt(bParts[i], 10);
|
|
6568
|
-
} else {
|
|
6569
|
-
return aParts[i].localeCompare(bParts[i]);
|
|
6570
|
-
}
|
|
6571
|
-
}
|
|
6572
|
-
}
|
|
6573
|
-
return aParts.length - bParts.length;
|
|
6574
|
-
});
|
|
6575
|
-
}
|
|
6576
6574
|
function duplicateRemovalCompleteSort(months) {
|
|
6577
6575
|
if (months.length === 0) {
|
|
6578
6576
|
return [];
|
|
@@ -6597,6 +6595,28 @@ function duplicateRemovalCompleteSort(months) {
|
|
|
6597
6595
|
}
|
|
6598
6596
|
return allMonths;
|
|
6599
6597
|
}
|
|
6598
|
+
function listSort(arr, key = "no", callback) {
|
|
6599
|
+
return arr.sort((a, b) => {
|
|
6600
|
+
if (callback && typeof callback === "function") {
|
|
6601
|
+
callback(a);
|
|
6602
|
+
callback(b);
|
|
6603
|
+
}
|
|
6604
|
+
const aParts = a[key].toString().split(/(\d+)/).filter(Boolean);
|
|
6605
|
+
const bParts = b[key].toString().split(/(\d+)/).filter(Boolean);
|
|
6606
|
+
for (let i = 0; i < Math.min(aParts.length, bParts.length); i++) {
|
|
6607
|
+
if (aParts[i] !== bParts[i]) {
|
|
6608
|
+
const aIsNum = /^\d+$/.test(aParts[i]);
|
|
6609
|
+
const bIsNum = /^\d+$/.test(bParts[i]);
|
|
6610
|
+
if (aIsNum && bIsNum) {
|
|
6611
|
+
return parseInt(aParts[i], 10) - parseInt(bParts[i], 10);
|
|
6612
|
+
} else {
|
|
6613
|
+
return aParts[i].localeCompare(bParts[i]);
|
|
6614
|
+
}
|
|
6615
|
+
}
|
|
6616
|
+
}
|
|
6617
|
+
return aParts.length - bParts.length;
|
|
6618
|
+
});
|
|
6619
|
+
}
|
|
6600
6620
|
|
|
6601
6621
|
// src/utils/numUtils.ts
|
|
6602
6622
|
var roundOrTruncate = (num, fixed = 2, round = false) => {
|
|
@@ -6889,8 +6909,8 @@ export {
|
|
|
6889
6909
|
updateDocumentTitle,
|
|
6890
6910
|
filterMenu,
|
|
6891
6911
|
setupPermission,
|
|
6892
|
-
listSort,
|
|
6893
6912
|
duplicateRemovalCompleteSort,
|
|
6913
|
+
listSort,
|
|
6894
6914
|
roundOrTruncate,
|
|
6895
6915
|
formatNumber,
|
|
6896
6916
|
parseFormattedNumber,
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ export { FormState, clamp, createFunctionalComponent, curlParams, duplicateRemov
|
|
|
2
2
|
export { M as MenuItem, f as filterMenu, u as updateDocumentTitle } from './index-CVmrbYyU.mjs';
|
|
3
3
|
export { createBaseViteConfig } from './vite-config/index.mjs';
|
|
4
4
|
export { MenuState, store, useCommonStore, useDbStore, useMenuStore } from './stores/index.mjs';
|
|
5
|
-
export {
|
|
5
|
+
export { createUnoConfig } from './uno-config/index.mjs';
|
|
6
6
|
export { AxiosResponse } from 'axios';
|
|
7
7
|
import 'vue';
|
|
8
8
|
import 'vue-router';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { FormState, clamp, createFunctionalComponent, curlParams, duplicateRemov
|
|
|
2
2
|
export { M as MenuItem, f as filterMenu, u as updateDocumentTitle } from './index-CVmrbYyU.js';
|
|
3
3
|
export { createBaseViteConfig } from './vite-config/index.js';
|
|
4
4
|
export { MenuState, store, useCommonStore, useDbStore, useMenuStore } from './stores/index.js';
|
|
5
|
-
export {
|
|
5
|
+
export { createUnoConfig } from './uno-config/index.js';
|
|
6
6
|
export { AxiosResponse } from 'axios';
|
|
7
7
|
import 'vue';
|
|
8
8
|
import 'vue-router';
|
package/dist/index.js
CHANGED
|
@@ -29,10 +29,10 @@ var _chunk3YUIFF3Jjs = require('./chunk-3YUIFF3J.js');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkWHSFNF75js = require('./chunk-WHSFNF75.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkBEO5FVOBjs = require('./chunk-BEO5FVOB.js');
|
|
36
36
|
require('./chunk-QGM4M3NI.js');
|
|
37
37
|
|
|
38
38
|
|
|
@@ -64,4 +64,4 @@ require('./chunk-QGM4M3NI.js');
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
exports.clamp =
|
|
67
|
+
exports.clamp = _chunkWHSFNF75js.clamp; exports.createBaseViteConfig = _chunkBEO5FVOBjs.createBaseViteConfig; exports.createFunctionalComponent = _chunkWHSFNF75js.createFunctionalComponent; exports.createUnoConfig = _chunk3YUIFF3Jjs.createUnoConfig; exports.duplicateRemovalCompleteSort = _chunkWHSFNF75js.duplicateRemovalCompleteSort; exports.encryptPwd = _chunkWHSFNF75js.encryptPwd; exports.filterMenu = _chunkWHSFNF75js.filterMenu; exports.formatNumber = _chunkWHSFNF75js.formatNumber; exports.getDecimalPart = _chunkWHSFNF75js.getDecimalPart; exports.getIntegerPart = _chunkWHSFNF75js.getIntegerPart; exports.isInteger = _chunkWHSFNF75js.isInteger; exports.isNumber = _chunkWHSFNF75js.isNumber; exports.jsonp = _chunkWHSFNF75js.jsonp; exports.listSort = _chunkWHSFNF75js.listSort; exports.numberToChinese = _chunkWHSFNF75js.numberToChinese; exports.padZero = _chunkWHSFNF75js.padZero; exports.parseFormattedNumber = _chunkWHSFNF75js.parseFormattedNumber; exports.prototypeInterceptor = _chunkWHSFNF75js.prototypeInterceptor; exports.request = _chunkWHSFNF75js.request; exports.roundOrTruncate = _chunkWHSFNF75js.roundOrTruncate; exports.setupPermission = _chunkWHSFNF75js.setupPermission; exports.store = _chunkWHSFNF75js.store; exports.timeFix = _chunkWHSFNF75js.timeFix; exports.updateDocumentTitle = _chunkWHSFNF75js.updateDocumentTitle; exports.useCommonStore = _chunkWHSFNF75js.useCommonStore; exports.useDbStore = _chunkWHSFNF75js.useDbStore; exports.useLoginHook = _chunkWHSFNF75js.useLoginHook; exports.useMenuStore = _chunkWHSFNF75js.useMenuStore; exports.welcome = _chunkWHSFNF75js.welcome;
|
package/dist/index.mjs
CHANGED
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
useLoginHook,
|
|
30
30
|
useMenuStore,
|
|
31
31
|
welcome
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZGEZYILN.mjs";
|
|
33
33
|
import {
|
|
34
34
|
createBaseViteConfig
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-STGVPPLP.mjs";
|
|
36
36
|
import "./chunk-6DZX6EAA.mjs";
|
|
37
37
|
export {
|
|
38
38
|
clamp,
|
package/dist/stores/index.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkWHSFNF75js = require('../chunk-WHSFNF75.js');
|
|
7
7
|
require('../chunk-QGM4M3NI.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.store =
|
|
13
|
+
exports.store = _chunkWHSFNF75js.store; exports.useCommonStore = _chunkWHSFNF75js.useCommonStore; exports.useDbStore = _chunkWHSFNF75js.useDbStore; exports.useMenuStore = _chunkWHSFNF75js.useMenuStore;
|
package/dist/stores/index.mjs
CHANGED
package/dist/utils/index.d.mts
CHANGED
|
@@ -49,14 +49,6 @@ declare const useLoginHook: (curl: Function, params: {
|
|
|
49
49
|
*/
|
|
50
50
|
declare function setupPermission(router: Router, useMenuStore: any, pages: any, useUserStore: any): void;
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* 清单排序函数,支持按指定字段进行自然排序
|
|
54
|
-
* @param arr 需要排序的数组
|
|
55
|
-
* @param key 排序依据的字段名,默认为'no'
|
|
56
|
-
* @param callback 排序前对每个元素执行的回调函数
|
|
57
|
-
* @returns 排序后的数组
|
|
58
|
-
*/
|
|
59
|
-
declare function listSort<T extends Record<string, any>>(arr: T[], key?: string, callback?: (item: T) => void): T[];
|
|
60
52
|
/**
|
|
61
53
|
* 月份去重、补齐、排序
|
|
62
54
|
* @param months - 包含月份信息的数组,每个元素应包含key属性,格式为'YYYY-MM'
|
|
@@ -69,6 +61,14 @@ declare function duplicateRemovalCompleteSort(months: Array<{
|
|
|
69
61
|
label: string;
|
|
70
62
|
align: string;
|
|
71
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* 清单排序函数,支持按指定字段进行自然排序
|
|
66
|
+
* @param arr 需要排序的数组
|
|
67
|
+
* @param key 排序依据的字段名,默认为'no'
|
|
68
|
+
* @param callback 排序前对每个元素执行的回调函数
|
|
69
|
+
* @returns 排序后的数组
|
|
70
|
+
*/
|
|
71
|
+
declare function listSort<T extends Record<string, any>>(arr: T[], key?: string, callback?: (item: T) => void): T[];
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* 截断或四舍五入数字到指定小数位数
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -49,14 +49,6 @@ declare const useLoginHook: (curl: Function, params: {
|
|
|
49
49
|
*/
|
|
50
50
|
declare function setupPermission(router: Router, useMenuStore: any, pages: any, useUserStore: any): void;
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* 清单排序函数,支持按指定字段进行自然排序
|
|
54
|
-
* @param arr 需要排序的数组
|
|
55
|
-
* @param key 排序依据的字段名,默认为'no'
|
|
56
|
-
* @param callback 排序前对每个元素执行的回调函数
|
|
57
|
-
* @returns 排序后的数组
|
|
58
|
-
*/
|
|
59
|
-
declare function listSort<T extends Record<string, any>>(arr: T[], key?: string, callback?: (item: T) => void): T[];
|
|
60
52
|
/**
|
|
61
53
|
* 月份去重、补齐、排序
|
|
62
54
|
* @param months - 包含月份信息的数组,每个元素应包含key属性,格式为'YYYY-MM'
|
|
@@ -69,6 +61,14 @@ declare function duplicateRemovalCompleteSort(months: Array<{
|
|
|
69
61
|
label: string;
|
|
70
62
|
align: string;
|
|
71
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* 清单排序函数,支持按指定字段进行自然排序
|
|
66
|
+
* @param arr 需要排序的数组
|
|
67
|
+
* @param key 排序依据的字段名,默认为'no'
|
|
68
|
+
* @param callback 排序前对每个元素执行的回调函数
|
|
69
|
+
* @returns 排序后的数组
|
|
70
|
+
*/
|
|
71
|
+
declare function listSort<T extends Record<string, any>>(arr: T[], key?: string, callback?: (item: T) => void): T[];
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* 截断或四舍五入数字到指定小数位数
|
package/dist/utils/index.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkWHSFNF75js = require('../chunk-WHSFNF75.js');
|
|
26
26
|
require('../chunk-QGM4M3NI.js');
|
|
27
27
|
|
|
28
28
|
|
|
@@ -48,4 +48,4 @@ require('../chunk-QGM4M3NI.js');
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
exports.clamp =
|
|
51
|
+
exports.clamp = _chunkWHSFNF75js.clamp; exports.createFunctionalComponent = _chunkWHSFNF75js.createFunctionalComponent; exports.duplicateRemovalCompleteSort = _chunkWHSFNF75js.duplicateRemovalCompleteSort; exports.encryptPwd = _chunkWHSFNF75js.encryptPwd; exports.filterMenu = _chunkWHSFNF75js.filterMenu; exports.formatNumber = _chunkWHSFNF75js.formatNumber; exports.getDecimalPart = _chunkWHSFNF75js.getDecimalPart; exports.getIntegerPart = _chunkWHSFNF75js.getIntegerPart; exports.isInteger = _chunkWHSFNF75js.isInteger; exports.isNumber = _chunkWHSFNF75js.isNumber; exports.jsonp = _chunkWHSFNF75js.jsonp; exports.listSort = _chunkWHSFNF75js.listSort; exports.numberToChinese = _chunkWHSFNF75js.numberToChinese; exports.padZero = _chunkWHSFNF75js.padZero; exports.parseFormattedNumber = _chunkWHSFNF75js.parseFormattedNumber; exports.prototypeInterceptor = _chunkWHSFNF75js.prototypeInterceptor; exports.request = _chunkWHSFNF75js.request; exports.roundOrTruncate = _chunkWHSFNF75js.roundOrTruncate; exports.setupPermission = _chunkWHSFNF75js.setupPermission; exports.timeFix = _chunkWHSFNF75js.timeFix; exports.updateDocumentTitle = _chunkWHSFNF75js.updateDocumentTitle; exports.useLoginHook = _chunkWHSFNF75js.useLoginHook; exports.welcome = _chunkWHSFNF75js.welcome;
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
|
+
import { UserConfig } from 'vite';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* 代理配置接口 - 定义代理路径前缀与目标服务地址的映射关系
|
|
@@ -14,6 +15,16 @@ type proxyConfigType = {
|
|
|
14
15
|
replaceFunction?: (path: string) => string;
|
|
15
16
|
};
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* 配置项
|
|
20
|
+
* @param port 端口 默认 3000
|
|
21
|
+
* @param plugins 插件
|
|
22
|
+
* @param proxy 代理
|
|
23
|
+
* @param showDevTools 是否显示开发工具
|
|
24
|
+
* @param enableOptimizeDeps 是否启用预构建优化
|
|
25
|
+
* @param baseUrl 请求根地址
|
|
26
|
+
* @param customConfig 自定义配置,会覆盖默认配置,详细配置项请参考 https://vitejs.dev/config/
|
|
27
|
+
*/
|
|
17
28
|
interface Options {
|
|
18
29
|
port?: number;
|
|
19
30
|
plugins?: any[];
|
|
@@ -21,6 +32,7 @@ interface Options {
|
|
|
21
32
|
showDevTools?: boolean;
|
|
22
33
|
enableOptimizeDeps?: boolean;
|
|
23
34
|
baseUrl?: string;
|
|
35
|
+
customConfig?: UserConfig;
|
|
24
36
|
}
|
|
25
37
|
/**
|
|
26
38
|
* 创建 vite 配置
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
|
+
import { UserConfig } from 'vite';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* 代理配置接口 - 定义代理路径前缀与目标服务地址的映射关系
|
|
@@ -14,6 +15,16 @@ type proxyConfigType = {
|
|
|
14
15
|
replaceFunction?: (path: string) => string;
|
|
15
16
|
};
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* 配置项
|
|
20
|
+
* @param port 端口 默认 3000
|
|
21
|
+
* @param plugins 插件
|
|
22
|
+
* @param proxy 代理
|
|
23
|
+
* @param showDevTools 是否显示开发工具
|
|
24
|
+
* @param enableOptimizeDeps 是否启用预构建优化
|
|
25
|
+
* @param baseUrl 请求根地址
|
|
26
|
+
* @param customConfig 自定义配置,会覆盖默认配置,详细配置项请参考 https://vitejs.dev/config/
|
|
27
|
+
*/
|
|
17
28
|
interface Options {
|
|
18
29
|
port?: number;
|
|
19
30
|
plugins?: any[];
|
|
@@ -21,6 +32,7 @@ interface Options {
|
|
|
21
32
|
showDevTools?: boolean;
|
|
22
33
|
enableOptimizeDeps?: boolean;
|
|
23
34
|
baseUrl?: string;
|
|
35
|
+
customConfig?: UserConfig;
|
|
24
36
|
}
|
|
25
37
|
/**
|
|
26
38
|
* 创建 vite 配置
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBEO5FVOBjs = require('../chunk-BEO5FVOB.js');
|
|
4
4
|
require('../chunk-QGM4M3NI.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.createBaseViteConfig =
|
|
7
|
+
exports.createBaseViteConfig = _chunkBEO5FVOBjs.createBaseViteConfig;
|