38 lines
1008 B
JavaScript
38 lines
1008 B
JavaScript
/*
|
|
=================================================================================
|
|
* License: GPL-2.0 license
|
|
* Author: 众产® https://ciy.cn/code
|
|
* Version: 0.1.0
|
|
=================================================================================
|
|
支持i18n多语言、深色模式、通用css色系
|
|
在ciy.js中混入了常用函数库。自定义组件与页面均可调用。
|
|
app.* 系统函数
|
|
c.* 独立函数
|
|
this.* 页面函数
|
|
*/
|
|
import messages from './util/langload';
|
|
let lang = uni.getStorageSync("_lang");
|
|
if(!lang)
|
|
lang = uni.getLocale();
|
|
let i18nConfig = {
|
|
locale: lang,
|
|
silentTranslationWarn: true,
|
|
silentFallbackWarn: true,
|
|
messages
|
|
};
|
|
import App from './App';
|
|
import { createSSRApp } from 'vue';
|
|
import { createI18n } from 'vue-i18n';
|
|
import ciy from './util/ciy';
|
|
|
|
import './util/style.css';
|
|
import './prod.css';
|
|
const i18n = createI18n(i18nConfig);
|
|
export function createApp() {
|
|
const app = createSSRApp(App);
|
|
app.use(i18n);
|
|
app.use(ciy, App);
|
|
return {
|
|
app
|
|
};
|
|
} |