@kg-ui/kg-ui-plus 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +3 -12
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +25 -2
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +2 -2
- package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +3 -1
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +116 -42
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPluginByKey.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPluginByKey.vue2.mjs +45 -38
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPluginByKey.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +33 -42
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/dialogue/index.vue2.mjs +62 -49
- package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/readMd.vue.mjs +1 -1
- package/dist/es/KgCopilot/dialogue/readMd.vue2.mjs +19 -19
- package/dist/es/KgCopilot/dialogue/readMd.vue3.mjs +2 -2
- package/dist/es/KgCopilot/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/index.vue2.mjs +24 -5
- package/dist/es/KgCopilot/index.vue3.mjs +2 -2
- package/dist/es/api/copilot.mjs +25 -4
- package/dist/es/directives/heighlight/index.mjs +1 -1
- package/dist/es/home/LFilter/FilterArea.vue.mjs +1 -1
- package/dist/es/home/LFilter/FilterArea.vue2.mjs +1 -1
- package/dist/es/home/LFilter/FilterArea.vue3.mjs +2 -2
- package/dist/es/home/LFilter/FilterItem.vue.mjs +1 -1
- package/dist/es/home/LFilter/FilterItem.vue2.mjs +1 -1
- package/dist/es/home/LFilter/FilterItem.vue3.mjs +2 -2
- package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +1 -1
- package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +1 -1
- package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +2 -2
- package/dist/es/home/LProject/index.vue.mjs +1 -1
- package/dist/es/home/LProject/index.vue3.mjs +2 -2
- package/dist/es/home/index.vue.mjs +1 -1
- package/dist/es/home/index.vue3.mjs +2 -2
- package/dist/es/node_modules/.pnpm/@microsoft_fetch-event-source@2.0.1/node_modules/@microsoft/fetch-event-source/lib/esm/fetch.mjs +90 -0
- package/dist/es/node_modules/.pnpm/@microsoft_fetch-event-source@2.0.1/node_modules/@microsoft/fetch-event-source/lib/esm/parse.mjs +109 -0
- package/dist/es/store/modules/copilot.mjs +70 -38
- package/dist/es/style.css +1 -1
- package/dist/es/utils/home.mjs +10 -0
- package/dist/es/utils/http/index.mjs +9 -0
- package/package.json +122 -121
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +0 -8
@@ -28,6 +28,9 @@ const _PureHttp = class {
|
|
28
28
|
_PureHttp.axiosInstance.interceptors.request.use(
|
29
29
|
async (config) => {
|
30
30
|
config.headers["accessToken"] = window["kg_token"];
|
31
|
+
const source = Axios.CancelToken.source();
|
32
|
+
_PureHttp.requestMap[config.url] = source;
|
33
|
+
config.cancelToken = source.token;
|
31
34
|
return config;
|
32
35
|
},
|
33
36
|
(error) => {
|
@@ -41,6 +44,7 @@ const _PureHttp = class {
|
|
41
44
|
instance.interceptors.response.use(
|
42
45
|
(response) => {
|
43
46
|
var _a;
|
47
|
+
delete _PureHttp.requestMap[response.config.url || ""];
|
44
48
|
if (((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.status) === -1e3) {
|
45
49
|
console.error("用户未登录");
|
46
50
|
alert("token失效");
|
@@ -79,10 +83,15 @@ const _PureHttp = class {
|
|
79
83
|
get(url, params, config) {
|
80
84
|
return this.request("get", url, params, config);
|
81
85
|
}
|
86
|
+
cancelByUrl(url) {
|
87
|
+
_PureHttp.requestMap[url] && _PureHttp.requestMap[url].cancel("取消请求");
|
88
|
+
delete _PureHttp.requestMap[url || ""];
|
89
|
+
}
|
82
90
|
};
|
83
91
|
let PureHttp = _PureHttp;
|
84
92
|
/** 保存当前Axios实例对象 */
|
85
93
|
__publicField(PureHttp, "axiosInstance", Axios.create(defaultConfig));
|
94
|
+
__publicField(PureHttp, "requestMap", {});
|
86
95
|
const http = new PureHttp();
|
87
96
|
export {
|
88
97
|
http
|
package/package.json
CHANGED
@@ -1,121 +1,122 @@
|
|
1
|
-
{
|
2
|
-
"name": "@kg-ui/kg-ui-plus",
|
3
|
-
"version": "0.0.
|
4
|
-
"description": "A Component Library for Vue 3",
|
5
|
-
"private": false,
|
6
|
-
"main": "dist/es/index.mjs",
|
7
|
-
"files": [
|
8
|
-
"dist"
|
9
|
-
],
|
10
|
-
"scripts": {
|
11
|
-
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
12
|
-
"serve": "pnpm dev",
|
13
|
-
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build",
|
14
|
-
"report": "rimraf dist && vite build",
|
15
|
-
"preview": "vite preview",
|
16
|
-
"preview:build": "pnpm build && vite preview",
|
17
|
-
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
|
18
|
-
"svgo": "svgo -f src/assets/svg -o src/assets/svg",
|
19
|
-
"cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
|
20
|
-
"clean:cache": "rm -rf node_modules && rm -rf .eslintcache && pnpm install",
|
21
|
-
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
|
22
|
-
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
23
|
-
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,css,scss,postcss,less}\" --cache --cache-location node_modules/.cache/stylelint/",
|
24
|
-
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
|
25
|
-
"lint:pretty": "pretty-quick --staged",
|
26
|
-
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
|
27
|
-
"preinstall": "npx only-allow pnpm"
|
28
|
-
},
|
29
|
-
"browserslist": [
|
30
|
-
"> 1%",
|
31
|
-
"not ie 11",
|
32
|
-
"not op_mini all"
|
33
|
-
],
|
34
|
-
"dependencies": {
|
35
|
-
"@
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
"@
|
50
|
-
"@commitlint/
|
51
|
-
"@
|
52
|
-
"@iconify-icons/
|
53
|
-
"@iconify-icons/
|
54
|
-
"@iconify/
|
55
|
-
"@
|
56
|
-
"@types/
|
57
|
-
"@
|
58
|
-
"@typescript-eslint/
|
59
|
-
"@
|
60
|
-
"@vitejs/plugin-vue
|
61
|
-
"@
|
62
|
-
"@vue/eslint-config-
|
63
|
-
"
|
64
|
-
"
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"eslint
|
68
|
-
"eslint-plugin-
|
69
|
-
"
|
70
|
-
"
|
71
|
-
"
|
72
|
-
"
|
73
|
-
"postcss
|
74
|
-
"postcss-
|
75
|
-
"postcss-
|
76
|
-
"
|
77
|
-
"
|
78
|
-
"
|
79
|
-
"
|
80
|
-
"
|
81
|
-
"sass
|
82
|
-
"
|
83
|
-
"stylelint
|
84
|
-
"stylelint-config-
|
85
|
-
"stylelint-config-
|
86
|
-
"stylelint-config-
|
87
|
-
"stylelint-
|
88
|
-
"
|
89
|
-
"
|
90
|
-
"
|
91
|
-
"
|
92
|
-
"
|
93
|
-
"
|
94
|
-
"vite
|
95
|
-
"vite-plugin-
|
96
|
-
"vite-plugin-
|
97
|
-
"vite-plugin-
|
98
|
-
"vite-
|
99
|
-
"
|
100
|
-
"vue
|
101
|
-
"vue-
|
102
|
-
"
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
"
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
"
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
"
|
121
|
-
|
1
|
+
{
|
2
|
+
"name": "@kg-ui/kg-ui-plus",
|
3
|
+
"version": "0.0.11",
|
4
|
+
"description": "A Component Library for Vue 3",
|
5
|
+
"private": false,
|
6
|
+
"main": "dist/es/index.mjs",
|
7
|
+
"files": [
|
8
|
+
"dist"
|
9
|
+
],
|
10
|
+
"scripts": {
|
11
|
+
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
12
|
+
"serve": "pnpm dev",
|
13
|
+
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build",
|
14
|
+
"report": "rimraf dist && vite build",
|
15
|
+
"preview": "vite preview",
|
16
|
+
"preview:build": "pnpm build && vite preview",
|
17
|
+
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
|
18
|
+
"svgo": "svgo -f src/assets/svg -o src/assets/svg",
|
19
|
+
"cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
|
20
|
+
"clean:cache": "rm -rf node_modules && rm -rf .eslintcache && pnpm install",
|
21
|
+
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
|
22
|
+
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
23
|
+
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,css,scss,postcss,less}\" --cache --cache-location node_modules/.cache/stylelint/",
|
24
|
+
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
|
25
|
+
"lint:pretty": "pretty-quick --staged",
|
26
|
+
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
|
27
|
+
"preinstall": "npx only-allow pnpm"
|
28
|
+
},
|
29
|
+
"browserslist": [
|
30
|
+
"> 1%",
|
31
|
+
"not ie 11",
|
32
|
+
"not op_mini all"
|
33
|
+
],
|
34
|
+
"dependencies": {
|
35
|
+
"@microsoft/fetch-event-source": "^2.0.1",
|
36
|
+
"@pureadmin/utils": "1.8.5",
|
37
|
+
"axios": "1.2.0",
|
38
|
+
"dayjs": "1.11.6",
|
39
|
+
"dompurify": "^3.0.10",
|
40
|
+
"element-plus": "2.2.27",
|
41
|
+
"highlight.js": "^11.9.0",
|
42
|
+
"marked": "^12.0.1",
|
43
|
+
"path": "0.12.7",
|
44
|
+
"pinia": "2.0.28",
|
45
|
+
"pinyin-match": "1.2.4",
|
46
|
+
"qs": "6.11.0"
|
47
|
+
},
|
48
|
+
"devDependencies": {
|
49
|
+
"@babel/core": ">=7.0.0-0 <8.0.0",
|
50
|
+
"@commitlint/cli": "13.1.0",
|
51
|
+
"@commitlint/config-conventional": "13.1.0",
|
52
|
+
"@iconify-icons/ep": "1.2.7",
|
53
|
+
"@iconify-icons/ph": "^1.2.5",
|
54
|
+
"@iconify-icons/ri": "1.2.3",
|
55
|
+
"@iconify/vue": "4.0.0",
|
56
|
+
"@types/node": "18.11.9",
|
57
|
+
"@types/qs": "6.9.7",
|
58
|
+
"@typescript-eslint/eslint-plugin": "5.42.1",
|
59
|
+
"@typescript-eslint/parser": "5.42.1",
|
60
|
+
"@vitejs/plugin-vue": "4.0.0",
|
61
|
+
"@vitejs/plugin-vue-jsx": "3.0.0",
|
62
|
+
"@vue/eslint-config-prettier": "7.0.0",
|
63
|
+
"@vue/eslint-config-typescript": "11.0.2",
|
64
|
+
"autoprefixer": "10.4.13",
|
65
|
+
"cloc": "2.10.0",
|
66
|
+
"cssnano": "5.1.14",
|
67
|
+
"eslint": "8.8.0",
|
68
|
+
"eslint-plugin-prettier": "4.0.0",
|
69
|
+
"eslint-plugin-vue": "9.7.0",
|
70
|
+
"husky": "7.0.4",
|
71
|
+
"lint-staged": "11.1.2",
|
72
|
+
"picocolors": "1.0.0",
|
73
|
+
"postcss": "8.4.18",
|
74
|
+
"postcss-html": "1.5.0",
|
75
|
+
"postcss-import": "15.0.0",
|
76
|
+
"postcss-scss": "4.0.5",
|
77
|
+
"prettier": "2.5.1",
|
78
|
+
"pretty-quick": "3.1.1",
|
79
|
+
"rimraf": "3.0.2",
|
80
|
+
"rollup-plugin-visualizer": "5.8.3",
|
81
|
+
"sass": "^1.72.0",
|
82
|
+
"sass-loader": "^14.1.1",
|
83
|
+
"stylelint": "^14.16.1",
|
84
|
+
"stylelint-config-html": "^1.1.0",
|
85
|
+
"stylelint-config-prettier": "^9.0.5",
|
86
|
+
"stylelint-config-recommended": "^9.0.0",
|
87
|
+
"stylelint-config-standard": "^29.0.0",
|
88
|
+
"stylelint-order": "^5.0.0",
|
89
|
+
"svgo": "3.0.2",
|
90
|
+
"tailwindcss": "3.2.4",
|
91
|
+
"terser": "5.16.1",
|
92
|
+
"typescript": "4.9.3",
|
93
|
+
"unplugin-vue-define-options": "0.12.2",
|
94
|
+
"vite": "4.0.3",
|
95
|
+
"vite-plugin-cdn-import": "0.3.5",
|
96
|
+
"vite-plugin-compression": "0.5.1",
|
97
|
+
"vite-plugin-dts": "1.4.1",
|
98
|
+
"vite-plugin-remove-console": "1.3.0",
|
99
|
+
"vite-svg-loader": "3.6.0",
|
100
|
+
"vue": "3.2.45",
|
101
|
+
"vue-eslint-parser": "9.1.0",
|
102
|
+
"vue-tsc": "1.0.9",
|
103
|
+
"webpack": "^5.0.0"
|
104
|
+
},
|
105
|
+
"publishConfig": {
|
106
|
+
"access": "public",
|
107
|
+
"registry": "https://registry.npmjs.org/"
|
108
|
+
},
|
109
|
+
"pnpm": {
|
110
|
+
"peerDependencyRules": {
|
111
|
+
"ignoreMissing": [
|
112
|
+
"rollup",
|
113
|
+
"webpack"
|
114
|
+
]
|
115
|
+
}
|
116
|
+
},
|
117
|
+
"volta": {
|
118
|
+
"node": "16.13.1"
|
119
|
+
},
|
120
|
+
"author": "lyn",
|
121
|
+
"license": "MIT"
|
122
|
+
}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
const data = {
|
2
|
-
"width": 1024,
|
3
|
-
"height": 1024,
|
4
|
-
"body": '<path fill="currentColor" d="M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64z"/><path fill="currentColor" d="M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0z"/><path fill="currentColor" d="M512 896a384 384 0 1 0 0-768a384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896a448 448 0 0 1 0 896z"/>'
|
5
|
-
};
|
6
|
-
export {
|
7
|
-
data as default
|
8
|
-
};
|