From 11f3fb39567935ebead7b41a8ae60ce233b8dab8 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Sun, 29 Sep 2024 17:26:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=BC=8F=E6=B4=9Exss?= =?UTF-8?q?=E6=94=BB=E5=87=BB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/main.js | 39 +- src/views/qrCode/qrCode.vue | 10 +- src/views/system/notice/index.vue | 336 +++++++++--------- .../warehouseManage/tagBind/bind/index.vue | 24 +- 5 files changed, 213 insertions(+), 197 deletions(-) diff --git a/package.json b/package.json index 906438a..69a1956 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "vue": "2.6.12", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", + "vue-dompurify-html": "^2.6.0", "vue-easy-print": "0.0.8", "vue-json-excel": "^0.3.0", "vue-meta": "2.4.0", diff --git a/src/main.js b/src/main.js index 9f7dd4d..7618839 100644 --- a/src/main.js +++ b/src/main.js @@ -11,26 +11,35 @@ import App from './App' import store from './store' import router from './router' import directive from './directive' // directive +import VueDOMPurifyHTML from 'vue-dompurify-html' import plugins from './plugins' // plugins import { download, downloadJson } from '@/utils/request' import './assets/icons' // icon import './permission' // permission control -import { getDicts } from "@/api/system/dict/data"; -import { getConfigKey } from "@/api/system/config"; -import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, indexContinuation } from "@/utils/ruoyi"; +import { getDicts } from '@/api/system/dict/data' +import { getConfigKey } from '@/api/system/config' +import { + parseTime, + resetForm, + addDateRange, + selectDictLabel, + selectDictLabels, + handleTree, + indexContinuation, +} from '@/utils/ruoyi' // 分页组件 -import Pagination from "@/components/Pagination"; +import Pagination from '@/components/Pagination' // 自定义表格工具组件 -import RightToolbar from "@/components/RightToolbar" +import RightToolbar from '@/components/RightToolbar' // 富文本组件 -import Editor from "@/components/Editor" +import Editor from '@/components/Editor' // 文件上传组件 -import FileUpload from "@/components/FileUpload" +import FileUpload from '@/components/FileUpload' // 图片上传组件 -import ImageUpload from "@/components/ImageUpload" +import ImageUpload from '@/components/ImageUpload' // 图片预览组件 -import ImagePreview from "@/components/ImagePreview" +import ImagePreview from '@/components/ImagePreview' // 字典标签组件 import DictTag from '@/components/DictTag' // 头部标签组件 @@ -41,7 +50,6 @@ import DictData from '@/components/DictData' import JsonExcel from 'vue-json-excel' Vue.prototype.$eventBus = new Vue() - import global_ from '@/utils/globalUrl' // 全局方法挂载 @@ -71,6 +79,7 @@ Vue.component('downloadExcel', JsonExcel) Vue.use(directive) Vue.use(plugins) Vue.use(VueMeta) +Vue.use(VueDOMPurifyHTML) DictData.install() /** @@ -83,14 +92,14 @@ DictData.install() */ Vue.use(Element, { - size: Cookies.get('size') || 'medium' // set element-ui default size + size: Cookies.get('size') || 'medium', // set element-ui default size }) Vue.config.productionTip = false new Vue({ - el: '#app', - router, - store, - render: h => h(App) + el: '#app', + router, + store, + render: (h) => h(App), }) diff --git a/src/views/qrCode/qrCode.vue b/src/views/qrCode/qrCode.vue index ec33b23..9ffada9 100644 --- a/src/views/qrCode/qrCode.vue +++ b/src/views/qrCode/qrCode.vue @@ -154,8 +154,8 @@ - - - \ No newline at end of file + diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 0b43603..5b230e4 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -126,7 +126,7 @@ -
+