chore: refactor countdown logic and update utils4u auto imports
Some checks failed
/ build-and-deploy-to-vercel (push) Has been cancelled
/ depcheck (push) Successful in 1m42s
/ surge (push) Successful in 39s
/ playwright (push) Successful in 2m34s

This commit is contained in:
严浩
2025-02-08 10:39:36 +08:00
parent 1d5a387ae0
commit c465fd6fec
2 changed files with 12 additions and 3 deletions

View File

@ -77,7 +77,16 @@ export function Plugins() {
'@vueuse/core',
VueRouterAutoImports,
unheadVueComposablesImports,
createUtils4uAutoImports(['primevue']),
Object.assign(
createUtils4uAutoImports([
'primevue', // 参考重写 utils4u 的 createUtils4uAutoImports 的逻辑 https://github.com/unplugin/unplugin-auto-import/blob/main/src/presets/vueuse-core.ts
]),
{
'utils4u/vue-use': createUtils4uAutoImports(['primevue'])['utils4u/vue-use'].filter(
(item) => !['useCountdown'].includes(item.toString()), // FIXME: Duplicated imports "useCountdown", the one from "@vueuse/core" has been ignored and "utils4u/vue-use" is used
),
},
),
{
// add any other imports you were relying on
'vue-router/auto': ['useLink'],