// +----------------------------------------------------------------------
|
// | CMS [ CMS赋能开发者,助力企业发展 ]
|
// +----------------------------------------------------------------------
|
// | Copyright (c) 2016~2021 https://www.CMS.com All rights reserved.
|
// +----------------------------------------------------------------------
|
// | Licensed CMS并不是自由软件,未经许可不能去掉CMS相关版权
|
// +----------------------------------------------------------------------
|
// | Author: CMS Team <admin@CMS.com>
|
// +----------------------------------------------------------------------
|
|
import Vue from "vue";
|
import "@babel/polyfill";
|
// import 'babel-polyfill'
|
import "normalize.css/normalize.css"; // a modern alternative to CSS resets
|
import "./styles/element-variables.scss";
|
import "@/styles/index.scss"; // global css
|
import "@/assets/iconfont/iconfont";
|
import "@/assets/iconfont/iconfont.css";
|
import VueAwesomeSwiper from "vue-awesome-swiper";
|
import "swiper/dist/css/swiper.css";
|
import "vue-ydui/dist/ydui.base.css";
|
import {
|
parseTime,
|
resetForm,
|
addDateRange,
|
selectDictLabel,
|
selectDictLabels,
|
handleTree,
|
} from "@/utils/parsing";
|
// 懒加载
|
import VueLazyload from "vue-lazyload";
|
|
// import VConsole from "vconsole";
|
// const vConsole = new VConsole();
|
// vConsole.setOption("display", "box");
|
|
Vue.config.devtools = true;
|
import App from "./App";
|
import store from "./store";
|
import router from "./router";
|
import attrFrom from "./components/attrFrom";
|
import uploadPicture from "./components/uploadPicture/uploadFrom";
|
import goodListFrom from "./components/goodList/goodListFrom";
|
import couponFrom from "./components/couponList/couponFrom";
|
import articleFrom from "./components/articleList/articleFrom";
|
import UploadIndex from "@/components/uploadPicture/index.vue";
|
import UploadFile from "@/components/Upload/uploadFile.vue";
|
// import VueUeditorWrap from 'vue-ueditor-wrap'
|
import iconFrom from "./components/iconFrom";
|
import TimeSelect from "@/components/TimeSelect";
|
import dialog from "@/libs/dialog";
|
import scroll from "@/libs/loading";
|
import schema from "async-validator";
|
// 切勿更改 此组件为表单生成中使用的图片上传组件
|
import SelfUpload from "@/components/uploadPicture/forGenrator/index.vue";
|
import util from "@/utils/utils";
|
import modalAttr from "@/libs/modal-attr";
|
import modalIcon from "@/libs/modal-icon";
|
import { modalSure } from "@/libs/public";
|
import timeOptions from "@/libs/timeOptions";
|
import "./icons"; // icon
|
import "./permission"; // permission control
|
import "./utils/error-log"; // error integralLog
|
import * as filters from "./filters"; // global filters
|
import * as Auth from "@/libs/wechat";
|
import * as constants from "@/utils/constants.js";
|
import * as selfUtil from "@/utils/ZBKJIutil.js";
|
import plugins from "./plugins";
|
import directive from "./directive"; //directive
|
|
Vue.use(VueLazyload, {
|
preLoad: 1.3,
|
error: require("./assets/imgs/no.png"),
|
loading: require("./assets/imgs/moren.jpg"),
|
attempt: 1,
|
listenEvents: [
|
"scroll",
|
"wheel",
|
"mousewheel",
|
"resize",
|
"animationend",
|
"transitionend",
|
"touchmove",
|
],
|
});
|
|
Vue.use(uploadPicture);
|
Vue.use(goodListFrom);
|
Vue.use(couponFrom);
|
Vue.use(articleFrom);
|
Vue.use(VueAwesomeSwiper);
|
Vue.use(plugins);
|
Vue.use(directive);
|
|
Vue.component("attrFrom", attrFrom);
|
Vue.component("UploadIndex", UploadIndex);
|
Vue.component("SelfUpload", SelfUpload);
|
Vue.component("iconFrom", iconFrom);
|
Vue.component("uploadFile", UploadFile);
|
Vue.component("timeSelect", TimeSelect);
|
Vue.prototype.$modalSure = modalSure;
|
Vue.prototype.$modalAttr = modalAttr;
|
Vue.prototype.$modalIcon = modalIcon;
|
Vue.prototype.$dialog = dialog;
|
Vue.prototype.$scroll = scroll;
|
Vue.prototype.$wechat = Auth;
|
Vue.prototype.$util = util;
|
Vue.prototype.$constants = constants;
|
Vue.prototype.$selfUtil = selfUtil;
|
Vue.prototype.$timeOptions = timeOptions;
|
Vue.prototype.$validator = function (rule) {
|
return new schema(rule);
|
};
|
Vue.prototype.handleTree = handleTree;
|
Vue.prototype.parseTime = parseTime;
|
Vue.prototype.resetForm = resetForm;
|
|
// let cookieName = "VCONSOLE";
|
// let query = parseQuery();
|
// let urlSpread = query["spread"];
|
// let vconsole = query[cookieName.toLowerCase()];
|
// let md5CMS = "b14d1e9baeced9bb7525ab19ee35f2d2"; //CMS MD5 加密开启vconsole模式
|
// let md5UnCMS = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
|
|
// if (vconsole !== undefined) {
|
// if (vconsole === md5UnCMS && Cookies.has(cookieName))
|
// Cookies.remove(cookieName);
|
// } else vconsole = Cookies.get(cookieName);
|
|
// if (vconsole !== undefined && vconsole === md5CMS) {
|
// Cookies.set(cookieName, md5CMS, 3600);
|
// const module = () => import("vconsole");
|
// module().then((Module) => {
|
// new Module.default();
|
// });
|
// }
|
// // 自定义实现String 类型的replaceAll方法
|
// String.prototype.replaceAll = function (s1, s2) {
|
// return this.replace(new RegExp(s1, "gm"), s2);
|
// };
|
|
// Vue.use(Element, {
|
// size: Cookies.get("size") || "mini", // set element-ui default size
|
// });
|
|
// register global utility filters
|
Object.keys(filters).forEach((key) => {
|
Vue.filter(key, filters[key]);
|
});
|
|
Vue.config.productionTip = false;
|
|
new Vue({
|
el: "#app",
|
store,
|
render: (h) => h(App),
|
});
|