feat: 添加 vite-plugin-vue-layouts 插件并更新 vite 版本至 6.0.5

This commit is contained in:
严浩
2024-12-25 00:06:46 +08:00
parent 400de0f222
commit bfbeb326bc
14 changed files with 122 additions and 64 deletions

24
src/plugins/primevue.ts Normal file
View File

@ -0,0 +1,24 @@
/**
* 需要把 <DynamicDialog /> <ConfirmDialog /> <Toast /> 放在 App.vue 的 template 中
*/
import Aura from '@primevue/themes/aura';
import zhCN from 'primelocale/zh-CN.json';
import PrimeVue from 'primevue/config';
export function install({ app }: { app: import('vue').App<Element> }) {
app.use(PrimeVue, {
locale: {
...zhCN['zh-CN'],
noFileChosenMessage: '未选择文件',
pending: '待上传',
completed: '已上传',
}, // usePrimeVue().config.locale
theme: { preset: Aura },
options: {
prefix: 'p',
darkModeSelector: 'system',
cssLayer: false,
},
});
}