chore: element plus 2.9.0
This commit is contained in:
parent
d631d46ab2
commit
9f8e1beafe
14
package.json
14
package.json
@ -18,7 +18,7 @@
|
|||||||
"@element-plus/icons-vue": "2.3.1",
|
"@element-plus/icons-vue": "2.3.1",
|
||||||
"axios": "1.7.8",
|
"axios": "1.7.8",
|
||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"element-plus": "2.8.8",
|
"element-plus": "2.9.0",
|
||||||
"js-cookie": "3.0.5",
|
"js-cookie": "3.0.5",
|
||||||
"lodash-es": "4.17.21",
|
"lodash-es": "4.17.21",
|
||||||
"mitt": "3.0.1",
|
"mitt": "3.0.1",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
"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",
|
||||||
"pinia": "2.2.7",
|
"pinia": "2.2.8",
|
||||||
"screenfull": "6.0.2",
|
"screenfull": "6.0.2",
|
||||||
"vue": "3.5.13",
|
"vue": "3.5.13",
|
||||||
"vue-router": "4.5.0",
|
"vue-router": "4.5.0",
|
||||||
@ -41,20 +41,20 @@
|
|||||||
"@vitejs/plugin-vue": "5.2.1",
|
"@vitejs/plugin-vue": "5.2.1",
|
||||||
"@vitejs/plugin-vue-jsx": "4.1.1",
|
"@vitejs/plugin-vue-jsx": "4.1.1",
|
||||||
"@vue/test-utils": "2.4.6",
|
"@vue/test-utils": "2.4.6",
|
||||||
"eslint": "9.15.0",
|
"eslint": "9.16.0",
|
||||||
"eslint-plugin-format": "0.1.2",
|
"eslint-plugin-format": "0.1.3",
|
||||||
"husky": "9.1.7",
|
"husky": "9.1.7",
|
||||||
"jsdom": "25.0.1",
|
"jsdom": "25.0.1",
|
||||||
"lint-staged": "15.2.10",
|
"lint-staged": "15.2.10",
|
||||||
"sass": "1.78.0",
|
"sass": "1.78.0",
|
||||||
"typescript": "5.6.3",
|
"typescript": "5.6.3",
|
||||||
"unocss": "0.64.1",
|
"unocss": "0.65.0",
|
||||||
"unplugin-auto-import": "0.18.6",
|
"unplugin-auto-import": "0.18.6",
|
||||||
"unplugin-svg-component": "0.10.4",
|
"unplugin-svg-component": "0.10.4",
|
||||||
"unplugin-vue-components": "0.27.5",
|
"unplugin-vue-components": "0.27.5",
|
||||||
"vite": "6.0.1",
|
"vite": "6.0.2",
|
||||||
"vite-svg-loader": "5.1.0",
|
"vite-svg-loader": "5.1.0",
|
||||||
"vitest": "2.1.6",
|
"vitest": "2.1.7",
|
||||||
"vue-tsc": "2.1.10"
|
"vue-tsc": "2.1.10"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
1316
pnpm-lock.yaml
generated
1316
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
16
src/App.vue
16
src/App.vue
@ -1,26 +1,20 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useGreyAndColorWeakness } from "@@/composables/useGreyAndColorWeakness"
|
import { useGreyAndColorWeakness } from "@@/composables/useGreyAndColorWeakness"
|
||||||
|
import { usePany } from "@@/composables/usePany"
|
||||||
import { useTheme } from "@@/composables/useTheme"
|
import { useTheme } from "@@/composables/useTheme"
|
||||||
import zhCn from "element-plus/es/locale/lang/zh-cn" // Element Plus 中文包
|
import zhCn from "element-plus/es/locale/lang/zh-cn" // Element Plus 中文包
|
||||||
|
|
||||||
const { initTheme } = useTheme()
|
const { initTheme } = useTheme()
|
||||||
const { initGreyAndColorWeakness } = useGreyAndColorWeakness()
|
const { initGreyAndColorWeakness } = useGreyAndColorWeakness()
|
||||||
|
const { initStarNotification, initStoreNotification } = usePany()
|
||||||
|
|
||||||
// 初始化主题
|
// 初始化主题
|
||||||
initTheme()
|
initTheme()
|
||||||
|
|
||||||
// 初始化灰色模式和色弱模式
|
// 初始化灰色模式和色弱模式
|
||||||
initGreyAndColorWeakness()
|
initGreyAndColorWeakness()
|
||||||
|
// 初始化通知
|
||||||
// 作者小心思
|
initStarNotification()
|
||||||
ElNotification({
|
initStoreNotification()
|
||||||
title: "Hello",
|
|
||||||
type: "success",
|
|
||||||
dangerouslyUseHTMLString: true,
|
|
||||||
message: "<a style='color: teal' target='_blank' href='https://github.com/un-pany/v3-admin-vite'>小项目获取 star 不易,如果你喜欢这个项目的话,欢迎点击这里支持一个 star !这是作者持续维护的唯一动力(小声:毕竟是免费的)</a>",
|
|
||||||
duration: 0,
|
|
||||||
position: "bottom-right"
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
42
src/common/composables/usePany.ts
Normal file
42
src/common/composables/usePany.ts
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
function initStarNotification() {
|
||||||
|
setTimeout(() => {
|
||||||
|
ElNotification({
|
||||||
|
title: "为爱发电!",
|
||||||
|
type: "success",
|
||||||
|
message: h(
|
||||||
|
"div",
|
||||||
|
null,
|
||||||
|
[
|
||||||
|
h("div", null, "所有源码均免费开源,如果对你有帮助,欢迎点个 Star 支持一下!"),
|
||||||
|
h("a", { style: "color: teal", target: "_blank", href: "https://github.com/un-pany/v3-admin-vite" }, "点击传送")
|
||||||
|
]
|
||||||
|
),
|
||||||
|
duration: 0,
|
||||||
|
position: "bottom-right"
|
||||||
|
})
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
function initStoreNotification() {
|
||||||
|
setTimeout(() => {
|
||||||
|
ElNotification({
|
||||||
|
title: "懒人服务?",
|
||||||
|
type: "warning",
|
||||||
|
message: h(
|
||||||
|
"div",
|
||||||
|
null,
|
||||||
|
[
|
||||||
|
h("div", null, "不想自己动手,但想移除 TS 或其他模块?也有懒人套餐!"),
|
||||||
|
h("a", { style: "color: teal", target: "_blank", href: "https://github.com/un-pany/v3-admin-vite" }, "点击逛逛")
|
||||||
|
]
|
||||||
|
),
|
||||||
|
duration: 0,
|
||||||
|
position: "bottom-right"
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 作者的小心思 */
|
||||||
|
export function usePany() {
|
||||||
|
return { initStarNotification, initStoreNotification }
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user