diff --git a/package.json b/package.json index 6cb8f9b..65791e4 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "@wangeditor/editor-for-vue": "5.1.10", "animate.css": "^4.1.1", "axios": "^1.6.8", + "clipboard": "^2.0.11", "color": "^4.2.3", "echarts": "^5.5.0", "element-plus": "^2.7.2", @@ -67,6 +68,7 @@ "vue": "^3.4.26", "vue-i18n": "9.9.1", "vue-router": "^4.3.2", + "vue3-json-viewer": "^2.2.2", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/src/main.ts b/src/main.ts index 405fcb3..9181634 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,12 +4,13 @@ import router from "@/router"; import { setupStore } from "@/store"; import { setupDirective } from "@/directive"; import { setupElIcons, setupI18n, setupPermission } from "@/plugins"; - +import JsonViewer from "vue3-json-viewer" // 本地SVG图标 import "virtual:svg-icons-register"; // 样式 import "element-plus/theme-chalk/dark/css-vars.css"; +import "vue3-json-viewer/dist/index.css" import "@/styles/index.scss"; import "uno.css"; import "animate.css"; @@ -25,4 +26,5 @@ setupElIcons(app); setupI18n(app); // 注册动态路由 setupPermission(); +app.use(JsonViewer) app.use(router).mount("#app"); diff --git a/src/styles/index.scss b/src/styles/index.scss index 83ff872..e4ed22e 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -26,3 +26,18 @@ color: rgb(32 160 255); } } + +.jv-my-json-view{ + .jv-code{ + overflow-y: auto; + &::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + &::-webkit-scrollbar-thumb { + background-color: rgb(1, 169, 255); + border-radius: 4px; + } + } +} \ No newline at end of file diff --git a/src/views/manage/datas/edit.vue b/src/views/manage/datas/edit.vue index 7ce268a..1d6d1e1 100644 --- a/src/views/manage/datas/edit.vue +++ b/src/views/manage/datas/edit.vue @@ -3,8 +3,7 @@
-