Compare commits
19 Commits
v5.9.0
...
30781df972
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30781df972 | ||
|
|
4984127318 | ||
|
|
6ab64a9906 | ||
|
|
2d06dc1dd8 | ||
|
|
818f12d1ea | ||
|
|
b004c224c2 | ||
|
|
399d3b2987 | ||
|
|
b87eb6fd0a | ||
|
|
a0246e31df | ||
|
|
e1cd14a946 | ||
|
|
02380f69e1 | ||
|
|
5208272456 | ||
|
|
551292078e | ||
|
|
79cd159154 | ||
|
|
6d26300181 | ||
|
|
0dd6665b2a | ||
|
|
bbdd44a917 | ||
|
|
f8690a0b73 | ||
|
|
b843eda26f |
@@ -11,21 +11,25 @@ const include = [
|
||||
"dayjs",
|
||||
"axios",
|
||||
"pinia",
|
||||
"vditor",
|
||||
"typeit",
|
||||
"swiper",
|
||||
"qrcode",
|
||||
"intro.js",
|
||||
"vue-i18n",
|
||||
"deep-chat",
|
||||
"vxe-table",
|
||||
"vue-types",
|
||||
"js-cookie",
|
||||
"vue-tippy",
|
||||
"cropperjs",
|
||||
"jsbarcode",
|
||||
"codemirror",
|
||||
"pinyin-pro",
|
||||
"sortablejs",
|
||||
"swiper/vue",
|
||||
"mint-filter",
|
||||
"highlight.js",
|
||||
"@vueuse/core",
|
||||
"vue3-danmaku",
|
||||
"v-contextmenu",
|
||||
@@ -42,6 +46,7 @@ const include = [
|
||||
"@howdyjs/mouse-menu",
|
||||
"@logicflow/extension",
|
||||
"vue-virtual-scroller",
|
||||
"codemirror-editor-vue3",
|
||||
"@amap/amap-jsapi-loader",
|
||||
"el-table-infinite-scroll",
|
||||
"vue-waterfall-plugin-next",
|
||||
@@ -52,8 +57,8 @@ const include = [
|
||||
|
||||
/**
|
||||
* 在预构建中强制排除的依赖项
|
||||
* 温馨提示:所有以 `@iconify-icons/` 开头引入的的本地图标模块,都应该加入到下面的 `exclude` 里,因为平台推荐的使用方式是哪里需要哪里引入而且都是单个的引入,不需要预构建,直接让浏览器加载就好
|
||||
* 温馨提示:所有以 `@iconify-json/` 开头引入的的本地图标模块,都应该加入到下面的 `exclude` 里,因为平台推荐的使用方式是哪里需要哪里引入而且都是单个的引入,不需要预构建,直接让浏览器加载就好
|
||||
*/
|
||||
const exclude = ["@iconify-icons/ep", "@iconify-icons/ri"];
|
||||
const exclude = ["@iconify-json/ep", "@iconify-json/ri"];
|
||||
|
||||
export { include, exclude };
|
||||
|
||||
@@ -3,6 +3,7 @@ import vue from "@vitejs/plugin-vue";
|
||||
import { pathResolve } from "./utils";
|
||||
import { viteBuildInfo } from "./info";
|
||||
import svgLoader from "vite-svg-loader";
|
||||
import Icons from "unplugin-icons/vite";
|
||||
import type { PluginOption } from "vite";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import { configCompressPlugin } from "./compress";
|
||||
@@ -19,7 +20,13 @@ export function getPluginsList(
|
||||
): PluginOption[] {
|
||||
const lifecycle = process.env.npm_lifecycle_event;
|
||||
return [
|
||||
vue(),
|
||||
vue({
|
||||
template: {
|
||||
compilerOptions: {
|
||||
isCustomElement: tag => tag === "deep-chat"
|
||||
}
|
||||
}
|
||||
}),
|
||||
// jsx、tsx语法支持
|
||||
vueJsx(),
|
||||
VueI18nPlugin({
|
||||
@@ -51,6 +58,11 @@ export function getPluginsList(
|
||||
}),
|
||||
// svg组件化支持
|
||||
svgLoader(),
|
||||
// 自动按需加载图标
|
||||
Icons({
|
||||
compiler: "vue3",
|
||||
scale: 1
|
||||
}),
|
||||
VITE_CDN ? cdn : null,
|
||||
configCompressPlugin(VITE_COMPRESSION),
|
||||
// 线上环境删除console
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
/>
|
||||
<title>vue-pure-admin</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
window.process = {};
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -76,6 +76,8 @@ menus:
|
||||
pureLoginLog: Login Log
|
||||
pureOperationLog: Operation Log
|
||||
pureSystemLog: System Log
|
||||
pureCodeMirror: CodeMirror
|
||||
pureMarkdown: Markdown
|
||||
pureEditor: Editor
|
||||
pureAbnormal: Abnormal Page
|
||||
pureFourZeroFour: "404"
|
||||
@@ -92,6 +94,7 @@ menus:
|
||||
pureDraggable: Draggable
|
||||
pureSplitPane: Split Pane
|
||||
pureText: Text Ellipsis
|
||||
pureSlider: Slider
|
||||
pureElButton: Button
|
||||
pureButton: Button Animation
|
||||
pureCheckButton: Check Button
|
||||
|
||||
@@ -76,6 +76,8 @@ menus:
|
||||
pureLoginLog: 登录日志
|
||||
pureOperationLog: 操作日志
|
||||
pureSystemLog: 系统日志
|
||||
pureCodeMirror: 代码编辑器
|
||||
pureMarkdown: Markdown
|
||||
pureEditor: 编辑器
|
||||
pureAbnormal: 异常页面
|
||||
pureFourZeroFour: "404"
|
||||
@@ -92,6 +94,7 @@ menus:
|
||||
pureDraggable: 拖拽
|
||||
pureSplitPane: 切割面板
|
||||
pureText: 文本省略
|
||||
pureSlider: 滑块
|
||||
pureElButton: 按钮
|
||||
pureCheckButton: 可选按钮
|
||||
pureButton: 按钮动效
|
||||
|
||||
108
package.json
@@ -56,8 +56,8 @@
|
||||
"@pureadmin/table": "^3.2.1",
|
||||
"@pureadmin/utils": "^2.5.0",
|
||||
"@vue-flow/background": "^1.3.2",
|
||||
"@vue-flow/core": "^1.41.6",
|
||||
"@vueuse/core": "^12.0.0",
|
||||
"@vue-flow/core": "^1.42.1",
|
||||
"@vueuse/core": "^12.5.0",
|
||||
"@vueuse/motion": "^2.2.6",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
@@ -65,11 +65,15 @@
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.7.9",
|
||||
"china-area-data": "^5.0.1",
|
||||
"codemirror": "^5.65.18",
|
||||
"codemirror-editor-vue3": "^2.8.0",
|
||||
"cropperjs": "^1.6.2",
|
||||
"dayjs": "^1.11.13",
|
||||
"echarts": "^5.5.1",
|
||||
"deep-chat": "^2.1.1",
|
||||
"echarts": "^5.6.0",
|
||||
"el-table-infinite-scroll": "^3.0.6",
|
||||
"element-plus": "^2.9.0",
|
||||
"element-plus": "^2.9.4",
|
||||
"highlight.js": "^11.11.1",
|
||||
"intro.js": "^7.2.0",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jsbarcode": "^3.11.6",
|
||||
@@ -79,96 +83,100 @@
|
||||
"mqtt": "4.3.7",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"pinia": "^2.3.0",
|
||||
"pinia": "^3.0.1",
|
||||
"pinyin-pro": "^3.26.0",
|
||||
"plus-pro-components": "^0.1.18",
|
||||
"plus-pro-components": "^0.1.20",
|
||||
"qrcode": "^1.5.4",
|
||||
"qs": "^6.13.1",
|
||||
"qs": "^6.14.0",
|
||||
"responsive-storage": "^2.2.0",
|
||||
"sortablejs": "^1.15.6",
|
||||
"swiper": "^11.1.15",
|
||||
"swiper": "^11.2.3",
|
||||
"typeit": "^8.8.7",
|
||||
"v-contextmenu": "^3.2.0",
|
||||
"v3-infinite-loading": "^1.3.2",
|
||||
"vditor": "^3.10.9",
|
||||
"version-rocket": "^1.7.4",
|
||||
"vue": "^3.5.13",
|
||||
"vue-i18n": "^10.0.5",
|
||||
"vue-i18n": "^11.1.1",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-pdf-embed": "^2.1.1",
|
||||
"vue-pdf-embed": "^2.1.2",
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-tippy": "^6.5.0",
|
||||
"vue-tippy": "^6.6.0",
|
||||
"vue-types": "^5.1.3",
|
||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||
"vue-waterfall-plugin-next": "^2.6.4",
|
||||
"vue-waterfall-plugin-next": "^2.6.5",
|
||||
"vue3-danmaku": "^1.6.1",
|
||||
"vue3-puzzle-vcode": "^1.1.7",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vxe-table": "4.6.25",
|
||||
"wavesurfer.js": "^7.8.10",
|
||||
"wavesurfer.js": "^7.9.1",
|
||||
"xgplayer": "^3.0.20",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.6.0",
|
||||
"@commitlint/config-conventional": "^19.6.0",
|
||||
"@commitlint/cli": "^19.7.1",
|
||||
"@commitlint/config-conventional": "^19.7.1",
|
||||
"@commitlint/types": "^19.5.0",
|
||||
"@eslint/js": "^9.16.0",
|
||||
"@faker-js/faker": "^9.3.0",
|
||||
"@iconify-icons/ep": "^1.2.12",
|
||||
"@iconify-icons/ri": "^1.2.10",
|
||||
"@iconify/vue": "^4.2.0",
|
||||
"@intlify/unplugin-vue-i18n": "^6.0.1",
|
||||
"@eslint/js": "^9.20.0",
|
||||
"@faker-js/faker": "^9.5.0",
|
||||
"@iconify-json/ep": "^1.2.2",
|
||||
"@iconify-json/ri": "^1.2.5",
|
||||
"@iconify/utils": "^2.3.0",
|
||||
"@iconify/vue": "4.2.0",
|
||||
"@intlify/unplugin-vue-i18n": "^6.0.3",
|
||||
"@types/codemirror": "^5.60.15",
|
||||
"@types/dagre": "^0.7.52",
|
||||
"@types/intro.js": "^5.1.5",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "^20.17.9",
|
||||
"@types/node": "^20.17.19",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/qs": "^6.9.17",
|
||||
"@types/qs": "^6.9.18",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
||||
"@typescript-eslint/parser": "^8.18.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.24.0",
|
||||
"@typescript-eslint/parser": "^8.24.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"boxen": "^8.0.1",
|
||||
"code-inspector-plugin": "^0.18.2",
|
||||
"code-inspector-plugin": "^0.20.0",
|
||||
"cssnano": "^7.0.6",
|
||||
"dagre": "^0.8.5",
|
||||
"eslint": "^9.16.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint": "^9.20.1",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-define-config": "^2.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"gradient-string": "^3.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.2.10",
|
||||
"postcss": "^8.4.49",
|
||||
"postcss-html": "^1.7.0",
|
||||
"lint-staged": "^15.4.3",
|
||||
"postcss": "^8.5.2",
|
||||
"postcss-html": "^1.8.0",
|
||||
"postcss-import": "^16.1.0",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.82.0",
|
||||
"stylelint": "^16.11.0",
|
||||
"stylelint-config-recess-order": "^5.1.1",
|
||||
"stylelint-config-recommended-vue": "^1.5.0",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"stylelint-prettier": "^5.0.2",
|
||||
"rollup-plugin-visualizer": "^5.14.0",
|
||||
"sass": "^1.85.0",
|
||||
"stylelint": "^16.14.1",
|
||||
"stylelint-config-recess-order": "^6.0.0",
|
||||
"stylelint-config-recommended-vue": "^1.6.0",
|
||||
"stylelint-config-standard-scss": "^14.0.0",
|
||||
"stylelint-prettier": "^5.0.3",
|
||||
"svgo": "^3.3.2",
|
||||
"tailwindcss": "^3.4.16",
|
||||
"typescript": "5.6.3",
|
||||
"vite": "^6.0.3",
|
||||
"tailwindcss": "3.4.17",
|
||||
"typescript": "^5.7.3",
|
||||
"unplugin-icons": "^22.1.0",
|
||||
"vite": "^6.1.0",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-fake-server": "^2.1.4",
|
||||
"vite-plugin-fake-server": "^2.2.0",
|
||||
"vite-plugin-remove-console": "^2.2.0",
|
||||
"vite-plugin-router-warn": "^1.0.0",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue-eslint-parser": "^9.4.3",
|
||||
"vue-tsc": "^2.1.10"
|
||||
"vue-tsc": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=22.0.0",
|
||||
@@ -192,6 +200,14 @@
|
||||
"allowedVersions": {
|
||||
"eslint": "9"
|
||||
}
|
||||
}
|
||||
},
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
"core-js",
|
||||
"es5-ext",
|
||||
"esbuild",
|
||||
"typeit",
|
||||
"vue-demi"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
3806
pnpm-lock.yaml
generated
@@ -28,8 +28,7 @@
|
||||
c = document.createElement("div");
|
||||
(c.innerHTML = e._iconfont_svg_string_2208059),
|
||||
(c = c.getElementsByTagName("svg")[0]) &&
|
||||
(c.setAttribute("aria-hidden", "true"),
|
||||
(c.style.position = "absolute"),
|
||||
((c.style.position = "absolute"),
|
||||
(c.style.width = 0),
|
||||
(c.style.height = 0),
|
||||
(c.style.overflow = "hidden"),
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" aria-hidden="true" class="iconify iconify--ant-design" viewBox="0 0 1024 1024"><path fill="currentColor" d="M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 0 0 0 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" class="iconify iconify--ant-design" viewBox="0 0 1024 1024"><path fill="currentColor" d="M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 0 0 0 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8"/></svg>
|
||||
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 332 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" aria-hidden="true" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3.5 4H1V3h2V1h1v2.5zM13 3V1h-1v2.5l.5.5H15V3zm-1 9.5V15h1v-2h2v-1h-2.5zM1 12v1h2v2h1v-2.5l-.5-.5zm11-1.5-.5.5h-7l-.5-.5v-5l.5-.5h7l.5.5zM10 7H6v2h4z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3.5 4H1V3h2V1h1v2.5zM13 3V1h-1v2.5l.5.5H15V3zm-1 9.5V15h1v-2h2v-1h-2.5zM1 12v1h2v2h1v-2.5l-.5-.5zm11-1.5-.5.5h-7l-.5-.5v-5l.5-.5h7l.5.5zM10 7H6v2h4z"/></svg>
|
||||
|
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 308 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" aria-hidden="true" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3 12h10V4H3zm2-6h6v4H5zM2 6H1V2.5l.5-.5H5v1H2zm13-3.5V6h-1V3h-3V2h3.5zM14 10h1v3.5l-.5.5H11v-1h3zM2 13h3v1H1.5l-.5-.5V10h1z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3 12h10V4H3zm2-6h6v4H5zM2 6H1V2.5l.5-.5H5v1H2zm13-3.5V6h-1V3h-3V2h3.5zM14 10h1v3.5l-.5.5H11v-1h3zM2 13h3v1H1.5l-.5-.5V10h1z"/></svg>
|
||||
|
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 283 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" aria-hidden="true" class="globalization" viewBox="0 0 512 512"><path fill="currentColor" d="m478.33 433.6-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362 368 281.65 401.17 362zm-66.99-19.08a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73 39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93.92 1.19 1.83 2.35 2.74 3.51-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59 22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" class="globalization" viewBox="0 0 512 512"><path fill="currentColor" d="m478.33 433.6-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362 368 281.65 401.17 362zm-66.99-19.08a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73 39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93.92 1.19 1.83 2.35 2.74 3.51-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59 22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z"/></svg>
|
||||
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 807 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" aria-hidden="true" class="iconify iconify--mdi" viewBox="0 0 24 24"><path fill="currentColor" d="M1 7h6v2H3v2h4v2H3v2h4v2H1zm10 0h4v2h-4v2h2a2 2 0 0 1 2 2v2c0 1.11-.89 2-2 2H9v-2h4v-2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2m8 0h2a2 2 0 0 1 2 2v1h-2V9h-2v6h2v-1h2v1c0 1.11-.89 2-2 2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" class="iconify iconify--mdi" viewBox="0 0 24 24"><path fill="currentColor" d="M1 7h6v2H3v2h4v2H3v2h4v2H1zm10 0h4v2h-4v2h2a2 2 0 0 1 2 2v2c0 1.11-.89 2-2 2H9v-2h4v-2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2m8 0h2a2 2 0 0 1 2 2v1h-2V9h-2v6h2v-1h2v1c0 1.11-.89 2-2 2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2"/></svg>
|
||||
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 360 B |
@@ -1 +1 @@
|
||||
<svg width="32" height="32" fill="currentColor" aria-hidden="true" data-icon="holder" viewBox="64 64 896 896"><path d="M300 276.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97m0 284a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 228a56 56 0 1 0 112 0 56 56 0 0 0-112 0m0 284a56 56 0 1 0 112 0 56 56 0 0 0-112 0M300 844.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 796a56 56 0 1 0 112 0 56 56 0 0 0-112 0"/></svg>
|
||||
<svg width="32" height="32" fill="currentColor" data-icon="holder" viewBox="64 64 896 896"><path d="M300 276.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97m0 284a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 228a56 56 0 1 0 112 0 56 56 0 0 0-112 0m0 284a56 56 0 1 0 112 0 56 56 0 0 0-112 0M300 844.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 796a56 56 0 1 0 112 0 56 56 0 0 0-112 0"/></svg>
|
||||
|
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 373 B |
@@ -8,8 +8,8 @@ import {
|
||||
} from "./index";
|
||||
import { ref, computed } from "vue";
|
||||
import { isFunction } from "@pureadmin/utils";
|
||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||
|
||||
defineOptions({
|
||||
name: "ReDialog"
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
((o = document.createElement("div")).innerHTML = i),
|
||||
(i = null),
|
||||
(e = o.getElementsByTagName("svg")[0]) &&
|
||||
(e.setAttribute("aria-hidden", "true"),
|
||||
(e.style.position = "absolute"),
|
||||
((e.style.position = "absolute"),
|
||||
(e.style.width = 0),
|
||||
(e.style.height = 0),
|
||||
(e.style.overflow = "hidden"),
|
||||
|
||||
@@ -13,3 +13,11 @@ const IconSelect = iconSelect;
|
||||
const FontIcon = fontIcon;
|
||||
|
||||
export { IconifyIconOffline, IconifyIconOnline, IconSelect, FontIcon };
|
||||
|
||||
export function getIconOffline(icon: string) {
|
||||
if (icon && icon.includes("/")) {
|
||||
return icon.replace("/", ":");
|
||||
} else {
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { IconJson } from "@/components/ReIcon/data";
|
||||
import { cloneDeep, isAllEmpty } from "@pureadmin/utils";
|
||||
import { ref, computed, CSSProperties, watch } from "vue";
|
||||
import Search from "@iconify-icons/ri/search-eye-line";
|
||||
import Search from "~icons/ri/search-eye-line";
|
||||
|
||||
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined;
|
||||
|
||||
@@ -219,8 +219,8 @@ watch(
|
||||
&:hover {
|
||||
color: var(--el-color-primary);
|
||||
border-color: var(--el-color-primary);
|
||||
transition: all 0.4s;
|
||||
transform: scaleX(1.05);
|
||||
transition: all 0.4s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { iconType } from "./types";
|
||||
import { h, defineComponent, type Component } from "vue";
|
||||
import { IconifyIconOnline, IconifyIconOffline, FontIcon } from "../index";
|
||||
import { FontIcon, IconifyIconOnline, IconifyIconOffline } from "../index";
|
||||
|
||||
/**
|
||||
* 支持 `iconfont`、自定义 `svg` 以及 `iconify` 中所有的图标
|
||||
@@ -52,7 +52,7 @@ export function useRenderIcon(icon: any, attrs?: iconType): Component {
|
||||
const IconifyIcon =
|
||||
icon && icon.includes(":") ? IconifyIconOnline : IconifyIconOffline;
|
||||
return h(IconifyIcon, {
|
||||
icon: icon,
|
||||
icon,
|
||||
...attrs
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,8 +27,7 @@ export default defineComponent({
|
||||
return h(
|
||||
"svg",
|
||||
{
|
||||
class: "icon-svg",
|
||||
"aria-hidden": true
|
||||
class: "icon-svg"
|
||||
},
|
||||
{
|
||||
default: () => [
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { h, defineComponent } from "vue";
|
||||
import { getIconOffline } from "../index";
|
||||
import { Icon as IconifyIcon, addIcon } from "@iconify/vue/dist/offline";
|
||||
|
||||
// Iconify Icon在Vue里本地使用(用于内网环境)
|
||||
@@ -13,18 +14,35 @@ export default defineComponent({
|
||||
render() {
|
||||
if (typeof this.icon === "object") addIcon(this.icon, this.icon);
|
||||
const attrs = this.$attrs;
|
||||
return h(
|
||||
IconifyIcon,
|
||||
{
|
||||
icon: this.icon,
|
||||
style: attrs?.style
|
||||
? Object.assign(attrs.style, { outline: "none" })
|
||||
: { outline: "none" },
|
||||
...attrs
|
||||
},
|
||||
{
|
||||
default: () => []
|
||||
}
|
||||
);
|
||||
if (typeof this.icon === "string") {
|
||||
return h(
|
||||
IconifyIcon,
|
||||
{
|
||||
icon: getIconOffline(this.icon),
|
||||
"aria-hidden": false,
|
||||
style: attrs?.style
|
||||
? Object.assign(attrs.style, { outline: "none" })
|
||||
: { outline: "none" },
|
||||
...attrs
|
||||
},
|
||||
{
|
||||
default: () => []
|
||||
}
|
||||
);
|
||||
} else {
|
||||
return h(
|
||||
this.icon,
|
||||
{
|
||||
"aria-hidden": false,
|
||||
style: attrs?.style
|
||||
? Object.assign(attrs.style, { outline: "none" })
|
||||
: { outline: "none" },
|
||||
...attrs
|
||||
},
|
||||
{
|
||||
default: () => []
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@ export default defineComponent({
|
||||
IconifyIcon,
|
||||
{
|
||||
icon: `${this.icon}`,
|
||||
"aria-hidden": false,
|
||||
style: attrs?.style
|
||||
? Object.assign(attrs.style, { outline: "none" })
|
||||
: { outline: "none" },
|
||||
|
||||
@@ -1,70 +1,51 @@
|
||||
// 这里存放本地图标,在 src/layout/index.vue 文件中加载,避免在首启动加载
|
||||
import { addIcon } from "@iconify/vue/dist/offline";
|
||||
import { getIcons } from "@iconify/utils";
|
||||
import { addCollection } from "@iconify/vue/dist/offline";
|
||||
|
||||
// 本地菜单图标,后端在路由的 icon 中返回对应的图标字符串并且前端在此处使用 addIcon 添加即可渲染菜单图标
|
||||
// @iconify-icons/ep
|
||||
import Menu from "@iconify-icons/ep/menu";
|
||||
import Edit from "@iconify-icons/ep/edit";
|
||||
import SetUp from "@iconify-icons/ep/set-up";
|
||||
import Guide from "@iconify-icons/ep/guide";
|
||||
import Monitor from "@iconify-icons/ep/monitor";
|
||||
import Lollipop from "@iconify-icons/ep/lollipop";
|
||||
import Histogram from "@iconify-icons/ep/histogram";
|
||||
import HomeFilled from "@iconify-icons/ep/home-filled";
|
||||
addIcon("ep:menu", Menu);
|
||||
addIcon("ep:edit", Edit);
|
||||
addIcon("ep:set-up", SetUp);
|
||||
addIcon("ep:guide", Guide);
|
||||
addIcon("ep:monitor", Monitor);
|
||||
addIcon("ep:lollipop", Lollipop);
|
||||
addIcon("ep:histogram", Histogram);
|
||||
addIcon("ep:home-filled", HomeFilled);
|
||||
// @iconify-icons/ri
|
||||
import Tag from "@iconify-icons/ri/bookmark-2-line";
|
||||
import Ppt from "@iconify-icons/ri/file-ppt-2-line";
|
||||
import Card from "@iconify-icons/ri/bank-card-line";
|
||||
import Role from "@iconify-icons/ri/admin-fill";
|
||||
import Info from "@iconify-icons/ri/file-info-line";
|
||||
import Dept from "@iconify-icons/ri/git-branch-line";
|
||||
import Table from "@iconify-icons/ri/table-line";
|
||||
import Links from "@iconify-icons/ri/links-fill";
|
||||
import Search from "@iconify-icons/ri/search-line";
|
||||
import FlUser from "@iconify-icons/ri/admin-line";
|
||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||
import MindMap from "@iconify-icons/ri/mind-map";
|
||||
import BarChart from "@iconify-icons/ri/bar-chart-horizontal-line";
|
||||
import LoginLog from "@iconify-icons/ri/window-line";
|
||||
import Artboard from "@iconify-icons/ri/artboard-line";
|
||||
import SystemLog from "@iconify-icons/ri/file-search-line";
|
||||
import ListCheck from "@iconify-icons/ri/list-check";
|
||||
import UbuntuFill from "@iconify-icons/ri/ubuntu-fill";
|
||||
import OnlineUser from "@iconify-icons/ri/user-voice-line";
|
||||
import EditBoxLine from "@iconify-icons/ri/edit-box-line";
|
||||
import OperationLog from "@iconify-icons/ri/history-fill";
|
||||
import InformationLine from "@iconify-icons/ri/information-line";
|
||||
import TerminalWindowLine from "@iconify-icons/ri/terminal-window-line";
|
||||
import CheckboxCircleLine from "@iconify-icons/ri/checkbox-circle-line";
|
||||
addIcon("ri:bookmark-2-line", Tag);
|
||||
addIcon("ri:file-ppt-2-line", Ppt);
|
||||
addIcon("ri:bank-card-line", Card);
|
||||
addIcon("ri:admin-fill", Role);
|
||||
addIcon("ri:file-info-line", Info);
|
||||
addIcon("ri:git-branch-line", Dept);
|
||||
addIcon("ri:links-fill", Links);
|
||||
addIcon("ri:table-line", Table);
|
||||
addIcon("ri:search-line", Search);
|
||||
addIcon("ri:admin-line", FlUser);
|
||||
addIcon("ri:settings-3-line", Setting);
|
||||
addIcon("ri:mind-map", MindMap);
|
||||
addIcon("ri:bar-chart-horizontal-line", BarChart);
|
||||
addIcon("ri:window-line", LoginLog);
|
||||
addIcon("ri:file-search-line", SystemLog);
|
||||
addIcon("ri:artboard-line", Artboard);
|
||||
addIcon("ri:list-check", ListCheck);
|
||||
addIcon("ri:ubuntu-fill", UbuntuFill);
|
||||
addIcon("ri:user-voice-line", OnlineUser);
|
||||
addIcon("ri:edit-box-line", EditBoxLine);
|
||||
addIcon("ri:history-fill", OperationLog);
|
||||
addIcon("ri:information-line", InformationLine);
|
||||
addIcon("ri:terminal-window-line", TerminalWindowLine);
|
||||
addIcon("ri:checkbox-circle-line", CheckboxCircleLine);
|
||||
// 本地菜单图标,后端在路由的 icon 中返回对应的图标字符串并且前端在此处使用 addCollection 添加即可渲染菜单图标
|
||||
import { icons as iconsEp } from "@iconify-json/ep";
|
||||
addCollection(
|
||||
getIcons(iconsEp, [
|
||||
"menu",
|
||||
"edit",
|
||||
"guide",
|
||||
"set-up",
|
||||
"monitor",
|
||||
"lollipop",
|
||||
"histogram",
|
||||
"home-filled"
|
||||
])
|
||||
);
|
||||
|
||||
import { icons as iconsRi } from "@iconify-json/ri";
|
||||
addCollection(
|
||||
getIcons(iconsRi, [
|
||||
"mind-map",
|
||||
"admin-fill",
|
||||
"table-line",
|
||||
"links-fill",
|
||||
"admin-line",
|
||||
"list-check",
|
||||
"ubuntu-fill",
|
||||
"search-line",
|
||||
"window-line",
|
||||
"history-fill",
|
||||
"edit-box-line",
|
||||
"artboard-line",
|
||||
"code-box-line",
|
||||
"markdown-line",
|
||||
"bank-card-line",
|
||||
"file-info-line",
|
||||
"bookmark-2-line",
|
||||
"file-ppt-2-line",
|
||||
"git-branch-line",
|
||||
"settings-3-line",
|
||||
"user-voice-line",
|
||||
"file-search-line",
|
||||
"information-line",
|
||||
"chat-search-line",
|
||||
"terminal-window-line",
|
||||
"checkbox-circle-line",
|
||||
"bar-chart-horizontal-line"
|
||||
])
|
||||
);
|
||||
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
getKeyList
|
||||
} from "@pureadmin/utils";
|
||||
|
||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||
import DragIcon from "@/assets/table-bar/drag.svg?component";
|
||||
import ExpandIcon from "@/assets/table-bar/expand.svg?component";
|
||||
import RefreshIcon from "@/assets/table-bar/refresh.svg?component";
|
||||
|
||||
@@ -11,7 +11,7 @@ import "./index.scss";
|
||||
import propTypes from "@/utils/propTypes";
|
||||
import { isString, cloneDeep } from "@pureadmin/utils";
|
||||
import QRCode, { type QRCodeRenderersOptions } from "qrcode";
|
||||
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
||||
import RefreshRight from "~icons/ep/refresh-right";
|
||||
|
||||
interface QrcodeLogo {
|
||||
src?: string;
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
(t.innerHTML = i),
|
||||
(i = null),
|
||||
(t = t.getElementsByTagName("svg")[0]) &&
|
||||
(t.setAttribute("aria-hidden", "true"),
|
||||
(t.style.position = "absolute"),
|
||||
((t.style.position = "absolute"),
|
||||
(t.style.width = 0),
|
||||
(t.style.height = 0),
|
||||
(t.style.overflow = "hidden"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, onMounted, ref, useSlots } from "vue";
|
||||
import { type TippyOptions, useTippy } from "vue-tippy";
|
||||
<script setup lang="ts">
|
||||
import { h, onMounted, ref } from "vue";
|
||||
import { type TippyOptions, type TippyContent, useTippy } from "vue-tippy";
|
||||
|
||||
defineOptions({
|
||||
name: "ReText"
|
||||
@@ -17,7 +17,10 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
|
||||
const $slots = useSlots();
|
||||
const slots = defineSlots<{
|
||||
content: () => TippyContent;
|
||||
default: () => any;
|
||||
}>();
|
||||
|
||||
const textRef = ref();
|
||||
const tippyFunc = ref();
|
||||
@@ -33,7 +36,7 @@ const isTextEllipsis = (el: HTMLElement) => {
|
||||
};
|
||||
|
||||
const getTippyProps = () => ({
|
||||
content: h($slots.content || $slots.default),
|
||||
content: h(slots.content || slots.default),
|
||||
...props.tippyProps
|
||||
});
|
||||
|
||||
|
||||
@@ -90,9 +90,9 @@ export default defineComponent({
|
||||
];
|
||||
// 取得每一层的当前节点是不是在当前层级列表的最后一个
|
||||
const lastnodeArr = [];
|
||||
let currentNode = this.node;
|
||||
let currentNode: any = this.node;
|
||||
while (currentNode) {
|
||||
let parentNode = currentNode.parent;
|
||||
let parentNode: any = currentNode.parent;
|
||||
// 兼容element-plus的 el-tree-v2 (Virtualized Tree 虚拟树)
|
||||
if (currentNode.level === 1 && !currentNode.parent) {
|
||||
// el-tree-v2的第一层node是没有parent的,必需 treeData 创建一个parent
|
||||
|
||||
@@ -12,8 +12,8 @@ import {
|
||||
getCurrentInstance
|
||||
} from "vue";
|
||||
|
||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||
import DragIcon from "@/assets/table-bar/drag.svg?component";
|
||||
import ExpandIcon from "@/assets/table-bar/expand.svg?component";
|
||||
import RefreshIcon from "@/assets/table-bar/refresh.svg?component";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { getConfig } from "@/config";
|
||||
|
||||
const TITLE = getConfig("Title");
|
||||
|
||||
@@ -9,10 +9,10 @@ import LaySidebarBreadCrumb from "../lay-sidebar/components/SidebarBreadCrumb.vu
|
||||
import LaySidebarTopCollapse from "../lay-sidebar/components/SidebarTopCollapse.vue";
|
||||
|
||||
import GlobalizationIcon from "@/assets/svg/globalization.svg?component";
|
||||
import AccountSettingsIcon from "@iconify-icons/ri/user-settings-line";
|
||||
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||
import Check from "@iconify-icons/ep/check";
|
||||
import AccountSettingsIcon from "~icons/ri/user-settings-line";
|
||||
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
||||
import Setting from "~icons/ri/settings-3-line";
|
||||
import Check from "~icons/ep/check";
|
||||
|
||||
const {
|
||||
layout,
|
||||
|
||||
@@ -112,7 +112,7 @@ function hoverDescription(event, description) {
|
||||
max-width: 238px;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.notice-container {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useI18n } from "vue-i18n";
|
||||
import { ref, computed } from "vue";
|
||||
import { noticesData } from "./data";
|
||||
import NoticeList from "./components/NoticeList.vue";
|
||||
import BellIcon from "@iconify-icons/ep/bell";
|
||||
import BellIcon from "~icons/ep/bell";
|
||||
|
||||
const { t } = useI18n();
|
||||
const noticesNum = ref(0);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { emitter } from "@/utils/mitt";
|
||||
import { onClickOutside } from "@vueuse/core";
|
||||
import { ref, computed, onMounted, onBeforeUnmount } from "vue";
|
||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||
import CloseIcon from "@iconify-icons/ep/close";
|
||||
import CloseIcon from "~icons/ep/close";
|
||||
|
||||
const target = ref(null);
|
||||
const show = ref<Boolean>(false);
|
||||
@@ -121,8 +121,8 @@ onBeforeUnmount(() => {
|
||||
width: 100%;
|
||||
max-width: 280px;
|
||||
box-shadow: 0 0 15px 0 rgb(0 0 0 / 5%);
|
||||
transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
|
||||
transform: translate(100%);
|
||||
transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
|
||||
}
|
||||
|
||||
.show {
|
||||
|
||||
@@ -3,8 +3,8 @@ import { useI18n } from "vue-i18n";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import MdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||
import EnterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
|
||||
import ArrowDownLine from "@iconify-icons/ri/arrow-down-line";
|
||||
import ArrowUpLine from "~icons/ri/arrow-up-line";
|
||||
import ArrowDownLine from "~icons/ri/arrow-down-line";
|
||||
|
||||
withDefaults(defineProps<{ total: number }>(), {
|
||||
total: 0
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import type { optionsItem } from "../types";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import StarIcon from "@iconify-icons/ep/star";
|
||||
import CloseIcon from "@iconify-icons/ep/close";
|
||||
import StarIcon from "~icons/ep/star";
|
||||
import CloseIcon from "~icons/ep/close";
|
||||
|
||||
interface Props {
|
||||
item: optionsItem;
|
||||
|
||||
@@ -13,7 +13,7 @@ import { ref, computed, shallowRef, watch } from "vue";
|
||||
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import { cloneDeep, isAllEmpty, storageLocal } from "@pureadmin/utils";
|
||||
import SearchIcon from "@iconify-icons/ri/search-line";
|
||||
import SearchIcon from "~icons/ri/search-line";
|
||||
|
||||
interface Props {
|
||||
/** 弹窗显隐 */
|
||||
|
||||
@@ -19,9 +19,9 @@ import Segmented, { type OptionsType } from "@/components/ReSegmented";
|
||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||
import { useDark, useGlobal, debounce, isNumber } from "@pureadmin/utils";
|
||||
|
||||
import Check from "@iconify-icons/ep/check";
|
||||
import LeftArrow from "@iconify-icons/ri/arrow-left-s-line";
|
||||
import RightArrow from "@iconify-icons/ri/arrow-right-s-line";
|
||||
import Check from "~icons/ep/check";
|
||||
import LeftArrow from "~icons/ri/arrow-left-s-line";
|
||||
import RightArrow from "~icons/ri/arrow-right-s-line";
|
||||
import DayIcon from "@/assets/svg/day.svg?component";
|
||||
import DarkIcon from "@/assets/svg/dark.svg?component";
|
||||
import SystemIcon from "@/assets/svg/system.svg?component";
|
||||
|
||||
@@ -12,10 +12,10 @@ import LaySidebarItem from "../lay-sidebar/components/SidebarItem.vue";
|
||||
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
||||
|
||||
import GlobalizationIcon from "@/assets/svg/globalization.svg?component";
|
||||
import AccountSettingsIcon from "@iconify-icons/ri/user-settings-line";
|
||||
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||
import Check from "@iconify-icons/ep/check";
|
||||
import AccountSettingsIcon from "~icons/ri/user-settings-line";
|
||||
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
||||
import Setting from "~icons/ri/settings-3-line";
|
||||
import Check from "~icons/ep/check";
|
||||
|
||||
const menuRef = ref();
|
||||
const showLogo = ref(
|
||||
|
||||
@@ -13,10 +13,10 @@ import LaySidebarExtraIcon from "../lay-sidebar/components/SidebarExtraIcon.vue"
|
||||
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
||||
|
||||
import GlobalizationIcon from "@/assets/svg/globalization.svg?component";
|
||||
import AccountSettingsIcon from "@iconify-icons/ri/user-settings-line";
|
||||
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||
import Check from "@iconify-icons/ep/check";
|
||||
import AccountSettingsIcon from "~icons/ri/user-settings-line";
|
||||
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
||||
import Setting from "~icons/ri/settings-3-line";
|
||||
import Check from "~icons/ep/check";
|
||||
|
||||
const menuRef = ref();
|
||||
const defaultActive = ref(null);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useI18n } from "vue-i18n";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
|
||||
import ArrowLeft from "@iconify-icons/ri/arrow-left-double-fill";
|
||||
import ArrowLeft from "~icons/ri/arrow-left-double-fill";
|
||||
|
||||
interface Props {
|
||||
isActive: boolean;
|
||||
|
||||
@@ -17,10 +17,10 @@ import {
|
||||
useAttrs
|
||||
} from "vue";
|
||||
|
||||
import ArrowUp from "@iconify-icons/ep/arrow-up-bold";
|
||||
import EpArrowDown from "@iconify-icons/ep/arrow-down-bold";
|
||||
import ArrowLeft from "@iconify-icons/ep/arrow-left-bold";
|
||||
import ArrowRight from "@iconify-icons/ep/arrow-right-bold";
|
||||
import ArrowUp from "~icons/ep/arrow-up-bold";
|
||||
import EpArrowDown from "~icons/ep/arrow-down-bold";
|
||||
import ArrowLeft from "~icons/ep/arrow-left-bold";
|
||||
import ArrowRight from "~icons/ep/arrow-right-bold";
|
||||
|
||||
const attrs = useAttrs();
|
||||
const { layout, isCollapse, tooltipEffect, getDivStyle } = useNav();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useI18n } from "vue-i18n";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
|
||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||
import MenuFold from "~icons/ri/menu-fold-fill";
|
||||
|
||||
interface Props {
|
||||
isActive: boolean;
|
||||
|
||||
@@ -60,11 +60,11 @@ const { title, getLogo } = useNav();
|
||||
height: 32px;
|
||||
margin: 2px 0 0 12px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
line-height: 32px;
|
||||
color: var(--pure-theme-sub-menu-active-text);
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
|
||||
import MenuFold from "~icons/ri/menu-fold-fill";
|
||||
import MenuUnfold from "~icons/ri/menu-unfold-fill";
|
||||
|
||||
interface Props {
|
||||
isActive: boolean;
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
color: var(--el-color-primary);
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
transform: translate(0, -50%);
|
||||
transition:
|
||||
background-color 0.12s,
|
||||
color 0.12s;
|
||||
transform: translate(0, -50%);
|
||||
|
||||
&:hover {
|
||||
color: rgb(0 0 0 / 88%) !important;
|
||||
@@ -127,10 +127,10 @@
|
||||
font-weight: normal;
|
||||
color: var(--el-text-color-primary);
|
||||
white-space: nowrap;
|
||||
outline: 0;
|
||||
list-style-type: none;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
|
||||
|
||||
li {
|
||||
|
||||
@@ -18,11 +18,11 @@ import {
|
||||
useResizeObserver
|
||||
} from "@pureadmin/utils";
|
||||
|
||||
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||
import ArrowDown from "@iconify-icons/ri/arrow-down-s-line";
|
||||
import ArrowRightSLine from "@iconify-icons/ri/arrow-right-s-line";
|
||||
import ArrowLeftSLine from "@iconify-icons/ri/arrow-left-s-line";
|
||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
import ArrowDown from "~icons/ri/arrow-down-s-line";
|
||||
import ArrowRightSLine from "~icons/ri/arrow-right-s-line";
|
||||
import ArrowLeftSLine from "~icons/ri/arrow-left-s-line";
|
||||
|
||||
const {
|
||||
Close,
|
||||
@@ -511,6 +511,7 @@ function tagOnClick(item) {
|
||||
} else {
|
||||
router.push({ path });
|
||||
}
|
||||
emitter.emit("tagOnClick", item);
|
||||
}
|
||||
|
||||
onClickOutside(contextmenuRef, closeMenu, {
|
||||
|
||||
@@ -14,8 +14,8 @@ import { useUserStoreHook } from "@/store/modules/user";
|
||||
import { useGlobal, isAllEmpty } from "@pureadmin/utils";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
|
||||
const errorInfo =
|
||||
"The current routing configuration is incorrect, please check the configuration";
|
||||
|
||||
@@ -21,13 +21,13 @@ import {
|
||||
hasClass
|
||||
} from "@pureadmin/utils";
|
||||
|
||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||
import CloseAllTags from "@iconify-icons/ri/subtract-line";
|
||||
import CloseOtherTags from "@iconify-icons/ri/text-spacing";
|
||||
import CloseRightTags from "@iconify-icons/ri/text-direction-l";
|
||||
import CloseLeftTags from "@iconify-icons/ri/text-direction-r";
|
||||
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
||||
import Close from "@iconify-icons/ep/close";
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
import CloseAllTags from "~icons/ri/subtract-line";
|
||||
import CloseOtherTags from "~icons/ri/text-spacing";
|
||||
import CloseRightTags from "~icons/ri/text-direction-l";
|
||||
import CloseLeftTags from "~icons/ri/text-direction-r";
|
||||
import RefreshRight from "~icons/ep/refresh-right";
|
||||
import Close from "~icons/ep/close";
|
||||
|
||||
export function useTags() {
|
||||
const route = useRoute();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import "animate.css";
|
||||
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
||||
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addCollection添加过的本地图标
|
||||
import "@/components/ReIcon/src/offlineIcon";
|
||||
import { setType } from "./types";
|
||||
import { useI18n } from "vue-i18n";
|
||||
@@ -210,8 +210,8 @@ const LayHeader = defineComponent({
|
||||
height: 100%;
|
||||
|
||||
&::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IconifyIcon } from "@iconify/vue";
|
||||
import type { FunctionalComponent } from "vue";
|
||||
const { VITE_HIDE_HOME } = import.meta.env;
|
||||
|
||||
export const routerArrays: Array<RouteConfigs> =
|
||||
@@ -16,7 +16,7 @@ export const routerArrays: Array<RouteConfigs> =
|
||||
|
||||
export type routeMetaType = {
|
||||
title?: string;
|
||||
icon?: string | IconifyIcon;
|
||||
icon?: string | FunctionalComponent;
|
||||
showLink?: boolean;
|
||||
savedPosition?: boolean;
|
||||
auths?: Array<string>;
|
||||
@@ -36,7 +36,7 @@ export type multiTagsType = {
|
||||
};
|
||||
|
||||
export type tagsViewsType = {
|
||||
icon: string | IconifyIcon;
|
||||
icon: string | FunctionalComponent;
|
||||
text: string;
|
||||
divided: boolean;
|
||||
disabled: boolean;
|
||||
|
||||
@@ -1,33 +1,37 @@
|
||||
// 完整版菜单比较多,将 rank 抽离出来,在此方便维护
|
||||
|
||||
const home = 0, // 平台规定只有 home 路由的 rank 才能为 0 ,所以后端在返回 rank 的时候需要从非 0 开始
|
||||
vueflow = 1,
|
||||
ganttastic = 2,
|
||||
components = 3,
|
||||
able = 4,
|
||||
table = 5,
|
||||
form = 6,
|
||||
list = 7,
|
||||
result = 8,
|
||||
error = 9,
|
||||
frame = 10,
|
||||
nested = 11,
|
||||
permission = 12,
|
||||
system = 13,
|
||||
monitor = 14,
|
||||
tabs = 15,
|
||||
about = 16,
|
||||
editor = 17,
|
||||
flowchart = 18,
|
||||
formdesign = 19,
|
||||
board = 20,
|
||||
ppt = 21,
|
||||
mind = 22,
|
||||
guide = 23,
|
||||
menuoverflow = 24;
|
||||
chatai = 1,
|
||||
vueflow = 2,
|
||||
ganttastic = 3,
|
||||
components = 4,
|
||||
able = 5,
|
||||
table = 6,
|
||||
form = 7,
|
||||
list = 8,
|
||||
result = 9,
|
||||
error = 10,
|
||||
frame = 11,
|
||||
nested = 12,
|
||||
permission = 13,
|
||||
system = 14,
|
||||
monitor = 15,
|
||||
tabs = 16,
|
||||
about = 17,
|
||||
codemirror = 18,
|
||||
markdown = 19,
|
||||
editor = 20,
|
||||
flowchart = 21,
|
||||
formdesign = 22,
|
||||
board = 23,
|
||||
ppt = 24,
|
||||
mind = 25,
|
||||
guide = 26,
|
||||
menuoverflow = 27;
|
||||
|
||||
export {
|
||||
home,
|
||||
chatai,
|
||||
vueflow,
|
||||
ganttastic,
|
||||
components,
|
||||
@@ -44,6 +48,8 @@ export {
|
||||
monitor,
|
||||
tabs,
|
||||
about,
|
||||
codemirror,
|
||||
markdown,
|
||||
editor,
|
||||
flowchart,
|
||||
formdesign,
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/able",
|
||||
redirect: "/able/watermark",
|
||||
meta: {
|
||||
icon: "ri:ubuntu-fill",
|
||||
icon: "ri/ubuntu-fill",
|
||||
title: $t("menus.pureAble"),
|
||||
rank: able
|
||||
},
|
||||
@@ -15,8 +15,7 @@ export default {
|
||||
name: "MqttClient",
|
||||
component: () => import("@/views/able/mqtt-client.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureMqtt"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
title: $t("menus.pureMqtt")
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/about",
|
||||
redirect: "/about/index",
|
||||
meta: {
|
||||
icon: "ri:file-info-line",
|
||||
icon: "ri/file-info-line",
|
||||
title: $t("menus.pureAbout"),
|
||||
rank: about
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
path: "/board",
|
||||
redirect: "/board/index",
|
||||
meta: {
|
||||
icon: "ri:artboard-line",
|
||||
icon: "ri/artboard-line",
|
||||
title: $t("menus.pureBoard"),
|
||||
rank: board
|
||||
},
|
||||
|
||||
22
src/router/modules/chatai.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { chatai } from "@/router/enums";
|
||||
|
||||
export default {
|
||||
path: "/chatai",
|
||||
redirect: "/chatai/index",
|
||||
meta: {
|
||||
icon: "ri/chat-search-line",
|
||||
title: "chat-ai",
|
||||
rank: chatai
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/chatai/index",
|
||||
name: "ChatAi",
|
||||
component: () => import("@/views/chatai/index.vue"),
|
||||
meta: {
|
||||
title: "chat-ai",
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
}
|
||||
}
|
||||
]
|
||||
} satisfies RouteConfigsTable;
|
||||
23
src/router/modules/codemirror.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import { codemirror } from "@/router/enums";
|
||||
|
||||
export default {
|
||||
path: "/codemirror",
|
||||
redirect: "/codemirror/index",
|
||||
meta: {
|
||||
icon: "ri/code-box-line",
|
||||
title: $t("menus.pureCodeMirror"),
|
||||
rank: codemirror
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/codemirror/index",
|
||||
name: "CodeMirror",
|
||||
component: () => import("@/views/codemirror/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureCodeMirror"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
}
|
||||
}
|
||||
]
|
||||
} satisfies RouteConfigsTable;
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/components",
|
||||
redirect: "/components/dialog",
|
||||
meta: {
|
||||
icon: "ep:menu",
|
||||
icon: "ep/menu",
|
||||
title: $t("menus.pureComponents"),
|
||||
rank: components
|
||||
},
|
||||
@@ -47,8 +47,7 @@ export default {
|
||||
name: "CheckCard",
|
||||
component: () => import("@/views/components/check-card.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureCheckCard"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
title: $t("menus.pureCheckCard")
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -112,7 +111,15 @@ export default {
|
||||
name: "PureText",
|
||||
component: () => import("@/views/components/text.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureText"),
|
||||
title: $t("menus.pureText")
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/components/slider",
|
||||
name: "PureSlider",
|
||||
component: () => import("@/views/components/slider/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureSlider"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
}
|
||||
},
|
||||
@@ -129,8 +136,7 @@ export default {
|
||||
name: "CheckButton",
|
||||
component: () => import("@/views/components/check-button.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureCheckButton"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
title: $t("menus.pureCheckButton")
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/editor",
|
||||
redirect: "/editor/index",
|
||||
meta: {
|
||||
icon: "ep:edit",
|
||||
icon: "ep/edit",
|
||||
title: $t("menus.pureEditor"),
|
||||
rank: editor
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/error",
|
||||
redirect: "/error/403",
|
||||
meta: {
|
||||
icon: "ri:information-line",
|
||||
icon: "ri/information-line",
|
||||
// showLink: false,
|
||||
title: $t("menus.pureAbnormal"),
|
||||
rank: error
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/flow-chart",
|
||||
redirect: "/flow-chart/index",
|
||||
meta: {
|
||||
icon: "ep:set-up",
|
||||
icon: "ep/set-up",
|
||||
title: $t("menus.pureFlowChart"),
|
||||
rank: flowchart
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/form",
|
||||
redirect: "/form/index",
|
||||
meta: {
|
||||
icon: "ri:edit-box-line",
|
||||
icon: "ri/edit-box-line",
|
||||
title: $t("menus.pureSchemaForm"),
|
||||
rank: form
|
||||
},
|
||||
@@ -15,8 +15,7 @@ export default {
|
||||
name: "SchemaForm",
|
||||
component: () => import("@/views/schema-form/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureSchemaForm"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
title: $t("menus.pureSchemaForm")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
path: "/form-design",
|
||||
redirect: "/form-design/index",
|
||||
meta: {
|
||||
icon: "ri:terminal-window-line",
|
||||
icon: "ri/terminal-window-line",
|
||||
title: $t("menus.pureFormDesign"),
|
||||
rank: formdesign
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/ganttastic",
|
||||
redirect: "/ganttastic/index",
|
||||
meta: {
|
||||
icon: "ri:bar-chart-horizontal-line",
|
||||
icon: "ri/bar-chart-horizontal-line",
|
||||
title: $t("menus.pureGanttastic"),
|
||||
rank: ganttastic
|
||||
},
|
||||
@@ -15,8 +15,7 @@ export default {
|
||||
name: "Ganttastic",
|
||||
component: () => import("@/views/ganttastic/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureGanttastic"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
title: $t("menus.pureGanttastic")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/guide",
|
||||
redirect: "/guide/index",
|
||||
meta: {
|
||||
icon: "ep:guide",
|
||||
icon: "ep/guide",
|
||||
title: $t("menus.pureGuide"),
|
||||
rank: guide
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@ export default {
|
||||
component: Layout,
|
||||
redirect: "/welcome",
|
||||
meta: {
|
||||
icon: "ep:home-filled",
|
||||
icon: "ep/home-filled",
|
||||
title: $t("menus.pureHome"),
|
||||
rank: home
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/list",
|
||||
redirect: "/list/card",
|
||||
meta: {
|
||||
icon: "ri:list-check",
|
||||
icon: "ri/list-check",
|
||||
title: $t("menus.pureList"),
|
||||
rank: list
|
||||
},
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
name: "CardList",
|
||||
component: () => import("@/views/list/card/index.vue"),
|
||||
meta: {
|
||||
icon: "ri:bank-card-line",
|
||||
icon: "ri/bank-card-line",
|
||||
title: $t("menus.pureCardList"),
|
||||
showParent: true
|
||||
}
|
||||
|
||||
23
src/router/modules/markdown.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import { markdown } from "@/router/enums";
|
||||
|
||||
export default {
|
||||
path: "/markdown",
|
||||
redirect: "/markdown/index",
|
||||
meta: {
|
||||
icon: "ri/markdown-line",
|
||||
title: $t("menus.pureMarkdown"),
|
||||
rank: markdown
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/markdown/index",
|
||||
name: "Markdown",
|
||||
component: () => import("@/views/markdown/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureMarkdown"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
}
|
||||
}
|
||||
]
|
||||
} satisfies RouteConfigsTable;
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
path: "/mind-map",
|
||||
redirect: "/mind-map/index",
|
||||
meta: {
|
||||
icon: "ri:mind-map",
|
||||
icon: "ri/mind-map",
|
||||
title: $t("menus.pureMindMap"),
|
||||
rank: mind
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
redirect: "/nested/menu1/menu1-1",
|
||||
meta: {
|
||||
title: $t("menus.pureMenus"),
|
||||
icon: "ep:histogram",
|
||||
icon: "ep/histogram",
|
||||
rank: nested
|
||||
},
|
||||
children: [
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/ppt",
|
||||
redirect: "/ppt/index",
|
||||
meta: {
|
||||
icon: "ri:file-ppt-2-line",
|
||||
icon: "ri/file-ppt-2-line",
|
||||
title: "PPT",
|
||||
rank: ppt
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/result",
|
||||
redirect: "/result/success",
|
||||
meta: {
|
||||
icon: "ri:checkbox-circle-line",
|
||||
icon: "ri/checkbox-circle-line",
|
||||
title: $t("menus.pureResult"),
|
||||
rank: result
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ export default {
|
||||
path: "/table",
|
||||
redirect: "/table/index",
|
||||
meta: {
|
||||
icon: "ri:table-line",
|
||||
icon: "ri/table-line",
|
||||
title: $t("menus.pureTable"),
|
||||
rank: table
|
||||
},
|
||||
@@ -31,8 +31,7 @@ export default {
|
||||
name: "PureTableEdit",
|
||||
component: () => import("@/views/table/edit.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureTableEdit"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
title: $t("menus.pureTableEdit")
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -40,8 +39,7 @@ export default {
|
||||
name: "VxeTable",
|
||||
component: () => import("@/views/table/virtual.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureVxeTable"),
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
title: $t("menus.pureVxeTable")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,7 +4,7 @@ export default {
|
||||
path: "/vue-flow",
|
||||
redirect: "/vue-flow/index",
|
||||
meta: {
|
||||
icon: "ep:set-up",
|
||||
icon: "ep/set-up",
|
||||
title: "vue-flow",
|
||||
rank: vueflow
|
||||
},
|
||||
@@ -14,8 +14,7 @@ export default {
|
||||
name: "VueFlow",
|
||||
component: () => import("@/views/vue-flow/layouting/index.vue"),
|
||||
meta: {
|
||||
title: "vue-flow",
|
||||
extraIcon: "IF-pure-iconfont-new svg"
|
||||
title: "vue-flow"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -8,8 +8,7 @@ import {
|
||||
responsiveStorageNameSpace
|
||||
} from "../utils";
|
||||
|
||||
export const useAppStore = defineStore({
|
||||
id: "pure-app",
|
||||
export const useAppStore = defineStore("pure-app", {
|
||||
state: (): appType => ({
|
||||
sidebar: {
|
||||
opened:
|
||||
|
||||
@@ -6,8 +6,7 @@ import {
|
||||
responsiveStorageNameSpace
|
||||
} from "../utils";
|
||||
|
||||
export const useEpThemeStore = defineStore({
|
||||
id: "pure-epTheme",
|
||||
export const useEpThemeStore = defineStore("pure-epTheme", {
|
||||
state: () => ({
|
||||
epThemeColor:
|
||||
storageLocal().getItem<StorageConfigs>(
|
||||
|
||||
@@ -14,8 +14,7 @@ import {
|
||||
} from "../utils";
|
||||
import { usePermissionStoreHook } from "./permission";
|
||||
|
||||
export const useMultiTagsStore = defineStore({
|
||||
id: "pure-multiTags",
|
||||
export const useMultiTagsStore = defineStore("pure-multiTags", {
|
||||
state: () => ({
|
||||
// 存储标签页信息(路由信息)
|
||||
multiTags: storageLocal().getItem<StorageConfigs>(
|
||||
@@ -24,12 +23,12 @@ export const useMultiTagsStore = defineStore({
|
||||
? storageLocal().getItem<StorageConfigs>(
|
||||
`${responsiveStorageNameSpace()}tags`
|
||||
)
|
||||
: [
|
||||
: ([
|
||||
...routerArrays,
|
||||
...usePermissionStoreHook().flatteningRoutes.filter(
|
||||
v => v?.meta?.fixedTag
|
||||
)
|
||||
],
|
||||
] as any),
|
||||
multiTagsCache: storageLocal().getItem<StorageConfigs>(
|
||||
`${responsiveStorageNameSpace()}configure`
|
||||
)?.multiTagsCache
|
||||
|
||||
@@ -12,8 +12,7 @@ import {
|
||||
} from "../utils";
|
||||
import { useMultiTagsStoreHook } from "./multiTags";
|
||||
|
||||
export const usePermissionStore = defineStore({
|
||||
id: "pure-permission",
|
||||
export const usePermissionStore = defineStore("pure-permission", {
|
||||
state: () => ({
|
||||
// 静态路由生成的菜单
|
||||
constantMenus,
|
||||
@@ -31,7 +30,7 @@ export const usePermissionStore = defineStore({
|
||||
filterTree(ascending(this.constantMenus.concat(routes)))
|
||||
);
|
||||
this.flatteningRoutes = formatFlatteningRoutes(
|
||||
this.constantMenus.concat(routes)
|
||||
this.constantMenus.concat(routes) as any
|
||||
);
|
||||
},
|
||||
cacheOperate({ mode, name }: cacheType) {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { type setType, store, getConfig } from "../utils";
|
||||
|
||||
export const useSettingStore = defineStore({
|
||||
id: "pure-setting",
|
||||
export const useSettingStore = defineStore("pure-setting", {
|
||||
state: (): setType => ({
|
||||
title: getConfig().Title,
|
||||
fixedHeader: getConfig().FixedHeader,
|
||||
|
||||
@@ -16,8 +16,7 @@ import {
|
||||
import { useMultiTagsStoreHook } from "./multiTags";
|
||||
import { type DataInfo, setToken, removeToken, userKey } from "@/utils/auth";
|
||||
|
||||
export const useUserStore = defineStore({
|
||||
id: "pure-user",
|
||||
export const useUserStore = defineStore("pure-user", {
|
||||
state: (): userType => ({
|
||||
// 头像
|
||||
avatar: storageLocal().getItem<DataInfo<number>>(userKey)?.avatar ?? "",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@use "sass:color";
|
||||
@use "element-plus/theme-chalk/src/dark/css-vars.scss" as *;
|
||||
|
||||
/* 整体暗色风格适配 */
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
.el-upload-list__item.is-ready &.el-icon--close {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
border-radius: 4px;
|
||||
transition:
|
||||
background-color 0.2s,
|
||||
color 0.2s;
|
||||
@@ -117,8 +117,8 @@
|
||||
}
|
||||
|
||||
& .el-message__closeBtn {
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
border-radius: 4px;
|
||||
transition:
|
||||
background-color 0.2s,
|
||||
color 0.2s;
|
||||
|
||||
@@ -25,7 +25,8 @@ body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
|
||||
font-family:
|
||||
"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
|
||||
"Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
line-height: inherit;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
@@ -57,8 +58,9 @@ code,
|
||||
kbd,
|
||||
samp,
|
||||
pre {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
||||
"Liberation Mono", "Courier New", monospace;
|
||||
font-family:
|
||||
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
||||
"Courier New", monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* $sideBarWidth: vertical 模式下主体内容距离网页文档左侧的距离 */
|
||||
@mixin merge-style($sideBarWidth) {
|
||||
$menuActiveText: #7a80b4;
|
||||
|
||||
@media screen and (width >= 150px) and (width <= 420px) {
|
||||
.app-main-nofixed-header {
|
||||
overflow-y: hidden;
|
||||
@@ -94,7 +92,7 @@
|
||||
height: 100%;
|
||||
overflow: visible;
|
||||
font-size: 0;
|
||||
background: var(--pure-theme-menu-bg);
|
||||
background: var(--pure-theme-menu-bg) !important;
|
||||
border-right: 1px solid var(--pure-border-color);
|
||||
|
||||
/* 展开动画 */
|
||||
@@ -193,8 +191,8 @@
|
||||
.el-menu-item.is-active.nest-menu::before {
|
||||
position: absolute;
|
||||
inset: 0 8px;
|
||||
margin: 4px 0;
|
||||
clear: both;
|
||||
margin: 4px 0;
|
||||
content: "";
|
||||
background: var(--el-color-primary) !important;
|
||||
border-radius: 3px;
|
||||
@@ -214,13 +212,13 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
clear: both;
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
clear: both;
|
||||
content: "";
|
||||
background-color: var(--pure-theme-menu-active-before);
|
||||
transition: all var(--pure-transition-duration) ease-in-out;
|
||||
transform: translateY(0);
|
||||
transition: all var(--pure-transition-duration) ease-in-out;
|
||||
}
|
||||
|
||||
.el-menu--collapse .outer-most.el-sub-menu > .el-sub-menu__title::before {
|
||||
@@ -242,8 +240,8 @@
|
||||
.is-active.submenu-title-noDropdown.outer-most::before {
|
||||
position: absolute;
|
||||
inset: 0 8px;
|
||||
margin: 4px 0;
|
||||
clear: both;
|
||||
margin: 4px 0;
|
||||
content: "";
|
||||
background: var(--el-color-primary) !important;
|
||||
border-radius: 3px;
|
||||
@@ -415,7 +413,7 @@
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
background: var(--pure-theme-menu-bg);
|
||||
background: var(--pure-theme-menu-bg) !important;
|
||||
|
||||
.horizontal-header-left {
|
||||
display: flex;
|
||||
@@ -437,11 +435,11 @@
|
||||
height: 32px;
|
||||
margin: 2px 0 0 12px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
line-height: 32px;
|
||||
color: var(--pure-theme-sub-menu-active-text);
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
@@ -533,7 +531,7 @@
|
||||
.el-sub-menu__title {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
background: var(--pure-theme-menu-bg);
|
||||
background: var(--pure-theme-menu-bg) !important;
|
||||
|
||||
svg {
|
||||
position: static !important;
|
||||
@@ -579,8 +577,8 @@
|
||||
&.hideSidebar {
|
||||
.sidebar-container {
|
||||
pointer-events: none;
|
||||
transition-duration: 0.3s;
|
||||
transform: translate3d(-$sideBarWidth, 0, 0);
|
||||
transition-duration: 0.3s;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -623,10 +621,10 @@ body[layout="vertical"] {
|
||||
.el-sub-menu {
|
||||
& > .el-sub-menu__title {
|
||||
& > span {
|
||||
visibility: visible;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -717,10 +715,10 @@ body[layout="mix"] {
|
||||
padding: 0;
|
||||
|
||||
& > span {
|
||||
visibility: visible;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,11 @@ import mitt from "mitt";
|
||||
/** 全局公共事件需要在此处添加类型 */
|
||||
type Events = {
|
||||
openPanel: string;
|
||||
tagViewsChange: string;
|
||||
tagViewsShowModel: string;
|
||||
tagOnClick: string;
|
||||
logoChange: boolean;
|
||||
tagViewsChange: string;
|
||||
changLayoutRoute: string;
|
||||
tagViewsShowModel: string;
|
||||
imageInfo: {
|
||||
img: HTMLImageElement;
|
||||
height: number;
|
||||
|
||||
@@ -9,6 +9,7 @@ const Print = function (dom, options?: object): PrintFunction {
|
||||
options = options || {};
|
||||
// @ts-expect-error
|
||||
if (!(this instanceof Print)) return new Print(dom, options);
|
||||
// @ts-expect-error
|
||||
this.conf = {
|
||||
styleStr: "",
|
||||
// Elements that need to dynamically get and set the height
|
||||
@@ -18,19 +19,26 @@ const Print = function (dom, options?: object): PrintFunction {
|
||||
// Callback after printing
|
||||
printDoneCallBack: null
|
||||
};
|
||||
// @ts-expect-error
|
||||
for (const key in this.conf) {
|
||||
if (key && options.hasOwnProperty(key)) {
|
||||
// @ts-expect-error
|
||||
this.conf[key] = options[key];
|
||||
}
|
||||
}
|
||||
if (typeof dom === "string") {
|
||||
// @ts-expect-error
|
||||
this.dom = document.querySelector(dom);
|
||||
} else {
|
||||
// @ts-expect-error
|
||||
this.dom = this.isDOM(dom) ? dom : dom.$el;
|
||||
}
|
||||
// @ts-expect-error
|
||||
if (this.conf.setDomHeightArr && this.conf.setDomHeightArr.length) {
|
||||
// @ts-expect-error
|
||||
this.setDomHeight(this.conf.setDomHeightArr);
|
||||
}
|
||||
// @ts-expect-error
|
||||
this.init();
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import { extractPathList, deleteChildren } from "@/utils/tree";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import type { TreeNode } from "element-plus/es/components/tree-v2/src/types";
|
||||
import NodeTree from "@iconify-icons/ri/node-tree";
|
||||
import NodeTree from "~icons/ri/node-tree";
|
||||
|
||||
defineOptions({
|
||||
name: "MenuTree"
|
||||
|
||||
@@ -170,7 +170,7 @@ onBeforeUnmount(() => {
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
::v-deep(.el-upload-dragger) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { onMounted } from "vue";
|
||||
import { deviceDetection } from "@pureadmin/utils";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import VideoPlay from "@iconify-icons/ep/video-play";
|
||||
import VideoPlay from "~icons/ep/video-play";
|
||||
|
||||
import Player from "xgplayer";
|
||||
import "xgplayer/dist/index.min.css";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { type UserInfo, getMine } from "@/api/user";
|
||||
import type { FormInstance, FormRules } from "element-plus";
|
||||
import ReCropperPreview from "@/components/ReCropperPreview";
|
||||
import { createFormData, deviceDetection } from "@pureadmin/utils";
|
||||
import uploadLine from "@iconify-icons/ri/upload-line";
|
||||
import uploadLine from "~icons/ri/upload-line";
|
||||
|
||||
defineOptions({
|
||||
name: "Profile"
|
||||
|
||||
@@ -11,11 +11,11 @@ import AccountManagement from "./components/AccountManagement.vue";
|
||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||
import LaySidebarTopCollapse from "@/layout/components/lay-sidebar/components/SidebarTopCollapse.vue";
|
||||
|
||||
import leftLine from "@iconify-icons/ri/arrow-left-s-line";
|
||||
import ProfileIcon from "@iconify-icons/ri/user-3-line";
|
||||
import PreferencesIcon from "@iconify-icons/ri/settings-3-line";
|
||||
import SecurityLogIcon from "@iconify-icons/ri/window-line";
|
||||
import AccountManagementIcon from "@iconify-icons/ri/profile-line";
|
||||
import leftLine from "~icons/ri/arrow-left-s-line";
|
||||
import ProfileIcon from "~icons/ri/user-3-line";
|
||||
import PreferencesIcon from "~icons/ri/settings-3-line";
|
||||
import SecurityLogIcon from "~icons/ri/window-line";
|
||||
import AccountManagementIcon from "~icons/ri/profile-line";
|
||||
|
||||
defineOptions({
|
||||
name: "AccountSettings"
|
||||
@@ -131,7 +131,7 @@ getMine().then(res => {
|
||||
|
||||
<style lang="scss">
|
||||
.pure-account-settings {
|
||||
background: var(--pure-theme-menu-bg);
|
||||
background: var(--pure-theme-menu-bg) !important;
|
||||
}
|
||||
|
||||
.pure-account-settings-menu {
|
||||
@@ -158,8 +158,8 @@ getMine().then(res => {
|
||||
&::before {
|
||||
position: absolute;
|
||||
inset: 0 8px;
|
||||
margin: 4px 0;
|
||||
clear: both;
|
||||
margin: 4px 0;
|
||||
content: "";
|
||||
background: var(--el-color-primary);
|
||||
border-radius: 3px;
|
||||
|
||||
142
src/views/chatai/components/Bard.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<script setup lang="ts">
|
||||
import "deep-chat";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
const chatRef = ref();
|
||||
|
||||
onMounted(() => {
|
||||
chatRef.value.demo = {
|
||||
response: message => {
|
||||
console.log(message);
|
||||
return {
|
||||
text: "仅演示,如需AI服务,请参考 https://deepchat.dev/docs/connect"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<deep-chat
|
||||
ref="chatRef"
|
||||
style="
|
||||
background-color: #f3f6fc;
|
||||
border-color: #dcdcdc;
|
||||
border-radius: 10px;
|
||||
"
|
||||
:textInput="{
|
||||
styles: {
|
||||
container: {
|
||||
borderRadius: '20px',
|
||||
border: '1px solid #969696',
|
||||
boxShadow: 'unset',
|
||||
width: '78%',
|
||||
marginLeft: '-15px'
|
||||
},
|
||||
text: { padding: '10px', paddingLeft: '15px', paddingRight: '34px' }
|
||||
},
|
||||
placeholder: { text: '发送消息', style: { color: '#bcbcbc' } }
|
||||
}"
|
||||
:messageStyles="{
|
||||
default: {
|
||||
shared: {
|
||||
bubble: {
|
||||
maxWidth: '100%',
|
||||
backgroundColor: 'unset',
|
||||
marginTop: '10px',
|
||||
marginBottom: '10px'
|
||||
}
|
||||
},
|
||||
user: { bubble: { marginLeft: '0px', color: 'black' } },
|
||||
ai: {
|
||||
innerContainer: { borderRadius: '15px', backgroundColor: 'white' }
|
||||
}
|
||||
}
|
||||
}"
|
||||
:avatars="{
|
||||
default: {
|
||||
styles: {
|
||||
position: 'left',
|
||||
container: { marginLeft: '12px', marginRight: '5px' }
|
||||
}
|
||||
},
|
||||
ai: {
|
||||
src: 'https://xiaoxian521.github.io/hyperlink/img/vue-pure-admin/chatai/gemini.png',
|
||||
styles: { position: 'left', avatar: { paddingTop: '6px' } }
|
||||
}
|
||||
}"
|
||||
:speechToText="{
|
||||
webSpeech: { language: 'zh-CN' },
|
||||
button: {
|
||||
default: {
|
||||
container: {
|
||||
default: {
|
||||
bottom: '1em',
|
||||
right: '0.6em',
|
||||
borderRadius: '20px',
|
||||
width: '1.9em',
|
||||
height: '1.9em'
|
||||
}
|
||||
},
|
||||
svg: { styles: { default: { bottom: '0.35em', left: '0.35em' } } }
|
||||
},
|
||||
position: 'inside-right'
|
||||
}
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
position: 'outside-right',
|
||||
submit: {
|
||||
container: {
|
||||
default: {
|
||||
bottom: '0.9em',
|
||||
borderRadius: '25px',
|
||||
padding: '6px 5px 4px',
|
||||
backgroundColor: '#f3f6fc'
|
||||
},
|
||||
hover: { backgroundColor: '#b0deff4f' },
|
||||
click: { backgroundColor: '#b0deffb5' }
|
||||
},
|
||||
svg: {
|
||||
content:
|
||||
'<?xml version="1.0" encoding="utf-8"?> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m21.426 11.095-17-8A.999.999 0 0 0 3.03 4.242L4.969 12 3.03 19.758a.998.998 0 0 0 1.396 1.147l17-8a1 1 0 0 0 0-1.81zM5.481 18.197l.839-3.357L12 12 6.32 9.16l-.839-3.357L18.651 12l-13.17 6.197z"/></svg>',
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(10%) sepia(86%) saturate(6044%) hue-rotate(205deg) brightness(100%) contrast(100%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
loading: {
|
||||
svg: {
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(72%) sepia(0%) saturate(3044%) hue-rotate(322deg) brightness(100%) contrast(96%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
stop: {
|
||||
container: { hover: { backgroundColor: '#ededed' } },
|
||||
svg: {
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(59%) sepia(0%) saturate(0%) hue-rotate(348deg) brightness(96%) contrast(93%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
:history="[
|
||||
{ text: '韩信是谁?', role: 'user' },
|
||||
{
|
||||
text: '韩信(约前231年-前196年),是秦末汉初时期的杰出军事家和战略家,被后世誉为“兵仙”。',
|
||||
role: 'ai'
|
||||
}
|
||||
]"
|
||||
:demo="true"
|
||||
:connect="{ stream: true }"
|
||||
/>
|
||||
</template>
|
||||
147
src/views/chatai/components/Bing.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<script setup lang="ts">
|
||||
import "deep-chat";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
const chatRef = ref();
|
||||
|
||||
onMounted(() => {
|
||||
chatRef.value.demo = {
|
||||
response: message => {
|
||||
console.log(message);
|
||||
return {
|
||||
text: "仅演示,如需AI服务,请参考 https://deepchat.dev/docs/connect"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<deep-chat
|
||||
ref="chatRef"
|
||||
style="
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgb(239 242 247) 0%,
|
||||
7.6029%,
|
||||
rgb(237 240 249) 15.2057%,
|
||||
20.7513%,
|
||||
rgb(235 239 248) 26.297%,
|
||||
27.6386%,
|
||||
rgb(235 239 248) 28.9803%,
|
||||
38.2826%,
|
||||
rgb(231 237 249) 47.585%,
|
||||
48.1216%,
|
||||
rgb(230 236 250) 48.6583%,
|
||||
53.1306%,
|
||||
rgb(228 236 249) 57.6029%,
|
||||
61.5385%,
|
||||
rgb(227 234 250) 65.4741%,
|
||||
68.7835%,
|
||||
rgb(222 234 250) 72.093%,
|
||||
75.7603%,
|
||||
rgb(219 230 248) 79.4275%,
|
||||
82.8265%,
|
||||
rgb(216 229 248) 86.2254%,
|
||||
87.8354%,
|
||||
rgb(213 228 249) 89.4454%,
|
||||
91.8605%,
|
||||
rgb(210 226 249) 94.2755%,
|
||||
95.4383%,
|
||||
rgb(209 225 248) 96.6011%,
|
||||
98.3005%,
|
||||
rgb(208 224 247) 100%
|
||||
);
|
||||
border-color: #e4e4e4;
|
||||
border-radius: 10px;
|
||||
"
|
||||
:textInput="{
|
||||
styles: {
|
||||
container: {
|
||||
borderRadius: '20px',
|
||||
border: 'unset',
|
||||
width: '78%',
|
||||
marginLeft: '-15px',
|
||||
boxShadow:
|
||||
'0px 0.3px 0.9px rgba(0, 0, 0, 0.12), 0px 1.6px 3.6px rgba(0, 0, 0, 0.16)'
|
||||
},
|
||||
text: { padding: '10px', paddingLeft: '15px', paddingRight: '34px' }
|
||||
},
|
||||
placeholder: { text: '发送消息', style: { color: '#606060' } }
|
||||
}"
|
||||
:messageStyles="{
|
||||
default: {
|
||||
shared: {
|
||||
bubble: {
|
||||
backgroundColor: 'unset',
|
||||
marginTop: '10px',
|
||||
marginBottom: '10px',
|
||||
boxShadow:
|
||||
'0px 0.3px 0.9px rgba(0, 0, 0, 0.12), 0px 1.6px 3.6px rgba(0, 0, 0, 0.16)'
|
||||
}
|
||||
},
|
||||
user: {
|
||||
bubble: {
|
||||
background: 'linear-gradient(130deg, #2870EA 20%, #1B4AEF 77.5%)'
|
||||
}
|
||||
},
|
||||
ai: { bubble: { background: 'rgba(255,255,255,0.7)' } }
|
||||
}
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
position: 'outside-right',
|
||||
submit: {
|
||||
container: {
|
||||
default: {
|
||||
bottom: '0.8em',
|
||||
borderRadius: '25px',
|
||||
padding: '6px 5px 4px',
|
||||
backgroundColor: 'unset'
|
||||
},
|
||||
hover: { backgroundColor: '#b0deff4f' },
|
||||
click: { backgroundColor: '#b0deffb5' }
|
||||
},
|
||||
svg: {
|
||||
content:
|
||||
'<?xml version="1.0" encoding="utf-8"?> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m21.426 11.095-17-8A.999.999 0 0 0 3.03 4.242L4.969 12 3.03 19.758a.998.998 0 0 0 1.396 1.147l17-8a1 1 0 0 0 0-1.81zM5.481 18.197l.839-3.357L12 12 6.32 9.16l-.839-3.357L18.651 12l-13.17 6.197z"/></svg>',
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(10%) sepia(86%) saturate(6044%) hue-rotate(205deg) brightness(100%) contrast(100%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
loading: {
|
||||
svg: {
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(72%) sepia(0%) saturate(3044%) hue-rotate(322deg) brightness(100%) contrast(96%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
stop: {
|
||||
container: { hover: { backgroundColor: '#ededed94' } },
|
||||
svg: {
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(72%) sepia(0%) saturate(3044%) hue-rotate(322deg) brightness(100%) contrast(96%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
:history="[
|
||||
{ text: '赵云是谁?', role: 'user' },
|
||||
{
|
||||
text: '赵云(约168年-229年),字子龙,是三国时期蜀汉的重要将领,以其忠诚和勇敢著称。',
|
||||
role: 'ai'
|
||||
}
|
||||
]"
|
||||
:demo="true"
|
||||
:connect="{ stream: true }"
|
||||
/>
|
||||
</template>
|
||||
75
src/views/chatai/components/Blue.vue
Normal file
@@ -0,0 +1,75 @@
|
||||
<script setup lang="ts">
|
||||
import "deep-chat";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
const chatRef = ref();
|
||||
|
||||
onMounted(() => {
|
||||
chatRef.value.demo = {
|
||||
response: message => {
|
||||
console.log(message);
|
||||
return {
|
||||
text: "仅演示,如需AI服务,请参考 https://deepchat.dev/docs/connect"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<deep-chat
|
||||
ref="chatRef"
|
||||
style="
|
||||
border-radius: 10px;
|
||||
border: unset;
|
||||
background-image: url("https://xiaoxian521.github.io/hyperlink/img/vue-pure-admin/chatai/blue.jpg");
|
||||
background-size: cover;
|
||||
"
|
||||
:messageStyles="{
|
||||
default: {
|
||||
user: {
|
||||
bubble: { backgroundColor: '#2670ff' }
|
||||
},
|
||||
ai: { bubble: { backgroundColor: '#004f97', color: 'white' } }
|
||||
}
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
submit: {
|
||||
svg: {
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(60%) sepia(79%) saturate(643%) hue-rotate(185deg) brightness(102%) contrast(100%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
:textInput="{
|
||||
styles: {
|
||||
container: {
|
||||
backgroundColor: '#004f97',
|
||||
color: 'white',
|
||||
boxShadow: 'unset'
|
||||
}
|
||||
},
|
||||
placeholder: { text: '发送消息', style: { color: '#d1d1d1' } }
|
||||
}"
|
||||
auxiliaryStyle="
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #0174db;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: unset;
|
||||
}"
|
||||
:history="[
|
||||
{ text: '熬夜都有哪些坏处?', role: 'user' },
|
||||
{
|
||||
text: '熬夜会损害身体健康,导致免疫力下降、精神不振和工作效率降低。',
|
||||
role: 'ai'
|
||||
}
|
||||
]"
|
||||
:demo="true"
|
||||
:connect="{ stream: true }"
|
||||
/>
|
||||
</template>
|
||||
114
src/views/chatai/components/ChatGPT.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<script setup lang="ts">
|
||||
import "deep-chat";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
const chatRef = ref();
|
||||
|
||||
onMounted(() => {
|
||||
chatRef.value.demo = {
|
||||
response: message => {
|
||||
console.log(message);
|
||||
return {
|
||||
text: "仅演示,如需AI服务,请参考 https://deepchat.dev/docs/connect"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<deep-chat
|
||||
ref="chatRef"
|
||||
style="border-radius: 10px"
|
||||
:messageStyles="{
|
||||
default: {
|
||||
shared: {
|
||||
bubble: {
|
||||
maxWidth: '100%',
|
||||
backgroundColor: 'unset',
|
||||
marginTop: '10px',
|
||||
marginBottom: '10px'
|
||||
}
|
||||
},
|
||||
user: {
|
||||
bubble: {
|
||||
marginLeft: '0px',
|
||||
color: 'black'
|
||||
}
|
||||
},
|
||||
ai: {
|
||||
outerContainer: {
|
||||
backgroundColor: 'rgba(247,247,248)',
|
||||
borderTop: '1px solid rgba(0,0,0,.1)',
|
||||
borderBottom: '1px solid rgba(0,0,0,.1)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
:avatars="{
|
||||
default: { styles: { position: 'left' } },
|
||||
ai: { src: 'https://xiaoxian521.github.io/hyperlink/svg/openai.svg' }
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
submit: {
|
||||
container: {
|
||||
default: {
|
||||
padding: '1px 0 0 5px',
|
||||
backgroundColor: '#19c37d'
|
||||
},
|
||||
hover: { backgroundColor: '#0bab69' },
|
||||
click: { backgroundColor: '#068e56' }
|
||||
},
|
||||
svg: {
|
||||
content:
|
||||
'<?xml version="1.0" ?> <svg viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M21.66,12a2,2,0,0,1-1.14,1.81L5.87,20.75A2.08,2.08,0,0,1,5,21a2,2,0,0,1-1.82-2.82L5.46,13H11a1,1,0,0,0,0-2H5.46L3.18,5.87A2,2,0,0,1,5.86,3.25h0l14.65,6.94A2,2,0,0,1,21.66,12Z"> </path> </g> </svg>',
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(100%) sepia(28%) saturate(2%) hue-rotate(69deg) brightness(107%) contrast(100%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
loading: {
|
||||
container: { default: { backgroundColor: 'white' } },
|
||||
svg: {
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(72%) sepia(0%) saturate(3044%) hue-rotate(322deg) brightness(100%) contrast(96%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
stop: {
|
||||
container: {
|
||||
default: { backgroundColor: 'white' },
|
||||
hover: { backgroundColor: '#dadada52' }
|
||||
},
|
||||
svg: {
|
||||
content:
|
||||
'<?xml version="1.0" encoding="utf-8"?> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <rect width="24" height="24" rx="4" ry="4" /> </svg>',
|
||||
styles: {
|
||||
default: {
|
||||
width: '0.95em',
|
||||
marginTop: '0.32em',
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(72%) sepia(0%) saturate(3044%) hue-rotate(322deg) brightness(100%) contrast(96%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
:textInput="{ placeholder: { text: '发送消息' } }"
|
||||
:history="[
|
||||
{ text: '李白是谁?', role: 'user' },
|
||||
{
|
||||
text: '李白(701年2月28日-762年),号青莲居士,又号“谪仙人”,是唐代著名的浪漫主义诗人,被后人誉为“诗仙”。',
|
||||
role: 'ai'
|
||||
}
|
||||
]"
|
||||
:demo="true"
|
||||
:connect="{ stream: true }"
|
||||
/>
|
||||
</template>
|
||||
85
src/views/chatai/components/Dark.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<script setup lang="ts">
|
||||
import "deep-chat";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
const chatRef = ref();
|
||||
|
||||
onMounted(() => {
|
||||
chatRef.value.demo = {
|
||||
response: message => {
|
||||
console.log(message);
|
||||
return {
|
||||
text: "仅演示,如需AI服务,请参考 https://deepchat.dev/docs/connect"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<deep-chat
|
||||
ref="chatRef"
|
||||
style="background-color: #292929; border: unset; border-radius: 10px"
|
||||
:messageStyles="{
|
||||
default: {
|
||||
ai: { bubble: { backgroundColor: '#545454', color: 'white' } }
|
||||
},
|
||||
loading: {
|
||||
message: {
|
||||
styles: {
|
||||
bubble: { backgroundColor: '#545454', color: 'white' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
:textInput="{
|
||||
styles: {
|
||||
container: {
|
||||
backgroundColor: '#666666',
|
||||
border: 'unset',
|
||||
color: '#e8e8e8'
|
||||
}
|
||||
},
|
||||
placeholder: {
|
||||
text: '发送消息',
|
||||
style: { color: '#bcbcbc' }
|
||||
}
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
submit: {
|
||||
container: {
|
||||
default: { bottom: '0.7rem' }
|
||||
},
|
||||
svg: {
|
||||
styles: {
|
||||
default: {
|
||||
filter:
|
||||
'brightness(0) saturate(100%) invert(70%) sepia(52%) saturate(5617%) hue-rotate(185deg) brightness(101%) contrast(101%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
auxiliaryStyle="
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: grey;
|
||||
border-radius: 5px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: unset;
|
||||
}"
|
||||
:history="[
|
||||
{ text: '什么水果适合减脂期间吃?', role: 'user' },
|
||||
{
|
||||
text: '减脂期间适合吃苹果、柑橘类水果、蓝莓和草莓等低热量、高纤维的水果,有助于增加饱腹感并促进新陈代谢。',
|
||||
role: 'ai'
|
||||
}
|
||||
]"
|
||||
:demo="true"
|
||||
:connect="{ stream: true }"
|
||||
/>
|
||||
</template>
|
||||
64
src/views/chatai/components/FullInput.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<script setup lang="ts">
|
||||
import "deep-chat";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
const chatRef = ref();
|
||||
|
||||
onMounted(() => {
|
||||
chatRef.value.demo = {
|
||||
response: message => {
|
||||
console.log(message);
|
||||
return {
|
||||
text: "仅演示,如需AI服务,请参考 https://deepchat.dev/docs/connect"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<deep-chat
|
||||
ref="chatRef"
|
||||
style="border-radius: 10px"
|
||||
:textInput="{
|
||||
styles: {
|
||||
container: {
|
||||
width: '100%',
|
||||
margin: '0',
|
||||
border: 'unset',
|
||||
borderTop: '1px solid #d5d5d5',
|
||||
borderRadius: '0px',
|
||||
boxShadow: 'unset'
|
||||
},
|
||||
text: {
|
||||
fontSize: '1.05em',
|
||||
paddingTop: '11px',
|
||||
paddingBottom: '13px',
|
||||
paddingLeft: '12px',
|
||||
paddingRight: '2.4em'
|
||||
}
|
||||
},
|
||||
placeholder: { text: '发送消息', style: { color: '#bcbcbc' } }
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
submit: {
|
||||
container: {
|
||||
default: {
|
||||
transform: 'scale(1.21)',
|
||||
marginBottom: '-3px',
|
||||
marginRight: '0.4em'
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
:history="[
|
||||
{ text: '预防心梗、脑梗的方法?', role: 'user' },
|
||||
{
|
||||
text: '预防心梗和脑梗的关键方法包括保持健康的生活方式,如均衡饮食、定期锻炼、控制血压和血脂、戒烟限酒以及管理压力。',
|
||||
role: 'ai'
|
||||
}
|
||||
]"
|
||||
:demo="true"
|
||||
:connect="{ stream: true }"
|
||||
/>
|
||||
</template>
|
||||
60
src/views/chatai/components/Group.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<script setup lang="ts">
|
||||
import "deep-chat";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
const chatRef = ref();
|
||||
|
||||
onMounted(() => {
|
||||
chatRef.value.demo = {
|
||||
response: message => {
|
||||
console.log(message);
|
||||
return {
|
||||
text: "仅演示,如需AI服务,请参考 https://deepchat.dev/docs/connect"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<deep-chat
|
||||
ref="chatRef"
|
||||
auxiliaryStyle="
|
||||
.deep-chat-top-message .message-bubble {
|
||||
border-top-left-radius: 5px !important;
|
||||
border-top-right-radius: 5px !important;
|
||||
}
|
||||
.deep-chat-middle-message .message-bubble {
|
||||
margin-top: 0px;
|
||||
}
|
||||
.deep-chat-bottom-message .message-bubble {
|
||||
margin-top: 0px;
|
||||
border-bottom-left-radius: 5px !important;
|
||||
border-bottom-right-radius: 5px !important;
|
||||
}
|
||||
.deep-chat-top-message.deep-chat-bottom-message .message-bubble {
|
||||
margin-top: 10px;
|
||||
}"
|
||||
:messageStyles="{
|
||||
default: {
|
||||
shared: {
|
||||
bubble: {
|
||||
borderRadius: '0px'
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
:textInput="{
|
||||
placeholder: { text: '发送消息' }
|
||||
}"
|
||||
:history="[
|
||||
{ text: '组1', role: 'group1' },
|
||||
{ text: '组2-1', role: 'group2' },
|
||||
{ text: '组2-2', role: 'group2' },
|
||||
{ text: '组2-3', role: 'group2' },
|
||||
{ text: '组3-1', role: 'group3' },
|
||||
{ text: '组3-2', role: 'group3' }
|
||||
]"
|
||||
:demo="true"
|
||||
/>
|
||||
</template>
|
||||
48
src/views/chatai/components/IntroPanel.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<script setup lang="ts">
|
||||
import "deep-chat";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
const chatRef = ref();
|
||||
|
||||
onMounted(() => {
|
||||
chatRef.value.demo = {
|
||||
response: message => {
|
||||
console.log(message);
|
||||
return {
|
||||
text: "仅演示,如需AI服务,请参考 https://deepchat.dev/docs/connect"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<deep-chat
|
||||
ref="chatRef"
|
||||
:textInput="{
|
||||
placeholder: { text: '发送消息' }
|
||||
}"
|
||||
demo="true"
|
||||
style="border-radius: 8px"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
display: none;
|
||||
width: 200px;
|
||||
padding: 12px;
|
||||
padding-bottom: 15px;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 10px;
|
||||
"
|
||||
>
|
||||
<div>
|
||||
<div style="margin-bottom: 8px; font-size: 16px; text-align: center">
|
||||
<b>简介面板</b>
|
||||
</div>
|
||||
<div style="font-size: 15px; line-height: 20px">
|
||||
插入描述以帮助您的用户了解如何使用该组件
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</deep-chat>
|
||||
</template>
|
||||