Files
learning-system-mobile/main.js
2022-05-29 18:59:24 +08:00

41 lines
751 B
JavaScript

import App from './App'
import store from './store/index.js'
// 引入uview
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
//全局配置
import config from './config/index.js'
Vue.prototype.$config = config
//高亮显示
Vue.prototype.$keywordActiveShow=function(str,keyword){
if(!str||str.indexOf(keyword)===-1||keyword==''){
return str
}
return str.replace(keyword,`<span style="color:#FF8E00">${keyword}</span>`)
}
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
store,
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
store,
app
}
}
// #endif