Files
frontend-app/main.js
T

59 lines
1.3 KiB
JavaScript
Raw Normal View History

2025-11-19 00:03:45 +08:00
/*
* @Author: 秦彦祖 605893810@qq.com
* @Date: 2025-11-18 17:06:49
* @LastEditors: 秦彦祖 605893810@qq.com
* @LastEditTime: 2025-11-18 23:19:56
* @FilePath: /alpha-shopping/main.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
2025-02-28 16:19:58 +08:00
import App from './App'
2025-08-06 20:25:41 +08:00
import messages from './locale/index'
import uviewPlus from '@/uni_modules/uview-plus'
2025-11-19 00:03:45 +08:00
// #ifndef MP-WEIXIN
2025-11-16 18:30:50 +08:00
import VueClipboard from 'vue-clipboard2'
2025-11-19 00:03:45 +08:00
// #endif
2025-11-16 18:30:50 +08:00
2025-02-28 16:19:58 +08:00
let i18nConfig = {
locale: uni.getLocale(),
messages
}
// #ifndef VUE3
import Vue from 'vue'
2025-08-06 20:25:41 +08:00
import VueI18n from 'vue-i18n'
import '@/uni_modules/uview-plus/theme.scss' // 引入uView的样式
2025-03-20 08:46:07 +08:00
2025-11-19 00:03:45 +08:00
// #ifndef MP-WEIXIN
2025-11-16 18:30:50 +08:00
Vue.use(VueClipboard);
2025-11-19 00:03:45 +08:00
// #endif
Vue.use(uviewPlus)
2025-02-28 16:19:58 +08:00
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
i18n,
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
import { createI18n } from 'vue-i18n'
const i18n = createI18n(i18nConfig)
export function createApp() {
const app = createSSRApp(App)
2025-11-19 00:03:45 +08:00
// #ifndef MP-WEIXIN
2025-11-16 18:30:50 +08:00
app.use(VueClipboard);
2025-11-19 00:03:45 +08:00
// #endif
2025-08-06 20:25:41 +08:00
app.use(i18n)
app.use(uviewPlus)
2025-02-28 16:19:58 +08:00
return {
app
}
}
2025-08-06 20:25:41 +08:00
// #endif