升级uview-ui至2.0

This commit is contained in:
aixianling
2021-11-17 17:34:44 +08:00
parent eea22bacc7
commit 6df18e4f9b
148 changed files with 22 additions and 28429 deletions

View File

@@ -3,9 +3,9 @@ import App from './App';
import store from './store';
import axios from './common/axios';
import utils from './common/util';
import dayjs from 'dayjs';
import mixin from './uview/libs/mixin/mixin';
import ui from 'uview-ui'
Vue.use(ui)
Vue.config.productionTip = false;
Vue.prototype.$store = store;
//初始化接口工具类
@@ -13,26 +13,12 @@ Vue.prototype.$http = axios;
Vue.prototype.$cdn = 'https://cdn.cunwuyun.cn/dvcp/h5/';
Vue.prototype.imgHomeUrl = 'https://cdn.cunwuyun.cn/dvcp/h5/home/';
Vue.prototype.imgOtherUrl = 'https://cdn.cunwuyun.cn/dvcp/h5/other/';
Vue.prototype.$formatName = (name) => {
if (name == undefined) {
return;
}
return name.substr(name.length - 2, name.length > 2 ? name.length - 1 : name.length);
};
Object.keys(utils).map((e) => (Vue.prototype['$' + e] = utils[e]));
let relativeTime = require('dayjs/plugin/relativeTime');
require('dayjs/locale/zh-cn');
let dayjs_plugin_duration = require('dayjs/plugin/duration');
dayjs.extend(dayjs_plugin_duration);
dayjs.extend(relativeTime);
Vue.prototype.$dayjs = dayjs;
Vue.mixin(mixin);
App.mpType = 'app';
process.env.NODE_ENV == 'development' && new VConsole();
const app = new Vue({
store,
...App
store,
...App
});
app.$mount();