@kg-ui/kg-ui-plus 0.1.5 → 0.1.7

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.
Files changed (62) hide show
  1. package/README.md +3 -3
  2. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +1 -1
  3. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +1 -1
  4. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue3.mjs +2 -2
  5. package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +2 -2
  6. package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +2 -2
  7. package/dist/es/KgCopilot/CopiFooter/SearchInput/NewTheme.vue.mjs +1 -1
  8. package/dist/es/KgCopilot/CopiFooter/SearchInput/NewTheme.vue2.mjs +1 -1
  9. package/dist/es/KgCopilot/CopiFooter/SearchInput/NewTheme.vue3.mjs +2 -2
  10. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue.mjs +1 -1
  11. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue3.mjs +2 -2
  12. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue.mjs +1 -1
  13. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue2.mjs +5 -10
  14. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue3.mjs +2 -2
  15. package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +1 -1
  16. package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +2 -2
  17. package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
  18. package/dist/es/KgCopilot/dialogue/index.vue2.mjs +12 -58
  19. package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
  20. package/dist/es/KgCopilot/dialogue/messageParse/edit.vue.mjs +1 -1
  21. package/dist/es/KgCopilot/dialogue/messageParse/edit.vue3.mjs +2 -2
  22. package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue.mjs +10 -5
  23. package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue2.mjs +2 -2
  24. package/dist/es/KgCopilot/dialogue/messageParse/index.vue.mjs +1 -1
  25. package/dist/es/KgCopilot/dialogue/messageParse/index.vue3.mjs +2 -2
  26. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue.mjs +1 -1
  27. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue2.mjs +2 -2
  28. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue3.mjs +2 -2
  29. package/dist/es/KgCopilot/index.vue.mjs +1 -1
  30. package/dist/es/KgCopilot/index.vue3.mjs +2 -2
  31. package/dist/es/home/LFilter/FilterArea.vue.mjs +1 -1
  32. package/dist/es/home/LFilter/FilterArea.vue2.mjs +1 -1
  33. package/dist/es/home/LFilter/FilterArea.vue3.mjs +2 -2
  34. package/dist/es/home/LFilter/FilterItem.vue.mjs +1 -1
  35. package/dist/es/home/LFilter/FilterItem.vue2.mjs +1 -1
  36. package/dist/es/home/LFilter/FilterItem.vue3.mjs +2 -2
  37. package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +1 -1
  38. package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +1 -1
  39. package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +2 -2
  40. package/dist/es/home/LProject/index.vue.mjs +1 -1
  41. package/dist/es/home/LProject/index.vue3.mjs +2 -2
  42. package/dist/es/home/index.vue.mjs +1 -1
  43. package/dist/es/home/index.vue3.mjs +2 -2
  44. package/dist/es/node_modules/.pnpm/{dompurify@3.1.5 → dompurify@3.0.10}/node_modules/dompurify/dist/purify.es.mjs +11 -48
  45. package/dist/es/node_modules/.pnpm/{marked@12.0.2 → marked@12.0.1}/node_modules/marked/lib/marked.esm.mjs +1 -2
  46. package/dist/es/store/modules/copilot.mjs +15 -17
  47. package/dist/es/style.css +1 -1
  48. package/package.json +123 -123
  49. package/dist/es/KgCopilot/CopiFooter/SearchInput/SpeechControl.vue.mjs +0 -7
  50. package/dist/es/KgCopilot/CopiFooter/SearchInput/SpeechControl.vue2.mjs +0 -33
  51. package/dist/es/KgCopilot/CopiFooter/SearchInput/SpeechControl.vue3.mjs +0 -4
  52. package/dist/es/KgCopilot/CopiFooter/SearchInput/Upload.vue.mjs +0 -7
  53. package/dist/es/KgCopilot/CopiFooter/SearchInput/Upload.vue2.mjs +0 -140
  54. package/dist/es/KgCopilot/CopiFooter/SearchInput/Upload.vue3.mjs +0 -4
  55. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +0 -8
  56. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +0 -8
  57. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +0 -8
  58. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +0 -8
  59. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +0 -8
  60. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +0 -8
  61. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +0 -8
  62. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +0 -8
