From 0dab8829a661e27ee8b61ffe44fc9d82570741b8 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期日, 17 十一月 2024 11:26:05 +0800 Subject: [PATCH] 修改bug --- ruoyi-ui/src/main.js | 63 ++++++++++++++++++++++++++++++- 1 files changed, 61 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 81e4afb..8a89a9a 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -1,6 +1,63 @@ import Vue from 'vue' - +import TRTC from 'trtc-js-sdk'; +import '@/utils/aegis.js'; import Cookies from 'js-cookie' + +import '@/assets/style/global.css'; +import '@/assets/icons'; +import '@/assets/style/theme/index.css'; +import { isMobile } from '@/utils/utils'; + +import { + Collapse, + CollapseItem, + Select, + Option, + Input, + Button, + Message, + MessageBox, + Tooltip, + Alert, +} from 'element-ui'; +import i18n from './locales/i18n'; +const showMessage = Symbol('showMessage'); +class DonMessage { + success(options, single = true) { + this[showMessage]('success', options, single); + } + warning(options, single = true) { + this[showMessage]('warning', options, single); + } + info(options, single = true) { + this[showMessage]('info', options, single); + } + error(options, single = true) { + this[showMessage]('error', options, single); + } + [showMessage](type, options) { + Message[type](options); + } +} + + +//import i18n from './locales/i18n'; +Vue.use(Collapse); +Vue.use(CollapseItem); +Vue.use(Select); +Vue.use(Option); +Vue.use(Input); +Vue.use(Button); +Vue.use(Tooltip); +Vue.use(Alert); +Vue.prototype.$alert = MessageBox.alert; +Vue.prototype.$message = new DonMessage(); +Vue.prototype.$isMobile = isMobile; + + + + + import Element from 'element-ui' import './assets/styles/element-variables.scss' @@ -81,11 +138,13 @@ Vue.config.productionTip = false const Base64 = require('js-base64').Base64 - +import Print from 'vue-print-nb' +Vue.use(Print) new Vue({ el: '#app', router, store, + i18n, Base64, render: h => h(App) }) -- Gitblit v1.9.1