59 lines
1.3 KiB
JavaScript
59 lines
1.3 KiB
JavaScript
/*
|
|
* @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
|
|
*/
|
|
import App from './App'
|
|
import messages from './locale/index'
|
|
import uviewPlus from '@/uni_modules/uview-plus'
|
|
// #ifndef MP-WEIXIN
|
|
import VueClipboard from 'vue-clipboard2'
|
|
// #endif
|
|
|
|
let i18nConfig = {
|
|
locale: uni.getLocale(),
|
|
messages
|
|
}
|
|
|
|
// #ifndef VUE3
|
|
import Vue from 'vue'
|
|
import VueI18n from 'vue-i18n'
|
|
|
|
import '@/uni_modules/uview-plus/theme.scss' // 引入uView的样式
|
|
|
|
// #ifndef MP-WEIXIN
|
|
Vue.use(VueClipboard);
|
|
// #endif
|
|
|
|
Vue.use(uviewPlus)
|
|
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)
|
|
// #ifndef MP-WEIXIN
|
|
app.use(VueClipboard);
|
|
// #endif
|
|
app.use(i18n)
|
|
app.use(uviewPlus)
|
|
return {
|
|
app
|
|
}
|
|
}
|
|
// #endif
|