| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import "./assets/main.css";
- import ArcoVue from "@arco-design/web-vue";
- import ArcoVueIcon from "@arco-design/web-vue/es/icon";
- import "@arco-themes/vue-niuniu/css/arco.css";
- import { createApp } from "vue";
- import App from "./App.vue";
- import router from "./router";
- import helper from "./utils/helper";
- import config from "./utils/config";
- import store from './store';
- import i18n from './locale';
- import ajax from "./ajax";
- import outside from "@venegrad/vue3-click-outside";
- import '@/assets/style/global.less';
- const app = createApp(App);
- app.use(ArcoVueIcon);
- app.use(router);
- app.use(ArcoVue);
- app.use(store);
- app.use(i18n);
- app.provide("$global", {
- ajax,
- helper,
- config
- });
- app.directive("outside", outside);
- app.mount("#app");
- helper.getToken();
- document.querySelector("#app").$helper = helper;
- // 添加全局方法
- app.config.globalProperties.$messageSuccess = function (data) {
- this.$message.success(data)
- };
- app.config.globalProperties.$messageWarning = function (data) {
- this.$message.warning(data)
- };
- app.config.globalProperties.$messageError = function (data) {
- this.$message.error(data)
- };
- app.config.globalProperties.$messageInfo = function (data) {
- this.$message.info(data)
- };
- app.config.globalProperties.$messageNormal = function (data) {
- this.$message.normal(data)
- };
|