feat: 更新 index.html 和样式文件,优化样式导入和结构
This commit is contained in:
19
src/plugins/vue-i18n/index.ts
Normal file
19
src/plugins/vue-i18n/index.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { createI18n } from 'vue-i18n';
|
||||
|
||||
/* https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n#static-bundle-importing
|
||||
* All i18n resources specified in the plugin `include` option can be loaded
|
||||
* at once using the import syntax
|
||||
*/
|
||||
import messages from '@intlify/unplugin-vue-i18n/messages';
|
||||
console.debug(`messages :>> `, messages);
|
||||
|
||||
export function setupVueI18n(app: import('vue').App) {
|
||||
app.use(
|
||||
// https://vue-i18n.intlify.dev/guide/essentials/started.html#registering-the-i18n-plugin
|
||||
createI18n({
|
||||
legacy: false, // you must set `false`, to use Composition API
|
||||
locale: navigator.language,
|
||||
messages,
|
||||
}),
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user