Skip to content

Commit 16155cc

Browse files
fix: 还原ui
1 parent a8888a4 commit 16155cc

995 files changed

Lines changed: 145024 additions & 602 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ui/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ indent_size = 2
44
indent_style = space
55
insert_final_newline = true
66
trim_trailing_whitespace = true
7+
78
end_of_line = lf
89
max_line_length = 100

ui/.gitignore

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ dist-ssr
1414
coverage
1515
*.local
1616

17+
/cypress/videos/
18+
/cypress/screenshots/
19+
1720
# Editor directories and files
1821
.vscode/*
1922
!.vscode/extensions.json
@@ -25,15 +28,3 @@ coverage
2528
*.sw?
2629

2730
*.tsbuildinfo
28-
29-
.eslintcache
30-
31-
# Cypress
32-
/cypress/videos/
33-
/cypress/screenshots/
34-
35-
# Vitest
36-
__screenshots__/
37-
38-
# Vite
39-
*.timestamp-*-*.mjs

ui/.oxlintrc.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

ui/FRONTEND.md

Lines changed: 0 additions & 138 deletions
This file was deleted.

ui/README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@ This template should help get you started developing with Vue 3 in Vite.
44

55
## Recommended IDE Setup
66

7-
[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8-
9-
## Recommended Browser Setup
10-
11-
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
12-
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13-
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14-
- Firefox:
15-
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16-
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
7+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
178

189
## Type Support for `.vue` Imports in TS
1910

ui/env.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
11
/// <reference types="vite/client" />
2+
declare module 'katex'
3+
declare module 'pdfjs-dist/build/pdf.mjs'
4+
declare module 'sanitize-html' {
5+
interface IOptions {
6+
allowedTags?: string[]
7+
allowedAttributes?: Record<string, string[]>
8+
allowedSchemes?: string[]
9+
allowedSchemesByTag?: Record<string, string[]>
10+
allowProtocolRelative?: boolean
11+
}
12+
13+
function sanitizeHtml(dirty: string, options?: IOptions): string
14+
15+
export = sanitizeHtml
16+
}
17+
interface Window {
18+
sendMessage: ?((message: string, other_params_data: any) => void)
19+
chatUserProfile: ?(() => any)
20+
MaxKB: {
21+
prefix: string
22+
chatPrefix: string
23+
}
24+
}

ui/env/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VITE_APP_NAME=admin
22
VITE_BASE_PATH=/admin/
33
VITE_APP_PORT=3000
4-
VITE_APP_TITLE=MaxKB
5-
VITE_ENTRY=admin.html
4+
VITE_APP_TITLE = 'MaxKB'
5+
VITE_ENTRY="admin.html"

ui/env/.env.chat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VITE_APP_NAME=chat
22
VITE_BASE_PATH=/chat/
33
VITE_APP_PORT=3001
4-
VITE_APP_TITLE=MaxKB
5-
VITE_ENTRY=chat.html
4+
VITE_APP_TITLE = 'MaxKB'
5+
VITE_ENTRY="chat.html"

ui/eslint.config.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { globalIgnores } from 'eslint/config'
22
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
33
import pluginVue from 'eslint-plugin-vue'
4-
import pluginOxlint from 'eslint-plugin-oxlint'
5-
import skipFormatting from 'eslint-config-prettier/flat'
4+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
65

76
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
87
// import { configureVueProject } from '@vue/eslint-config-typescript'
@@ -12,15 +11,19 @@ import skipFormatting from 'eslint-config-prettier/flat'
1211
export default defineConfigWithVueTs(
1312
{
1413
name: 'app/files-to-lint',
15-
files: ['**/*.{vue,ts,mts,tsx}'],
14+
files: ['**/*.{ts,mts,tsx,vue}'],
1615
},
1716

1817
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
1918

20-
...pluginVue.configs['flat/essential'],
19+
pluginVue.configs['flat/essential'],
2120
vueTsConfigs.recommended,
22-
23-
...pluginOxlint.buildFromOxlintConfigFile('.oxlintrc.json'),
24-
2521
skipFormatting,
22+
{
23+
rules: {
24+
'vue/multi-word-component-names': 'off',
25+
'@typescript-eslint/no-explicit-any': 'off',
26+
'@typescript-eslint/no-unused-vars': ['off'],
27+
}
28+
}
2629
)

ui/package.json

