50 lines
967 B
JavaScript
50 lines
967 B
JavaScript
import App from './App'
|
|
import uView from '@/uni_modules/uview-ui'
|
|
import store from './store/index'
|
|
Vue.use(uView);
|
|
import myStorage from '@/utils/myStorage.js'
|
|
Vue.prototype.$myStorage = myStorage;
|
|
Vue.prototype.$store = store;
|
|
|
|
Vue.mixin({
|
|
methods: {
|
|
setTabBarIndex(index) {
|
|
if (typeof this.$mp.page.getTabBar === 'function' && this.$mp.page.getTabBar()) {
|
|
this.$mp.page.getTabBar().setData({
|
|
selected: index
|
|
})
|
|
}
|
|
},
|
|
setTabBarList(tabBarData) {
|
|
if (typeof this.$mp.page.getTabBar === 'function' && this.$mp.page.getTabBar()) {
|
|
this.$mp.page.getTabBar().setData({
|
|
list: tabBarData
|
|
})
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
|
|
// #ifndef VUE3
|
|
import Vue from 'vue'
|
|
import './uni.promisify.adaptor'
|
|
Vue.config.productionTip = false
|
|
App.mpType = 'app'
|
|
const app = new Vue({
|
|
...App
|
|
})
|
|
app.$mount()
|
|
// #endif
|
|
|
|
// #ifdef VUE3
|
|
import {
|
|
createSSRApp
|
|
} from 'vue'
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
return {
|
|
app
|
|
}
|
|
}
|
|
// #endif
|