chore: 引入 Lunisolar

This commit is contained in:
2024-08-31 14:02:26 +08:00
parent e85166d1f7
commit de004b4e0b

View File

@@ -3,8 +3,28 @@ import { router } from './router';
import '@mdi/font/css/materialdesignicons.css'; import '@mdi/font/css/materialdesignicons.css';
import lunisolar from 'lunisolar';
import lunisolarLang1 from 'lunisolar/locale/en';
import lunisolarLang2 from 'lunisolar/locale/zh-cn';
import lunisolarFestivals from 'lunisolar/markers/festivals.zh-cn';
import App from './App.vue'; import App from './App.vue';
// 加载 Lunisolar 语言包
lunisolar.locale([
lunisolarLang1,
lunisolarLang2,
], false);
// 加载 Lunisolar 节日列表
lunisolar.Markers.add(lunisolarFestivals, 'festivals');
// Lunisolar 全局配置
lunisolar.config({
isUTC: false,
lang: 'zh-cn',
});
const app = createApp(App); const app = createApp(App);
app.use(router); app.use(router);