/* * @Date: 2022-01-19 10:08:26 * @LastEditors: JinxChen * @LastEditTime: 2023-02-26 14:40:46 * @FilePath: \TelpoH5FrontendWeb\src\main.js * @description: */ import Vue from "vue"; import 'amfe-flexible/index.js'; import App from "./App.vue"; import router from "./router"; import store from "./store"; import '@/assets/css/reset.scss'; import dayjs from 'dayjs'; // ui库按需引入 import 'vant/lib/index.css'; import { Button, Calendar, Cell, CellGroup, Checkbox, CheckboxGroup, Col, DatetimePicker, Dialog, Divider, Empty, Field, Form, Icon, Image, Lazyload, List, Loading, NavBar, NoticeBar, Notify, Overlay, Picker, Popup, PullRefresh, Radio, RadioGroup, Row, Slider, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Toast, } from 'vant'; //按需加载vant组件 Vue .use(Button) .use(Calendar) .use(Checkbox) .use(CheckboxGroup) .use(Cell) .use(CellGroup) .use(Col) .use(DatetimePicker) .use(Dialog) .use(Divider) .use(Empty) .use(Icon) .use(Image) .use(Form) .use(Field) .use(Lazyload) .use(List) .use(Loading) .use(NavBar) .use(NoticeBar) .use(Notify) .use(Overlay) .use(Picker) .use(Popup) .use(PullRefresh) .use(Radio) .use(RadioGroup) .use(Row) .use(Slider) .use(Swipe) .use(SwipeCell) .use(SwipeItem) .use(Switch) .use(Tab) .use(Tabbar) .use(TabbarItem) .use(Tabs) .use(Toast) Vue.config.productionTip = false; Vue.config.devtools = true; // 全局配置 loading Toast.setDefaultOptions('success', { duration: 1500, forbidClick: true, }); Toast.setDefaultOptions('loading', { duration: 0, forbidClick: true, }); Dialog.setDefaultOptions({ confirmButtonColor: "#3296fa", showCancelButton: false, }); Vue.config.productionTip = false; Vue.prototype.$dayjs = dayjs; Vue.prototype.$bus = new Vue(); new Vue({ router, store, render: (h) => h(App), }).$mount("#app");