Lines changed: 71 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,80 @@
1212
"build-only": "vite build",
1313
"build-only-chat": "vite build --mode chat",
1414
"type-check": "vue-tsc --build",
15-
"lint": "run-s \"lint:*\"",
16-
"format": "prettier --write --experimental-cli src/"
15+
"lint": "eslint . --fix",
16+
"format": "prettier --write src/"
1717
},
1818
"dependencies": {
19-
"@element-plus/icons-vue": "^2.3.2",
20-
"element-plus": "^2.14.2",
21-
"pinia": "^3.0.4",
22-
"vue": "^3.5.38",
23-
"vue-router": "^5.1.0"
19+
"@antv/layout": "^0.3.1",
20+
"@codemirror/lang-json": "^6.0.1",
21+
"@codemirror/lang-python": "^6.2.1",
22+
"@codemirror/theme-one-dark": "^6.1.2",
23+
"@he-tree/vue": "^2.10.5",
24+
"@logicflow/core": "^1.2.27",
25+
"@logicflow/extension": "^1.2.27",
26+
"@vavt/cm-extension": "^1.9.1",
27+
"@vueuse/core": "^13.3.0",
28+
"axios": "^1.8.4",
29+
"cron-validator": "^1.4.0",
30+
"cropperjs": "^1.6.2",
31+
"dingtalk-jsapi": "^3.1.0",
32+
"echarts": "^6.1.0",
33+
"el-table-infinite-scroll": "^3.0.8",
34+
"element-plus": "^2.13.5",
35+
"file-saver": "^2.0.5",
36+
"highlight.js": "^11.11.1",
37+
"html-to-image": "^1.11.13",
38+
"html2canvas": "^1.4.1",
39+
"jsencrypt": "^3.5.4",
40+
"jspdf": "^4.1.0",
41+
"katex": "^0.16.10",
42+
"marked": "^12.0.2",
43+
"md-editor-v3": "^5.8.2",
44+
"mermaid": "^11.12.0",
45+
"moment": "^2.30.1",
46+
"nanoid": "^5.1.5",
47+
"nprogress": "^0.2.0",
48+
"pdfjs-dist": "^5.6.205",
49+
"pinia": "^3.0.1",
50+
"recorder-core": "^1.3.25011100",
51+
"sanitize-html": "^2.17.0",
52+
"screenfull": "^6.0.2",
53+
"sortablejs": "^1.15.6",
54+
"svg2pdf.js": "^2.5.0",
55+
"use-element-plus-theme": "^0.0.5",
56+
"vite-plugin-html": "^3.2.2",
57+
"vue": "^3.5.13",
58+
"vue-clipboard3": "^2.0.0",
59+
"vue-codemirror": "^6.1.1",
60+
"vue-demi": "^0.14.10",
61+
"vue-draggable-plus": "^0.6.0",
62+
"vue-i18n": "^11.1.3",
63+
"vue-router": "^4.5.0",
64+
"vue3-menus": "^1.1.2"
2465
},
2566
"devDependencies": {
26-
"@tailwindcss/vite": "^4.3.2",
27-
"@tsconfig/node24": "^24.0.4",
28-
"@types/node": "^24.13.2",
29-
"@vitejs/plugin-vue": "^6.0.7",
30-
"@vitejs/plugin-vue-jsx": "^5.1.5",
31-
"@vue/eslint-config-typescript": "^14.8.0",
32-
"@vue/tsconfig": "^0.9.1",
33-
"eslint": "^10.5.0",
34-
"eslint-config-prettier": "^10.1.8",
35-
"eslint-plugin-oxlint": "~1.69.0",
36-
"eslint-plugin-vue": "~10.9.2",
37-
"jiti": "^2.7.0",
38-
"npm-run-all2": "^9.0.2",
39-
"oxlint": "~1.69.0",
40-
"prettier": "3.8.4",
41-
"sass": "^1.101.0",
42-
"tailwindcss": "^4.3.2",
43-
"typescript": "~6.0.0",
44-
"unplugin-auto-import": "^21.0.0",
45-
"unplugin-vue-components": "^32.1.0",
46-
"vite": "^8.0.16",
47-
"vite-plugin-vue-devtools": "^8.1.2",
48-
"vue-eslint-parser": "^10.4.1",
49-
"vue-tsc": "^3.3.5"
50-
},
51-
"engines": {
52-
"node": "^22.18.0 || >=24.12.0"
67+
"@tsconfig/node22": "^22.0.1",
68+
"@types/crypto-js": "^4.2.2",
69+
"@types/file-saver": "^2.0.7",
70+
"@types/node": "^22.14.0",
71+
"@types/node-forge": "^1.3.14",
72+
"@types/nprogress": "^0.2.3",
73+
"@vitejs/plugin-vue": "^5.2.3",
74+
"@vitejs/plugin-vue-jsx": "^4.1.2",
75+
"@vue/eslint-config-prettier": "^10.2.0",
76+
"@vue/eslint-config-typescript": "^14.5.0",
77+
"@vue/tsconfig": "^0.7.0",
78+
"eslint": "^9.22.0",
79+
"eslint-plugin-vue": "~10.0.0",
80+
"jiti": "^2.4.2",
81+
"npm-run-all2": "^7.0.2",
82+
"prettier": "3.5.3",
83+
"sass": "^1.86.3",
84+
"sass-loader": "^16.0.5",
85+
"typescript": "~5.8.0",
86+
"unplugin-vue-define-options": "^3.0.0-beta.8",
87+
"vite": "^6.2.4",
88+
"vite-plugin-vue-devtools": "^7.7.2",
89+
"vue-tsc": "^2.2.8"
5390
}
5491
}

0 commit comments

Comments
 (0)