1 Star 0 Fork 14

zxm0317/chat-uniapp

forked from JavaDog/chat-uniapp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.js 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
JavaDog 提交于 2022-10-24 16:10 . v1.0.0版本更新
import App from './App'
import Vue from 'vue'
import uView from 'uview-ui'
import moment from 'moment';
import api from "@/common/api"
import config from '@/common/config/env.js'
import store from '@/store/index.js'
import tips from '@/common/util/tips.js'
import ws from '@/common/websocket/ws.js'
import {
router,
RouterMount
} from '@/router'
// 注册全局组件
import navbar from '@/components/navbar/navbar.vue'
import msg from '@/components/msg/msg.vue'
import inputBox from '@/components/inputBox/inputBox.vue'
Vue.component("navbar",navbar)
Vue.component("msg",msg)
Vue.component("inputBox",inputBox)
Vue.config.productionTip = false
Vue.use(router)
Vue.use(uView)
App.mpType = 'app'
moment.locale('zh-cn');
Vue.prototype.$moment = moment;
Vue.prototype.$api = api;
Vue.prototype.$config = config;
Vue.prototype.$tips = tips;
Vue.prototype.$store = store;
Vue.prototype.$ws = ws;
Vue.prototype.$EventBus = new Vue();
const app = new Vue({
store,
...App
})
// uview-request
require('@/common/http/request.js')(app)
// #ifdef H5
RouterMount(app, router, '#app')
// #endif
// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/9ii/chat-uniapp.git
git@gitee.com:9ii/chat-uniapp.git
9ii
chat-uniapp
chat-uniapp
master

搜索帮助