You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
669 B
33 lines
669 B
import App from './App'
|
|
import i18n from './lang/i18n'
|
|
import VueLazyload from 'vue-lazyload'
|
|
|
|
// 添加插件配置
|
|
Vue.use(VueLazyload, {
|
|
loading: '', // 图片加载过程中显示的占位图
|
|
error: '/static/home/shibai.png', // 图片加载失败时显示的占位图
|
|
attempt: 3 // 尝试加载次数
|
|
})
|
|
// Vue.use(VueLazyload)
|
|
// #ifndef VUE3
|
|
import Vue from 'vue'
|
|
Vue.config.productionTip = false
|
|
// Vue.use(VueLazyload)
|
|
App.mpType = 'app'
|
|
const app = new Vue({
|
|
i18n,
|
|
...App
|
|
})
|
|
app.$mount()
|
|
// #endif
|
|
|
|
|
|
// #ifdef VUE3
|
|
import {createSSRApp} from 'vue'
|
|
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
app.use(i18n)
|
|
return {app}
|
|
}
|
|
// #endif
|
|
|