mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 17:36:45 +08:00
41 lines
751 B
JavaScript
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
|