1 Star 1 Fork 1

曹锐群/小鹿线-uniapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.js 910 Bytes
一键复制 编辑 原始数据 按行查看 历史
曹锐群 提交于 2024-05-04 22:57 . Initial commit
import App from './App'
import store from '@/store'
//导航守卫
import {router,RouterMount} from './router.js' //路径换成自己的
Vue.use(router)
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
store,
...App
})
app.$mount()
// #endif
import uView from '@/node_modules/uview-ui'
Vue.use(uView)
// 引入请求封装,将app参数传递到配置中
require('./utils/request.js')(app)
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif
// //v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// // #ifdef H5
// RouterMount(app,router,'#app')
// // #endif
// // #ifndef H5
// app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// // #endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/caoruiqun/xiaolu-line-uniapp.git
git@gitee.com:caoruiqun/xiaolu-line-uniapp.git
caoruiqun
xiaolu-line-uniapp
小鹿线-uniapp
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385