From de004b4e0b3dfbc529d3a486ca2e2441d5dff403 Mon Sep 17 00:00:00 2001 From: Frost-ZX Date: Sat, 31 Aug 2024 14:02:26 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=BC=95=E5=85=A5=20Lunisolar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main.js b/src/main.js index 9f21066..517ee34 100644 --- a/src/main.js +++ b/src/main.js @@ -3,8 +3,28 @@ import { router } from './router'; 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'; +// 加载 Lunisolar 语言包 +lunisolar.locale([ + lunisolarLang1, + lunisolarLang2, +], false); + +// 加载 Lunisolar 节日列表 +lunisolar.Markers.add(lunisolarFestivals, 'festivals'); + +// Lunisolar 全局配置 +lunisolar.config({ + isUTC: false, + lang: 'zh-cn', +}); + const app = createApp(App); app.use(router);