mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
优化
This commit is contained in:
parent
3e2060dd8c
commit
7e40322207
@ -6,8 +6,8 @@ settings:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@cool-vue/crud':
|
'@cool-vue/crud':
|
||||||
specifier: ^7.1.26
|
specifier: ^7.1.27
|
||||||
version: 7.1.26(typescript@5.4.2)
|
version: 7.1.27(typescript@5.4.2)
|
||||||
'@element-plus/icons-vue':
|
'@element-plus/icons-vue':
|
||||||
specifier: ^2.3.1
|
specifier: ^2.3.1
|
||||||
version: 2.3.1(vue@3.4.15)
|
version: 2.3.1(vue@3.4.15)
|
||||||
@ -86,8 +86,8 @@ dependencies:
|
|||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@cool-vue/vite-plugin':
|
'@cool-vue/vite-plugin':
|
||||||
specifier: ^7.1.6
|
specifier: ^7.1.7
|
||||||
version: 7.1.6
|
version: 7.1.7
|
||||||
'@rushstack/eslint-patch':
|
'@rushstack/eslint-patch':
|
||||||
specifier: ^1.8.0
|
specifier: ^1.8.0
|
||||||
version: 1.8.0
|
version: 1.8.0
|
||||||
@ -529,8 +529,8 @@ packages:
|
|||||||
'@babel/helper-validator-identifier': 7.24.7
|
'@babel/helper-validator-identifier': 7.24.7
|
||||||
to-fast-properties: 2.0.0
|
to-fast-properties: 2.0.0
|
||||||
|
|
||||||
/@cool-vue/crud@7.1.26(typescript@5.4.2):
|
/@cool-vue/crud@7.1.27(typescript@5.4.2):
|
||||||
resolution: {integrity: sha512-v8X32My5iGqt048FWkthMxVdOY5kTf2MVLIHyr8NoCEbSFN4vzDSbLE6TWgQMHd62GCDxlB9e/QQGCc55CZGcA==}
|
resolution: {integrity: sha512-S/Z6Q4Aw3lshVevpizQ5Z4DarXJdkBTEZFSOlLEnBkhzBLGFBzLiNI42vkm9Ru0mcV+WNic5RJ8C99/LUhC/6g==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@element-plus/icons-vue': 2.3.1(vue@3.4.15)
|
'@element-plus/icons-vue': 2.3.1(vue@3.4.15)
|
||||||
array.prototype.flat: 1.3.2
|
array.prototype.flat: 1.3.2
|
||||||
@ -544,8 +544,8 @@ packages:
|
|||||||
- typescript
|
- typescript
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@cool-vue/vite-plugin@7.1.6:
|
/@cool-vue/vite-plugin@7.1.7:
|
||||||
resolution: {integrity: sha512-nKh0YQd6yP6aRwOcPOAxN81+HJ+XR9NrF5KKaegK36FLrcHW2gnf2+qtqnbd+SFkm6BTM0iojPedW6cYU0aREg==}
|
resolution: {integrity: sha512-pSTXigNa2HrW7ps4EFEqI18KzZh19WEoDZlV8l84DDOJHV4jjaeSKbBpur/aCWBIogeZOaMCiboCCytfSUGYCQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/compiler-sfc': 3.4.34
|
'@vue/compiler-sfc': 3.4.34
|
||||||
axios: 1.7.2
|
axios: 1.7.2
|
||||||
@ -1388,7 +1388,7 @@ packages:
|
|||||||
'@babel/helper-module-imports': 7.22.15
|
'@babel/helper-module-imports': 7.22.15
|
||||||
'@babel/helper-plugin-utils': 7.24.8
|
'@babel/helper-plugin-utils': 7.24.8
|
||||||
'@babel/parser': 7.24.8
|
'@babel/parser': 7.24.8
|
||||||
'@vue/compiler-sfc': 3.4.15
|
'@vue/compiler-sfc': 3.4.34
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vue/compiler-core@3.4.15:
|
/@vue/compiler-core@3.4.15:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { type App, type Directive } from "vue";
|
import { type App, type Directive } from "vue";
|
||||||
import { assign, chain, isFunction } from "lodash-es";
|
import { assign, isFunction, orderBy } from "lodash-es";
|
||||||
import { filename } from "../utils";
|
import { filename } from "../utils";
|
||||||
import { module } from "../module";
|
import { module } from "../module";
|
||||||
import { hmr } from "../hooks";
|
import { hmr } from "../hooks";
|
||||||
@ -63,8 +63,8 @@ for (const i in files) {
|
|||||||
|
|
||||||
// 创建
|
// 创建
|
||||||
export function createModule(app: App) {
|
export function createModule(app: App) {
|
||||||
const list = chain(module.list)
|
// 排序
|
||||||
.map((e) => {
|
module.list.forEach((e) => {
|
||||||
const d = isFunction(e.value) ? e.value(app) : e.value;
|
const d = isFunction(e.value) ? e.value(app) : e.value;
|
||||||
|
|
||||||
if (d) {
|
if (d) {
|
||||||
@ -74,11 +74,9 @@ export function createModule(app: App) {
|
|||||||
if (!d.order) {
|
if (!d.order) {
|
||||||
e.order = 0;
|
e.order = 0;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return e;
|
const list = orderBy(module.list, "order", "desc").map((e) => {
|
||||||
})
|
|
||||||
.orderBy("order", "desc")
|
|
||||||
.map((e) => {
|
|
||||||
// 初始化
|
// 初始化
|
||||||
e.install?.(app, e.options);
|
e.install?.(app, e.options);
|
||||||
|
|
||||||
@ -99,8 +97,7 @@ export function createModule(app: App) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
})
|
});
|
||||||
.value();
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// 模块列表
|
// 模块列表
|
||||||
|
@ -35,6 +35,7 @@ async function refresh() {
|
|||||||
color: "#2c3142"
|
color: "#2c3142"
|
||||||
})
|
})
|
||||||
.then(({ captchaId, data }) => {
|
.then(({ captchaId, data }) => {
|
||||||
|
if (data) {
|
||||||
if (data.includes(";base64,")) {
|
if (data.includes(";base64,")) {
|
||||||
base64.value = data;
|
base64.value = data;
|
||||||
} else {
|
} else {
|
||||||
@ -47,6 +48,9 @@ async function refresh() {
|
|||||||
svg,
|
svg,
|
||||||
captchaId
|
captchaId
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage.error("验证码获取失败");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
ElMessage.error(err.message);
|
ElMessage.error(err.message);
|
||||||
|
File diff suppressed because one or more lines are too long
@ -56,9 +56,8 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
esbuild: {
|
esbuild: {
|
||||||
drop: isDev ? [] : ["console", "debugger"]
|
// drop: isDev ? [] : ["console", "debugger"]
|
||||||
},
|
},
|
||||||
|
|
||||||
build: {
|
build: {
|
||||||
minify: "esbuild",
|
minify: "esbuild",
|
||||||
// terserOptions: {
|
// terserOptions: {
|
||||||
|
106
vite.config.mts.timestamp-1722222863909-a8e85574a7f33.mjs
Normal file
106
vite.config.mts.timestamp-1722222863909-a8e85574a7f33.mjs
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user