package/package.json CHANGED
@@ -1,123 +1,123 @@
1
- {
2
- "name": "@kg-ui/kg-ui-plus",
3
- "version": "0.1.5",
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
- "@vueuse/core": "^9.13.0",
38
- "axios": "1.2.0",
39
- "dayjs": "1.11.6",
40
- "dompurify": "^3.0.10",
41
- "element-plus": "2.2.27",
42
- "highlight.js": "^11.9.0",
43
- "marked": "^12.0.1",
44
- "path": "0.12.7",
45
- "pinia": "2.0.28",
46
- "pinyin-match": "1.2.4",
47
- "qs": "6.11.0"
48
- },
49
- "devDependencies": {
50
- "@babel/core": ">=7.0.0-0 <8.0.0",
51
- "@commitlint/cli": "13.1.0",
52
- "@commitlint/config-conventional": "13.1.0",
53
- "@iconify-icons/ep": "1.2.7",
54
- "@iconify-icons/ph": "^1.2.5",
55
- "@iconify-icons/ri": "1.2.3",
56
- "@iconify/vue": "4.0.0",
57
- "@types/node": "18.11.9",
58
- "@types/qs": "6.9.7",
59
- "@typescript-eslint/eslint-plugin": "5.42.1",
60
- "@typescript-eslint/parser": "5.42.1",
61
- "@vitejs/plugin-vue": "4.0.0",
62
- "@vitejs/plugin-vue-jsx": "3.0.0",
63
- "@vue/eslint-config-prettier": "7.0.0",
64
- "@vue/eslint-config-typescript": "11.0.2",
65
- "autoprefixer": "10.4.13",
66
- "cloc": "2.10.0",
67
- "cssnano": "5.1.14",
68
- "eslint": "8.8.0",
69
- "eslint-plugin-prettier": "4.0.0",
70
- "eslint-plugin-vue": "9.7.0",
71
- "husky": "7.0.4",
72
- "lint-staged": "11.1.2",
73
- "picocolors": "1.0.0",
74
- "postcss": "8.4.18",
75
- "postcss-html": "1.5.0",
76
- "postcss-import": "15.0.0",
77
- "postcss-scss": "4.0.5",
78
- "prettier": "2.5.1",
79
- "pretty-quick": "3.1.1",
80
- "rimraf": "3.0.2",
81
- "rollup-plugin-visualizer": "5.8.3",
82
- "sass": "^1.72.0",
83
- "sass-loader": "^14.1.1",
84
- "stylelint": "^14.16.1",
85
- "stylelint-config-html": "^1.1.0",
86
- "stylelint-config-prettier": "^9.0.5",
87
- "stylelint-config-recommended": "^9.0.0",
88
- "stylelint-config-standard": "^29.0.0",
89
- "stylelint-order": "^5.0.0",
90
- "svgo": "3.0.2",
91
- "tailwindcss": "3.2.4",
92
- "terser": "5.16.1",
93
- "typescript": "4.9.3",
94
- "unplugin-vue-define-options": "0.12.2",
95
- "vite": "4.0.3",
96
- "vite-plugin-cdn-import": "0.3.5",
97
- "vite-plugin-compression": "0.5.1",
98
- "vite-plugin-dts": "1.4.1",
99
- "vite-plugin-remove-console": "1.3.0",
100
- "vite-svg-loader": "3.6.0",
101
- "vue": "3.2.45",
102
- "vue-eslint-parser": "9.1.0",
103
- "vue-tsc": "1.0.9",
104
- "webpack": "^5.0.0"
105
- },
106
- "publishConfig": {
107
- "access": "public",
108
- "registry": "https://registry.npmjs.org/"
109
- },
110
- "pnpm": {
111
- "peerDependencyRules": {
112
- "ignoreMissing": [
113
- "rollup",
114
- "webpack"
115
- ]
116
- }
117
- },
118
- "volta": {
119
- "node": "16.13.1"
120
- },
121
- "author": "lyn",
122
- "license": "MIT"
123
- }
1
+ {
2
+ "name": "@kg-ui/kg-ui-plus",
3
+ "version": "0.1.7",
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
+ "@vueuse/core": "^9.13.0",
38
+ "axios": "1.2.0",
39
+ "dayjs": "1.11.6",
40
+ "dompurify": "^3.0.10",
41
+ "element-plus": "2.2.27",
42
+ "highlight.js": "^11.9.0",
43
+ "marked": "^12.0.1",
44
+ "path": "0.12.7",
45
+ "pinia": "2.0.28",
46
+ "pinyin-match": "1.2.4",
47
+ "qs": "6.11.0"
48
+ },
49
+ "devDependencies": {
50
+ "@babel/core": ">=7.0.0-0 <8.0.0",
51
+ "@commitlint/cli": "13.1.0",
52
+ "@commitlint/config-conventional": "13.1.0",
53
+ "@iconify-icons/ep": "1.2.7",
54
+ "@iconify-icons/ph": "^1.2.5",
55
+ "@iconify-icons/ri": "1.2.3",
56
+ "@iconify/vue": "4.0.0",
57
+ "@types/node": "18.11.9",
58
+ "@types/qs": "6.9.7",
59
+ "@typescript-eslint/eslint-plugin": "5.42.1",
60
+ "@typescript-eslint/parser": "5.42.1",
61
+ "@vitejs/plugin-vue": "4.0.0",
62
+ "@vitejs/plugin-vue-jsx": "3.0.0",
63
+ "@vue/eslint-config-prettier": "7.0.0",
64
+ "@vue/eslint-config-typescript": "11.0.2",
65
+ "autoprefixer": "10.4.13",
66
+ "cloc": "2.10.0",
67
+ "cssnano": "5.1.14",
68
+ "eslint": "8.8.0",
69
+ "eslint-plugin-prettier": "4.0.0",
70
+ "eslint-plugin-vue": "9.7.0",
71
+ "husky": "7.0.4",
72
+ "lint-staged": "11.1.2",
73
+ "picocolors": "1.0.0",
74
+ "postcss": "8.4.18",
75
+ "postcss-html": "1.5.0",
76
+ "postcss-import": "15.0.0",
77
+ "postcss-scss": "4.0.5",
78
+ "prettier": "2.5.1",
79
+ "pretty-quick": "3.1.1",
80
+ "rimraf": "3.0.2",
81
+ "rollup-plugin-visualizer": "5.8.3",
82
+ "sass": "^1.72.0",
83
+ "sass-loader": "^14.1.1",
84
+ "stylelint": "^14.16.1",
85
+ "stylelint-config-html": "^1.1.0",
86
+ "stylelint-config-prettier": "^9.0.5",
87
+ "stylelint-config-recommended": "^9.0.0",
88
+ "stylelint-config-standard": "^29.0.0",
89
+ "stylelint-order": "^5.0.0",
90
+ "svgo": "3.0.2",
91
+ "tailwindcss": "3.2.4",
92
+ "terser": "5.16.1",
93
+ "typescript": "4.9.3",
94
+ "unplugin-vue-define-options": "0.12.2",
95
+ "vite": "4.0.3",
96
+ "vite-plugin-cdn-import": "0.3.5",
97
+ "vite-plugin-compression": "0.5.1",
98
+ "vite-plugin-dts": "1.4.1",
99
+ "vite-plugin-remove-console": "1.3.0",
100
+ "vite-svg-loader": "3.6.0",
101
+ "vue": "3.2.45",
102
+ "vue-eslint-parser": "9.1.0",
103
+ "vue-tsc": "1.0.9",
104
+ "webpack": "^5.0.0"
105
+ },
106
+ "publishConfig": {
107
+ "access": "public",
108
+ "registry": "https://registry.npmjs.org/"
109
+ },
110
+ "pnpm": {
111
+ "peerDependencyRules": {
112
+ "ignoreMissing": [
113
+ "rollup",
114
+ "webpack"
115
+ ]
116
+ }
117
+ },
118
+ "volta": {
119
+ "node": "16.13.1"
120
+ },
121
+ "author": "lyn",
122
+ "license": "MIT"
123
+ }
@@ -1,7 +0,0 @@
1
- import _sfc_main from "./SpeechControl.vue2.mjs";
2
- import "./SpeechControl.vue3.mjs";
3
- import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const SpeechControl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2de838e5"]]);
5
- export {
6
- SpeechControl as default
7
- };
@@ -1,33 +0,0 @@
1
- import { defineComponent, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, unref } from "vue";
2
- import data from "../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs";
3
- const _hoisted_1 = { class: "top-controls" };
4
- const _hoisted_2 = { class: "icon-button" };
5
- const _sfc_main = /* @__PURE__ */ defineComponent({
6
- __name: "SpeechControl",
7
- setup(__props) {
8
- return (_ctx, _cache) => {
9
- const _component_IconifyIconOffline = resolveComponent("IconifyIconOffline");
10
- const _component_el_tooltip = resolveComponent("el-tooltip");
11
- return openBlock(), createElementBlock("div", _hoisted_1, [
12
- createVNode(_component_el_tooltip, {
13
- content: "使用麦克风",
14
- placement: "top"
15
- }, {
16
- default: withCtx(() => [
17
- createElementVNode("button", _hoisted_2, [
18
- createVNode(_component_IconifyIconOffline, {
19
- class: "icon",
20
- icon: unref(data),
21
- style: { "color": "#1e56ea" }
22
- }, null, 8, ["icon"])
23
- ])
24
- ]),
25
- _: 1
26
- })
27
- ]);
28
- };
29
- }
30
- });
31
- export {
32
- _sfc_main as default
33
- };
@@ -1,4 +0,0 @@
1
- const SpeechControl_vue_vue_type_style_index_0_scoped_2de838e5_lang = "";
2
- export {
3
- SpeechControl_vue_vue_type_style_index_0_scoped_2de838e5_lang as default
4
- };
@@ -1,7 +0,0 @@
1
- import _sfc_main from "./Upload.vue2.mjs";
2
- import "./Upload.vue3.mjs";
3
- import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-94f38585"]]);
5
- export {
6
- Upload as default
7
- };
@@ -1,140 +0,0 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, withDirectives, createBlock, withCtx, createElementVNode, createVNode, unref, createTextVNode, createCommentVNode, pushScopeId, popScopeId } from "vue";
2
- import data from "../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs";
3
- import data$1 from "../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs";
4
- import { ClickOutside, genFileId } from "element-plus";
5
- const _withScopeId = (n) => (pushScopeId("data-v-94f38585"), n = n(), popScopeId(), n);
6
- const _hoisted_1 = { class: "pic-control" };
7
- const _hoisted_2 = { class: "visual-search" };
8
- const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "visual-search-title" }, "添加图像", -1));
9
- const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "search-input" }, [
10
- /* @__PURE__ */ createElementVNode("input", {
11
- type: "text",
12
- class: "search-input",
13
- placeholder: "粘贴图像或链接"
14
- })
15
- ], -1));
16
- const _hoisted_5 = { class: "push-pic" };
17
- const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "icon header-avatar rounded-full" }, [
18
- /* @__PURE__ */ createElementVNode("svg", {
19
- viewBox: "0 0 24 24",
20
- xmlns: "http://www.w3.org/2000/svg"
21
- }, [
22
- /* @__PURE__ */ createElementVNode("path", { d: "M17.75 3C19.5449 3 21 4.45508 21 6.25V9.25C21 9.66421 20.6642 10 20.25 10C19.8358 10 19.5 9.66421 19.5 9.25V6.25C19.5 5.2835 18.7165 4.5 17.75 4.5L14.75 4.5C14.3358 4.5 14 4.16421 14 3.75C14 3.33579 14.3358 3 14.75 3H17.75ZM6.25 3C4.45507 3 3 4.45507 3 6.25V9.25C3 9.66421 3.33579 10 3.75 10C4.16421 10 4.5 9.66421 4.5 9.25V6.25C4.5 5.2835 5.2835 4.5 6.25 4.5H9.25C9.66421 4.5 10 4.16421 10 3.75C10 3.33579 9.66421 3 9.25 3H6.25ZM17.75 21C19.5449 21 21 19.5449 21 17.75V14.75C21 14.3358 20.6642 14 20.25 14C19.8358 14 19.5 14.3358 19.5 14.75V17.75C19.5 18.7165 18.7165 19.5 17.75 19.5H14.75C14.3358 19.5 14 19.8358 14 20.25C14 20.6642 14.3358 21 14.75 21H17.75ZM3 17.75C3 19.5449 4.45507 21 6.25 21H9.25C9.66421 21 10 20.6642 10 20.25C10 19.8358 9.66421 19.5 9.25 19.5H6.25C5.2835 19.5 4.5 18.7165 4.5 17.75L4.5 14.75C4.5 14.3358 4.16421 14 3.75 14C3.33579 14 3 14.3358 3 14.75L3 17.75ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15ZM12 13.5C11.1716 13.5 10.5 12.8284 10.5 12C10.5 11.1716 11.1716 10.5 12 10.5C12.8284 10.5 13.5 11.1716 13.5 12C13.5 12.8284 12.8284 13.5 12 13.5ZM7.5 8.5C8.05229 8.5 8.5 8.05229 8.5 7.5C8.5 6.94772 8.05229 6.5 7.5 6.5C6.94772 6.5 6.5 6.94772 6.5 7.5C6.5 8.05229 6.94772 8.5 7.5 8.5Z" })
23
- ])
24
- ], -1));
25
- const _hoisted_7 = [
26
- _hoisted_6
27
- ];
28
- const _hoisted_8 = { class: "icon-button" };
29
- const _sfc_main = /* @__PURE__ */ defineComponent({
30
- __name: "Upload",
31
- props: {
32
- type: null
33
- },
34
- setup(__props) {
35
- const props = __props;
36
- const toolTip = ref("");
37
- if (props.type === "pic") {
38
- toolTip.value = "添加图像";
39
- } else {
40
- toolTip.value = "添加文件";
41
- }
42
- const upload = ref();
43
- const isShowPictureCard = ref(false);
44
- const clickAddPicture = () => {
45
- if (props.type === "pic") {
46
- isShowPictureCard.value = true;
47
- }
48
- };
49
- const onClickOutside = () => {
50
- if (props.type === "pic") {
51
- isShowPictureCard.value = false;
52
- }
53
- };
54
- const handleExceed = (files) => {
55
- upload.value.clearFiles();
56
- const file = files[0];
57
- file.uid = genFileId();
58
- upload.value.handleStart(file);
59
- };
60
- return (_ctx, _cache) => {
61
- const _component_IconifyIconOffline = resolveComponent("IconifyIconOffline");
62
- const _component_el_upload = resolveComponent("el-upload");
63
- const _component_el_card = resolveComponent("el-card");
64
- const _component_el_tooltip = resolveComponent("el-tooltip");
65
- return openBlock(), createElementBlock("div", _hoisted_1, [
66
- isShowPictureCard.value ? withDirectives((openBlock(), createBlock(_component_el_card, {
67
- key: 0,
68
- style: { "width": "250px" },
69
- class: "visual-search"
70
- }, {
71
- default: withCtx(() => [
72
- createElementVNode("div", _hoisted_2, [
73
- _hoisted_3,
74
- _hoisted_4,
75
- createVNode(_component_el_upload, {
76
- ref_key: "upload",
77
- ref: upload,
78
- style: { "width": "100%" },
79
- action: "https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15",
80
- limit: 1,
81
- "show-file-list": false,
82
- "on-exceed": handleExceed,
83
- "auto-upload": false
84
- }, {
85
- trigger: withCtx(() => [
86
- createElementVNode("button", _hoisted_5, [
87
- createVNode(_component_IconifyIconOffline, { icon: unref(data) }, null, 8, ["icon"]),
88
- createTextVNode("从此设备上传 ")
89
- ])
90
- ]),
91
- _: 1
92
- }, 512)
93
- ])
94
- ]),
95
- _: 1
96
- })), [
97
- [unref(ClickOutside), onClickOutside]
98
- ]) : createCommentVNode("", true),
99
- createVNode(_component_el_tooltip, {
100
- content: toolTip.value,
101
- placement: "top"
102
- }, {
103
- default: withCtx(() => [
104
- __props.type === "pic" ? (openBlock(), createElementBlock("button", {
105
- key: 0,
106
- class: "icon-button",
107
- ref: "buttonRef",
108
- onClick: clickAddPicture
109
- }, _hoisted_7, 512)) : createCommentVNode("", true),
110
- __props.type === "file" ? (openBlock(), createBlock(_component_el_upload, {
111
- key: 1,
112
- ref_key: "upload",
113
- ref: upload,
114
- style: { "width": "100%" },
115
- action: "https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15",
116
- limit: 1,
117
- "show-file-list": false,
118
- "on-exceed": handleExceed,
119
- "auto-upload": false
120
- }, {
121
- trigger: withCtx(() => [
122
- createElementVNode("button", _hoisted_8, [
123
- createVNode(_component_IconifyIconOffline, {
124
- class: "icon",
125
- icon: unref(data$1)
126
- }, null, 8, ["icon"])
127
- ])
128
- ]),
129
- _: 1
130
- }, 512)) : createCommentVNode("", true)
131
- ]),
132
- _: 1
133
- }, 8, ["content"])
134
- ]);
135
- };
136
- }
137
- });
138
- export {
139
- _sfc_main as default
140
- };
@@ -1,4 +0,0 @@
1
- const Upload_vue_vue_type_style_index_0_scoped_94f38585_lang = "";
2
- export {
3
- Upload_vue_vue_type_style_index_0_scoped_94f38585_lang as default
4
- };
@@ -1,8 +0,0 @@
1
- const data = {
2
- "width": 1024,
3
- "height": 1024,
4
- "body": '<path fill="currentColor" d="M512 128a128 128 0 0 0-128 128v256a128 128 0 1 0 256 0V256a128 128 0 0 0-128-128zm0-64a192 192 0 0 1 192 192v256a192 192 0 1 1-384 0V256A192 192 0 0 1 512 64zm-32 832v-64a288 288 0 0 1-288-288v-32a32 32 0 0 1 64 0v32a224 224 0 0 0 224 224h64a224 224 0 0 0 224-224v-32a32 32 0 1 1 64 0v32a288 288 0 0 1-288 288v64h64a32 32 0 1 1 0 64H416a32 32 0 1 1 0-64h64z"/>'
5
- };
6
- export {
7
- data as default
8
- };
@@ -1,8 +0,0 @@
1
- const data = {
2
- "width": 1024,
3
- "height": 1024,
4
- "body": '<path fill="currentColor" d="M602.496 240.448A192 192 0 1 1 874.048 512l-316.8 316.8A256 256 0 0 1 195.2 466.752L602.496 59.456l45.248 45.248L240.448 512A192 192 0 0 0 512 783.552l316.8-316.8a128 128 0 1 0-181.056-181.056L353.6 579.904a32 32 0 1 0 45.248 45.248l294.144-294.144l45.312 45.248L444.096 670.4a96 96 0 1 1-135.744-135.744l294.144-294.208z"/>'
5
- };
6
- export {
7
- data as default
8
- };
@@ -1,8 +0,0 @@
1
- const data = {
2
- "width": 1024,
3
- "height": 1024,
4
- "body": '<path fill="currentColor" d="M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64zm384-578.304V704h-64V247.296L237.248 490.048L192 444.8L508.8 128l316.8 316.8l-45.312 45.248L544 253.696z"/>'
5
- };
6
- export {
7
- data as default
8
- };
@@ -1,8 +0,0 @@
1
- const data = {
2
- "width": 256,
3
- "height": 256,
4
- "body": '<path fill="currentColor" d="M184 64H40a8 8 0 0 0-8 8v144a8 8 0 0 0 8 8h144a8 8 0 0 0 8-8V72a8 8 0 0 0-8-8Zm-8 144H48V80h128Zm48-168v144a8 8 0 0 1-16 0V48H72a8 8 0 0 1 0-16h144a8 8 0 0 1 8 8Z"/>'
5
- };
6
- export {
7
- data as default
8
- };
@@ -1,8 +0,0 @@
1
- const data = {
2
- "width": 256,
3
- "height": 256,
4
- "body": '<path fill="currentColor" d="M154.64 26.61a6 6 0 0 0-6.32.65L77.94 82H32a14 14 0 0 0-14 14v64a14 14 0 0 0 14 14h45.94l70.38 54.74A6 6 0 0 0 158 224V32a6 6 0 0 0-3.36-5.39ZM30 160V96a2 2 0 0 1 2-2h42v68H32a2 2 0 0 1-2-2Zm116 51.73l-60-46.66V90.93l60-46.66Zm50.53-108.85a38 38 0 0 1 0 50.24a6 6 0 1 1-9-7.94a26 26 0 0 0 0-34.37a6 6 0 0 1 9-7.93ZM246 128a77.86 77.86 0 0 1-19.86 52a6 6 0 1 1-8.94-8a66 66 0 0 0 0-88a6 6 0 1 1 8.94-8A77.86 77.86 0 0 1 246 128Z"/>'
5
- };
6
- export {
7
- data as default
8
- };
@@ -1,8 +0,0 @@
1
- const data = {
2
- "width": 256,
3
- "height": 256,
4
- "body": '<path fill="currentColor" d="m235.85 157.52l-12-96A20 20 0 0 0 204 44H32a12 12 0 0 0-12 12v88a12 12 0 0 0 12 12h45.53l38.89 77.79A4 4 0 0 0 120 236a36 36 0 0 0 36-36v-20h60a20 20 0 0 0 19.85-22.48ZM76 148H32a4 4 0 0 1-4-4V56a4 4 0 0 1 4-4h44Zm149 19.94a12 12 0 0 1-9 4.06h-64a4 4 0 0 0-4 4v24a28 28 0 0 1-25.58 27.9L84 151.06V52h120a12 12 0 0 1 11.91 10.51l12 96a12 12 0 0 1-2.91 9.43Z"/>'
5
- };
6
- export {
7
- data as default
8
- };
@@ -1,8 +0,0 @@
1
- const data = {
2
- "width": 256,
3
- "height": 256,
4
- "body": '<path fill="currentColor" d="M231 82.76A20 20 0 0 0 216 76h-60V56a36 36 0 0 0-36-36a4 4 0 0 0-3.58 2.21L77.53 100H32a12 12 0 0 0-12 12v88a12 12 0 0 0 12 12h172a20 20 0 0 0 19.85-17.52l12-96A20 20 0 0 0 231 82.76ZM76 204H32a4 4 0 0 1-4-4v-88a4 4 0 0 1 4-4h44ZM227.91 97.49l-12 96A12 12 0 0 1 204 204H84v-99.06l38.42-76.84A28 28 0 0 1 148 56v24a4 4 0 0 0 4 4h64a12 12 0 0 1 11.91 13.49Z"/>'
5
- };
6
- export {
7
- data as default
8
- };
@@ -1,8 +0,0 @@
1
- const data = {
2
- "width": 24,
3
- "height": 24,
4
- "body": '<path fill="currentColor" d="M3 19h18v2H3v-2zm10-5.828L19.071 7.1l1.414 1.414L12 17L3.515 8.515L4.929 7.1L11 13.17V2h2v11.172z"/>'
5
- };
6
- export {
7
- data as default
8
- };