smart-admin-h5

This commit is contained in:
zhuoda
2020-11-29 23:35:57 +08:00
parent fb33580397
commit 49da08dfc1
80 changed files with 8181 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
import * as Sentry from '@sentry/browser';
const SmartSentry = {};
SmartSentry.install = function(Vue, options) {
Vue.prototype.$smartSentry = {
captureException: (error) => {
console.error(error);
if (error.config && error.data && error && error.headers && error.request && error.status) {
return;
}
Sentry.captureException(error);
}
};
};
export default SmartSentry;

View File

@@ -0,0 +1,24 @@
let loader = null;
const SmartPlugin = {};
SmartPlugin.install = function(Vue, options) {
Vue.prototype.$smart = {
loading: (message) => {
if (loader) {
loader.hide();
}
loader = Vue.$loading.show({
// Optional parameters
lockScroll: true,
color: '#1989fa'
});
},
loadingClear: () => {
loader.hide();
}
};
};
export default SmartPlugin;

View File

@@ -0,0 +1,8 @@
// 按需全局引入 vant组件
import Vue from 'vue';
import { Button, List, Cell, Tabbar, TabbarItem } from 'vant';
Vue.use(Button);
Vue.use(Cell);
Vue.use(List);
Vue.use(Tabbar).use(TabbarItem);