2025-06-18 21:47:27 +08:00
|
|
|
import { createApp, defineComponent, h } from "vue";
|
|
|
|
|
import App from "./App.vue";
|
|
|
|
|
import router from "./router";
|
|
|
|
|
import store from "./store";
|
|
|
|
|
import "./assets/iconfont/iconfont.css";
|
|
|
|
|
import "./assets/iconfont/iconfont.js";
|
|
|
|
|
import "./assets/iconfont2/iconfont.css";
|
|
|
|
|
import flexible from "./tool/flexible.js";
|
|
|
|
|
import "ant-design-vue/dist/antd.css";
|
|
|
|
|
import Antd from "ant-design-vue";
|
|
|
|
|
import "./assets/style/style.less";
|
2023-01-06 16:00:15 +08:00
|
|
|
import VueLazyload from "vue-lazyload";
|
2025-06-18 21:47:27 +08:00
|
|
|
import i18n from "./lang/index";
|
|
|
|
|
import { getBrowserInfo, murmur } from "./tool/util";
|
|
|
|
|
import "../node_modules/@flaticon/flaticon-uicons/css/all/all.css";
|
2024-09-13 14:36:38 +08:00
|
|
|
// import { Https } from "@/tool/https";
|
2025-06-18 21:47:27 +08:00
|
|
|
import "swiper/css";
|
|
|
|
|
import "swiper/css/pagination";
|
2025-06-20 13:21:45 +08:00
|
|
|
import SvgIcon from "@/component/Canvas/SvgIcon/index.vue";
|
2025-06-22 15:20:08 +08:00
|
|
|
import "virtual:svg-icons-register";
|
2024-07-14 00:00:34 +08:00
|
|
|
|
2024-03-21 10:49:21 +08:00
|
|
|
// import "@/tool/color-thief.js";
|
|
|
|
|
// import "@/tool/fabric.brushes.js";
|
|
|
|
|
// import "@/tool/fabric.min.js";
|
2024-05-16 09:41:16 +08:00
|
|
|
const app = createApp(App);
|
2025-06-22 15:20:08 +08:00
|
|
|
flexible();
|
2025-06-19 09:21:32 +08:00
|
|
|
// alert(window.innerWidth)
|
2024-01-15 17:05:55 +08:00
|
|
|
import { getCookie, setCookie } from "@/tool/cookie";
|
2025-06-18 21:47:27 +08:00
|
|
|
import loadingGif from "./assets/images/homePage/loading.gif";
|
|
|
|
|
|
|
|
|
|
document.addEventListener("touchstart", function (event) {
|
|
|
|
|
event.preventDefault(); // 阻止长按选中
|
2024-09-30 17:59:24 +08:00
|
|
|
});
|
2025-08-22 10:27:48 +08:00
|
|
|
|
|
|
|
|
document.addEventListener('keydown', function(event) {
|
|
|
|
|
if (event.key === "Tab") {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
}
|
|
|
|
|
});
|
2025-09-09 11:47:38 +08:00
|
|
|
|
|
|
|
|
//全局事件
|
|
|
|
|
//下拉菜单全部关掉事件
|
|
|
|
|
// 创建全局事件系统
|
|
|
|
|
const dropdownEvents = {
|
|
|
|
|
listeners: new Set(),
|
|
|
|
|
|
|
|
|
|
closeAll() {
|
|
|
|
|
this.listeners.forEach(listener => {
|
|
|
|
|
// console.log(listener)
|
|
|
|
|
listener()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onClose(listener) {
|
|
|
|
|
this.listeners.add(listener)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
offClose(listener) {
|
|
|
|
|
this.listeners.delete(listener)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
document.addEventListener('click', () => {
|
|
|
|
|
dropdownEvents.closeAll()
|
|
|
|
|
})
|
|
|
|
|
app.config.globalProperties.$dropdownEvents = dropdownEvents
|
|
|
|
|
|
2024-01-15 17:05:55 +08:00
|
|
|
let loadingParam = {
|
2025-06-18 21:47:27 +08:00
|
|
|
loading: loadingGif,
|
|
|
|
|
attempt: 1,
|
|
|
|
|
};
|
|
|
|
|
app
|
|
|
|
|
.use(store)
|
|
|
|
|
.use(router)
|
|
|
|
|
.use(Antd)
|
|
|
|
|
.use(VueLazyload, loadingParam)
|
2025-06-22 15:20:08 +08:00
|
|
|
.component("SvgIcon", SvgIcon)
|
2025-06-18 21:47:27 +08:00
|
|
|
.use(i18n)
|
|
|
|
|
.mount("#app");
|