ai-chat-bot-interface 1.7.8 → 1.7.10

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 (56) hide show
  1. package/dist/ai-chat-bot-interface.css +9 -0
  2. package/dist/ai-chat-bot-interface.es.js +13340 -0
  3. package/dist/ai-chat-bot-interface.umd.js +111 -0
  4. package/dist/src/index.d.ts +0 -0
  5. package/package.json +26 -5
  6. package/.prettierignore +0 -5
  7. package/.prettierrc.cjs +0 -37
  8. package/.vscode/extensions.json +0 -3
  9. package/index.html +0 -13
  10. package/index.js +0 -11
  11. package/src/App.vue +0 -39
  12. package/src/ChatUi.less +0 -301
  13. package/src/ChatUi.vue +0 -1087
  14. package/src/assets/styles/public.less +0 -152
  15. package/src/assets/vue.svg +0 -1
  16. package/src/components/DishesCard.vue +0 -369
  17. package/src/components/DishesList.vue +0 -218
  18. package/src/components/MarkdownPlan/MarkdownViewer.vue +0 -34
  19. package/src/components/OperateModule.less +0 -186
  20. package/src/components/OperateModule.vue +0 -392
  21. package/src/components/PlanCard.vue +0 -114
  22. package/src/components/StoreList/StoreCard.vue +0 -72
  23. package/src/components/StoreList/StoreList.vue +0 -27
  24. package/src/components/StoreList/mock.js +0 -411
  25. package/src/components/assistantReplay/assistantReplay.vue +0 -78
  26. package/src/components/icons/ArrowDown.vue +0 -26
  27. package/src/components/icons/ArrowRight.vue +0 -19
  28. package/src/components/icons/BackIcon.vue +0 -19
  29. package/src/components/icons/ClearIcon.vue +0 -18
  30. package/src/components/icons/CloseIcon.vue +0 -17
  31. package/src/components/icons/NewSessionIcon.vue +0 -20
  32. package/src/components/icons/OkIcon.vue +0 -26
  33. package/src/components/icons/SendIcon.vue +0 -22
  34. package/src/components/icons/ThinkingIcon.vue +0 -28
  35. package/src/components/icons/addIcon.vue +0 -18
  36. package/src/components/icons/cameraIcon.vue +0 -22
  37. package/src/components/icons/closeBorderIcon.vue +0 -35
  38. package/src/components/icons/fileIcon.vue +0 -18
  39. package/src/components/icons/loadingIcon.vue +0 -76
  40. package/src/components/icons/loadingIcon2.vue +0 -88
  41. package/src/components/icons/newChat.vue +0 -18
  42. package/src/components/icons/pictureIcon.vue +0 -22
  43. package/src/components/icons/processBar.vue +0 -115
  44. package/src/components/icons/progressRing.vue +0 -63
  45. package/src/components/icons/sendLoadingIcon.vue +0 -35
  46. package/src/components/icons/tagIcon.vue +0 -18
  47. package/src/components/imgeList.vue +0 -63
  48. package/src/components/personalForm/personalForm.vue +0 -634
  49. package/src/components/popup/popup.vue +0 -178
  50. package/src/main.js +0 -26
  51. package/src/style.css +0 -4
  52. package/src/utils/imagesViewer.js +0 -8
  53. package/src/utils/request.js +0 -52
  54. package/src/utils/tools.js +0 -20
  55. package/vite.config.js +0 -33
  56. /package/{public → dist}/vite.svg +0 -0
@@ -1,18 +0,0 @@
1
- <template>
2
- <svg
3
- width="1em"
4
- height="1em"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- >
9
- <path
10
- d="M13.5 4.5C13.5 3.67157 12.8284 3 12 3C11.1716 3 10.5 3.67157 10.5 4.5L10.5 10.5H4.5C3.67157 10.5 3 11.1716 3 12C3 12.8284 3.67157 13.5 4.5 13.5H10.5L10.5 19.5C10.5 20.3284 11.1716 21 12 21C12.8284 21 13.5 20.3284 13.5 19.5V13.5H19.5C20.3284 13.5 21 12.8284 21 12C21 11.1716 20.3284 10.5 19.5 10.5H13.5V4.5Z"
11
- fill="currentColor"
12
- />
13
- </svg>
14
- </template>
15
-
16
- <script></script>
17
-
18
- <style scoped></style>
@@ -1,22 +0,0 @@
1
- <template>
2
- <svg
3
- width="1em"
4
- height="1em"
5
- viewBox="0 0 25 24"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- >
9
- <path
10
- d="M6.03791 5.43733C4.02837 5.73154 2.36942 7.19356 2.01374 9.19314C1.80186 10.3843 1.625 11.7046 1.625 12.7932C1.625 14.1142 1.88543 15.7626 2.15286 17.1069C2.47288 18.7157 3.53388 20.0703 5.08995 20.5892C6.81466 21.1644 9.4087 21.7782 12.6246 21.7782C15.8579 21.7782 18.4626 21.1577 20.1872 20.5799C21.7264 20.0641 22.781 18.729 23.1036 17.138C23.3774 15.788 23.6415 14.1244 23.6242 12.7932C23.6125 11.8974 23.4692 10.8334 23.2896 9.83524C22.9086 7.71845 21.2484 6.11084 19.1702 5.55694C18.4877 5.37505 17.8729 4.99872 17.4004 4.47375L16.4669 3.4365C15.7716 2.66386 14.7809 2.22266 13.7415 2.22266H11.5077C10.4683 2.22266 9.47763 2.66385 8.78228 3.4365L7.85962 4.46171C7.38473 4.98939 6.74034 5.3345 6.03791 5.43733ZM15.0694 12.6113C15.0694 13.9614 13.975 15.0558 12.625 15.0558C11.275 15.0558 10.1805 13.9614 10.1805 12.6113C10.1805 11.2613 11.275 10.1669 12.625 10.1669C13.975 10.1669 15.0694 11.2613 15.0694 12.6113ZM17.5139 12.6113C17.5139 15.3114 15.325 17.5002 12.625 17.5002C9.92493 17.5002 7.7361 15.3114 7.7361 12.6113C7.7361 9.91127 9.92493 7.72244 12.625 7.72244C15.325 7.72244 17.5139 9.91127 17.5139 12.6113Z"
11
- fill="currentColor"
12
- />
13
- </svg>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- name: 'camreIcon',
19
- };
20
- </script>
21
-
22
- <style scoped></style>
@@ -1,35 +0,0 @@
1
- <template>
2
- <svg
3
- width="1em"
4
- height="1em"
5
- viewBox="0 0 16 16"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- >
9
- <rect
10
- x="0.5"
11
- y="0.5"
12
- width="15"
13
- height="15"
14
- rx="7.5"
15
- fill="black"
16
- fill-opacity="0.5"
17
- />
18
- <rect
19
- x="0.5"
20
- y="0.5"
21
- width="15"
22
- height="15"
23
- rx="7.5"
24
- stroke="currentColor"
25
- />
26
- <path
27
- d="M10.8284 6.58588C11.2189 6.19535 11.2189 5.56219 10.8284 5.17167C10.4379 4.78114 9.80471 4.78114 9.41419 5.17167L8 6.58586L6.58581 5.17167C6.19529 4.78114 5.56212 4.78114 5.1716 5.17167C4.78107 5.56219 4.78107 6.19535 5.1716 6.58588L6.58579 8.00007L5.17155 9.41431C4.78103 9.80483 4.78103 10.438 5.17155 10.8285C5.56207 11.219 6.19524 11.219 6.58576 10.8285L8 9.41428L9.41424 10.8285C9.80476 11.219 10.4379 11.219 10.8285 10.8285C11.219 10.438 11.219 9.80483 10.8285 9.41431L9.41421 8.00007L10.8284 6.58588Z"
28
- fill="currentColor"
29
- />
30
- </svg>
31
- </template>
32
-
33
- <script></script>
34
-
35
- <style scoped></style>
@@ -1,18 +0,0 @@
1
- <template>
2
- <svg
3
- width="1em"
4
- height="1em"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- >
9
- <path
10
- d="M18.0849 10.6565C19.9734 8.76795 19.9734 5.70607 18.0849 3.81756C16.1964 1.92905 13.1345 1.92905 11.246 3.81756L5.05399 10.0096C2.55177 12.5118 2.55177 16.5687 5.05399 19.0709C7.55622 21.5732 11.6131 21.5732 14.1154 19.0709L20.2421 12.9442C20.6326 12.5537 20.6326 11.9205 20.2421 11.53C19.8516 11.1394 19.2184 11.1394 18.8279 11.53L12.7011 17.6567C10.98 19.3779 8.18938 19.3779 6.46821 17.6567C4.74703 15.9355 4.74703 13.145 6.4682 11.4238L12.6602 5.23178C13.7677 4.12431 15.5632 4.12431 16.6707 5.23178C17.7781 6.33924 17.7781 8.13478 16.6707 9.24224L10.5401 15.3729C10.0481 15.8648 9.25051 15.8648 8.75856 15.3729C8.26661 14.8809 8.26661 14.0833 8.75856 13.5913L13.9435 8.40645C14.334 8.01592 14.334 7.38276 13.9435 6.99223C13.5529 6.60171 12.9198 6.60171 12.5292 6.99223L7.34435 12.1771C6.07135 13.4501 6.07135 15.5141 7.34435 16.7871C8.61735 18.0601 10.6813 18.0601 11.9543 16.7871L18.0849 10.6565Z"
11
- fill="currentColor"
12
- />
13
- </svg>
14
- </template>
15
-
16
- <script></script>
17
-
18
- <style scoped></style>
@@ -1,76 +0,0 @@
1
- <template>
2
- <svg
3
- width="1.5em"
4
- height="1em"
5
- viewBox="0 0 440 440"
6
- xmlns="http://www.w3.org/2000/svg"
7
- >
8
- <!-- A 球 -->
9
- <circle
10
- id="ballA"
11
- cx="220"
12
- cy="220"
13
- r="50"
14
- fill="rgba(0,0,0,0.8)"
15
- opacity="0.1"
16
- >
17
- <!-- 位置动画 -->
18
- <animate
19
- attributeName="cx"
20
- values="220; 40; 220; 400; 220"
21
- dur="1.5s"
22
- repeatCount="indefinite"
23
- />
24
- <!-- 大小动画 -->
25
- <animate
26
- attributeName="r"
27
- values="50; 80; 100; 80; 50"
28
- dur="1.5s"
29
- repeatCount="indefinite"
30
- />
31
- <!-- 透明度动画 -->
32
- <animate
33
- attributeName="opacity"
34
- values="0.1; 0.6; 1; 0.6; 0.1"
35
- dur="1.5s"
36
- repeatCount="indefinite"
37
- />
38
- </circle>
39
-
40
- <!-- B 球 -->
41
- <circle
42
- id="ballB"
43
- cx="220"
44
- cy="220"
45
- r="100"
46
- fill="rgba(0,0,0,0.8)"
47
- opacity="1"
48
- >
49
- <!-- 位置动画 -->
50
- <animate
51
- attributeName="cx"
52
- values="220; 400; 220; 40; 220"
53
- dur="1.5s"
54
- repeatCount="indefinite"
55
- />
56
- <!-- 大小动画 -->
57
- <animate
58
- attributeName="r"
59
- values="100; 80; 50; 80; 100"
60
- dur="1.5s"
61
- repeatCount="indefinite"
62
- />
63
- <!-- 透明度动画 -->
64
- <animate
65
- attributeName="opacity"
66
- values="1; 0.6; 0.1; 0.6; 1"
67
- dur="1.5s"
68
- repeatCount="indefinite"
69
- />
70
- </circle>
71
- </svg>
72
- </template>
73
-
74
- <script></script>
75
-
76
- <style scoped></style>
@@ -1,88 +0,0 @@
1
- <template>
2
- <svg
3
- width="1.5em"
4
- height="1em"
5
- viewBox="0 0 440 440"
6
- xmlns="http://www.w3.org/2000/svg"
7
- >
8
- <!-- A 球 -->
9
- <circle
10
- id="ballA"
11
- cx="220"
12
- cy="220"
13
- r="50"
14
- fill="rgba(0,0,0,0.8)"
15
- opacity="0.1"
16
- >
17
- <!-- 位置动画 -->
18
- <animate
19
- attributeName="cx"
20
- values="220; 40; 220; 400; 220"
21
- dur="1.5s"
22
- repeatCount="indefinite"
23
- calcMode="spline"
24
- keySplines="0.25 0.1 0.25 1; 0.25 0.1 0.25 1; 0.25 0.1 0.25 1; 0.25 0.1 0.25 1"
25
- />
26
- <!-- 大小动画 -->
27
- <animate
28
- attributeName="r"
29
- values="50; 80; 100; 80; 50"
30
- dur="1.5s"
31
- repeatCount="indefinite"
32
- calcMode="spline"
33
- keySplines="0.4 0.0 0.2 1; 0.4 0.0 0.2 1; 0.4 0.0 0.2 1; 0.4 0.0 0.2 1"
34
- />
35
- <!-- 透明度动画 -->
36
- <animate
37
- attributeName="opacity"
38
- values="0.1; 0.6; 1; 0.6; 0.1"
39
- dur="1.5s"
40
- repeatCount="indefinite"
41
- calcMode="spline"
42
- keySplines="0.6 0.2 0.8 0.4; 0.6 0.2 0.8 0.4; 0.6 0.2 0.8 0.4; 0.6 0.2 0.8 0.4"
43
- />
44
- </circle>
45
-
46
- <!-- B 球 -->
47
- <circle
48
- id="ballB"
49
- cx="220"
50
- cy="220"
51
- r="100"
52
- fill="rgba(0,0,0,0.8)"
53
- opacity="1"
54
- >
55
- <!-- 位置动画 -->
56
- <animate
57
- attributeName="cx"
58
- values="220; 400; 220; 40; 220"
59
- dur="1.5s"
60
- repeatCount="indefinite"
61
- calcMode="spline"
62
- keySplines="0.25 0.1 0.25 1; 0.25 0.1 0.25 1; 0.25 0.1 0.25 1; 0.25 0.1 0.25 1"
63
- />
64
- <!-- 大小动画 -->
65
- <animate
66
- attributeName="r"
67
- values="100; 80; 50; 80; 100"
68
- dur="1.5s"
69
- repeatCount="indefinite"
70
- calcMode="spline"
71
- keySplines="0.4 0.0 0.2 1; 0.4 0.0 0.2 1; 0.4 0.0 0.2 1; 0.4 0.0 0.2 1"
72
- />
73
- <!-- 透明度动画 -->
74
- <animate
75
- attributeName="opacity"
76
- values="1; 0.6; 0.1; 0.6; 1"
77
- dur="1.5s"
78
- repeatCount="indefinite"
79
- calcMode="spline"
80
- keySplines="0.6 0.2 0.8 0.4; 0.6 0.2 0.8 0.4; 0.6 0.2 0.8 0.4; 0.6 0.2 0.8 0.4"
81
- />
82
- </circle>
83
- </svg>
84
- </template>
85
-
86
- <script></script>
87
-
88
- <style scoped></style>
@@ -1,18 +0,0 @@
1
- <template>
2
- <svg
3
- width="1em"
4
- height="1em"
5
- viewBox="0 0 33 32"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- >
9
- <path
10
- d="M21 7.64355C21 7.09127 21.4477 6.64355 22 6.64355C22.5523 6.64355 23 7.09127 23 7.64355V9.64355H25C25.5523 9.64355 26 10.0913 26 10.6436C26 11.1958 25.5523 11.6436 25 11.6436H23V13.6436C23 14.1958 22.5523 14.6436 22 14.6436C21.4477 14.6436 21 14.1958 21 13.6436V11.6436H19C18.4477 11.6436 18 11.1958 18 10.6436C18 10.0913 18.4477 9.64355 19 9.64355H21V7.64355ZM9 10.6436C9 10.0913 9.44772 9.64355 10 9.64355H16.164C16.7162 9.64355 17.164 9.19584 17.164 8.64355C17.164 8.09127 16.7162 7.64355 16.164 7.64355H10C8.34315 7.64355 7 8.9867 7 10.6436V22.8527C7 24.7723 9.0737 25.9757 10.7403 25.0233L15.035 22.5693C15.1861 22.4829 15.3571 22.4375 15.5311 22.4375H22C23.6569 22.4375 25 21.0944 25 19.4375V16.32C25 15.7677 24.5523 15.32 24 15.32C23.4477 15.32 23 15.7677 23 16.32V19.4375C23 19.9898 22.5523 20.4375 22 20.4375H15.5311C15.009 20.4375 14.496 20.5737 14.0427 20.8328L9.74807 23.2869C9.41474 23.4773 9 23.2366 9 22.8527V10.6436Z"
11
- fill="currentColor"
12
- />
13
- </svg>
14
- </template>
15
-
16
- <script setup lang="ts"></script>
17
-
18
- <style scoped></style>
@@ -1,22 +0,0 @@
1
- <template>
2
- <svg
3
- width="1em"
4
- height="1em"
5
- viewBox="0 0 24 24"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- >
9
- <path
10
- d="M2.875 6C2.875 4.34315 4.21815 3 5.875 3H19.875C21.5319 3 22.875 4.34315 22.875 6V18C22.875 19.6569 21.5319 21 19.875 21H5.875C4.21815 21 2.875 19.6569 2.875 18V6ZM5.875 5C5.32272 5 4.875 5.44772 4.875 6V16.0852L10.475 11.8852C11.8972 10.8185 13.8528 10.8185 15.275 11.8852L20.875 16.0852V6C20.875 5.44772 20.4273 5 19.875 5H5.875ZM8.28442 10.0852C9.11285 10.0852 9.78442 9.41363 9.78442 8.58521C9.78442 7.75678 9.11285 7.08521 8.28442 7.08521C7.456 7.08521 6.78442 7.75678 6.78442 8.58521C6.78442 9.41363 7.456 10.0852 8.28442 10.0852Z"
11
- fill="currentColor"
12
- />
13
- </svg>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- name: 'pictureIcon',
19
- };
20
- </script>
21
-
22
- <style scoped></style>
@@ -1,115 +0,0 @@
1
- <template>
2
- <div class="cool-progress-container">
3
- <!-- 进度条外层容器 -->
4
- <div class="progress-bar-wrapper">
5
- <!-- 进度条主体(带渐变+流光) -->
6
- <div class="progress-bar" :style="{ width: `${percentage}%` }">
7
- <!-- 流光伪元素通过 CSS 实现,无需额外DOM -->
8
- </div>
9
- </div>
10
- <!-- 进度数字(发光效果) -->
11
- <span class="progress-text">{{ percentage }}%</span>
12
- </div>
13
- </template>
14
-
15
- <script setup>
16
- import { onMounted, ref } from 'vue';
17
- // 模拟进度值,可替换为业务数据
18
- const percentage = ref(0);
19
- const runner = ref('');
20
- onMounted(() => {
21
- percentage.value = 0;
22
- runFunc();
23
- });
24
-
25
- const runFunc = () => {
26
- let x = 0;
27
- let t = 100;
28
- const max = 95;
29
- const calcProcess = () => {
30
- const timer = setTimeout(() => {
31
- if (percentage.value >= max) {
32
- console.log('== stop ==', new Date().getTime());
33
- clearTimeout(timer);
34
- } else {
35
- if (percentage.value > 80) {
36
- t = 800;
37
- }
38
- percentage.value = (max * (1 - Math.exp(-x / 20))).toFixed(1);
39
- x += 0.5;
40
- calcProcess();
41
- }
42
- }, t);
43
- };
44
- console.log('== start ==', new Date().getTime());
45
- calcProcess();
46
- };
47
- </script>
48
-
49
- <style scoped>
50
- .cool-progress-container {
51
- width: 100%;
52
- max-width: 600px;
53
- margin: 20px 0;
54
- padding: 15px;
55
- background: #121212; /* 暗黑底色适配酷炫风 */
56
- border-radius: 12px;
57
- box-shadow: 0 0 20px rgba(0, 128, 255, 0.2);
58
- }
59
-
60
- .progress-bar-wrapper {
61
- height: 24px;
62
- width: 100%;
63
- background: rgba(255, 255, 255, 0.08);
64
- border-radius: 12px;
65
- overflow: hidden;
66
- position: relative;
67
- }
68
-
69
- .progress-bar {
70
- height: 100%;
71
- border-radius: 12px;
72
- /* 赛博朋克渐变底色 */
73
- background: linear-gradient(90deg, #00f5ff, #7928ca, #ff0080);
74
- position: relative;
75
- transition: width 0.5s ease-in;
76
- }
77
-
78
- /* 流光动画伪元素 */
79
- .progress-bar-wrapper::after {
80
- content: '';
81
- position: absolute;
82
- top: 0;
83
- left: -100%;
84
- width: 50%;
85
- height: 100%;
86
- background: linear-gradient(
87
- 90deg,
88
- transparent,
89
- rgba(255, 255, 255, 0.4),
90
- transparent
91
- );
92
- transform: skewX(-20deg);
93
- animation: light-flow 1.5s infinite linear;
94
- }
95
-
96
- /* 流光动画 */
97
- @keyframes light-flow {
98
- 0% {
99
- left: -100%;
100
- }
101
- 100% {
102
- left: 200%;
103
- }
104
- }
105
-
106
- /* 发光进度文字 */
107
- .progress-text {
108
- display: block;
109
- margin-top: 8px;
110
- font-size: 16px;
111
- font-weight: bold;
112
- color: #00f5ff;
113
- text-shadow: 0 0 10px #00f5ff, 0 0 20px #00f5ff;
114
- }
115
- </style>
@@ -1,63 +0,0 @@
1
- <template>
2
- <svg
3
- :width="size"
4
- :height="size"
5
- viewBox="0 0 100 100"
6
- xmlns="http://www.w3.org/2000/svg"
7
- >
8
- <!-- 绘制底层浅色圆环 -->
9
- <circle
10
- cx="50"
11
- cy="50"
12
- r="45"
13
- fill="none"
14
- :stroke="bgColor"
15
- stroke-width="8"
16
- />
17
- <!-- 绘制上层白色圆弧(带圆角端点) -->
18
- <path
19
- id="progressPath"
20
- d="M 50 5
21
- a 45 45 0 1 1 0 90
22
- a 45 45 0 1 1 0 -90"
23
- fill="none"
24
- :stroke="color"
25
- stroke-width="10"
26
- stroke-linecap="round"
27
- :stroke-dasharray="num.l"
28
- :stroke-dashoffset="num.p"
29
- />
30
- </svg>
31
- </template>
32
-
33
- <script setup>
34
- import { computed } from 'vue';
35
-
36
- const props = defineProps({
37
- percent: {
38
- type: Number,
39
- default: 75,
40
- },
41
- size: {
42
- type: Number,
43
- default: 48,
44
- },
45
- color: {
46
- type: String,
47
- default: '#fff',
48
- },
49
- bgColor: {
50
- type: String,
51
- default: '#888',
52
- },
53
- });
54
-
55
- const num = computed(() => {
56
- return {
57
- l: 2 * Math.PI * 45,
58
- p: (2 * Math.PI * 45 * (100 - props.percent)) / 100,
59
- };
60
- });
61
- </script>
62
-
63
- <style scoped></style>
@@ -1,35 +0,0 @@
1
- <script setup>
2
- const props = defineProps({
3
- color: {
4
- type: String,
5
- default: '#000'
6
- },
7
- bg: {
8
- type: String,
9
- default: '#039938'
10
- }
11
- })
12
- </script>
13
- <template>
14
-
15
- <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
16
- xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em">
17
- <circle cx="512" cy="512" r="512" :fill='bg'/>
18
- <path :fill="color" d="M512.042667 213.333333v74.666667a224 224 0 1 1-195.626667 114.773333l-65.194667-36.394666A298.666667 298.666667 0 1 0 512.042667 213.333333z"
19
- >
20
- <animateTransform
21
- attributeName="transform"
22
- type="rotate"
23
- from="0 512 512"
24
- to="360 512 512"
25
- dur="1.5s"
26
- repeatCount="indefinite"
27
- fill="freeze"
28
- />
29
- </path>
30
- </svg>
31
- </template>
32
-
33
- <style scoped>
34
-
35
- </style>
@@ -1,18 +0,0 @@
1
- <template>
2
- <svg
3
- width="1em"
4
- height="1em"
5
- viewBox="0 0 16 16"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- >
9
- <path
10
- d="M5.75335 4.13651C5.8677 3.70974 6.31858 3.36377 6.76041 3.36377C7.20223 3.36377 7.4677 3.70974 7.35335 4.13651L7.14629 4.90928L10.3463 4.90928L10.5533 4.13651C10.6677 3.70974 11.1186 3.36377 11.5604 3.36377C12.0022 3.36377 12.2677 3.70974 12.1533 4.13651L11.9463 4.90928H12.8282C13.2701 4.90928 13.5355 5.25525 13.4212 5.68202C13.3068 6.10879 12.8559 6.45476 12.4141 6.45476H11.5322L10.704 9.54561H11.5859C12.0277 9.54561 12.2932 9.89157 12.1788 10.3183C12.0645 10.7451 11.6136 11.0911 11.1718 11.0911H10.2899L10.0828 11.8639C9.96844 12.2907 9.51757 12.6367 9.07574 12.6367C8.63391 12.6367 8.36844 12.2907 8.4828 11.8639L8.68988 11.0911L5.48986 11.0911L5.28278 11.8639C5.16843 12.2907 4.71756 12.6367 4.27573 12.6367C3.8339 12.6367 3.56843 12.2907 3.68278 11.8639L3.88986 11.0911H3.17178C2.72995 11.0911 2.46448 10.7451 2.57884 10.3183C2.69319 9.89157 3.14407 9.54561 3.58589 9.54561H4.30397L4.67327 8.16737C4.78763 7.7406 5.2385 7.39463 5.68033 7.39463C6.12215 7.39463 6.38763 7.7406 6.27327 8.16737L5.90398 9.54561L9.10399 9.54561L9.93218 6.45476L4.41412 6.45476C3.97229 6.45476 3.70682 6.10879 3.82117 5.68202C3.93553 5.25524 4.3864 4.90928 4.82823 4.90928H5.54629L5.75335 4.13651Z"
11
- fill="currentColor"
12
- />
13
- </svg>
14
- </template>
15
-
16
- <script></script>
17
-
18
- <style scoped></style>
@@ -1,63 +0,0 @@
1
- <template>
2
- <div class="img_wrap" :class="list.length > 1 ? 'grid_2' : 'grid_1'">
3
- <img
4
- v-for="info in list"
5
- :key="info.file_id"
6
- class="img"
7
- width="100%"
8
- :src="caseExtra(info)"
9
- :alt="info.name"
10
- @click.stop="previewImg"
11
- />
12
- </div>
13
- </template>
14
-
15
- <script setup>
16
- import { api as viewerApi } from 'v-viewer';
17
- import 'viewerjs/dist/viewer.css';
18
-
19
- const props = defineProps({
20
- list: {
21
- type: Array,
22
- required: true,
23
- },
24
- });
25
- const pdfIcon = 'https://prodstatic.weis1606.cn/api/smartFood/icon/pdf_icon.png';
26
-
27
- const previewImg = () => {
28
- const imgList = props.list.filter((item) => item.type === 'image' && item.file_url);
29
- if(imgList.length) {
30
- viewerApi({
31
- images: imgList.map(item => item.file_url),
32
- });
33
- }
34
- };
35
- const caseExtra = ({type, name, file_url}) => {
36
- console.log(props.list);
37
- let url = file_url;
38
- if(type === 'file' && name.toLowerCase().endsWith('pdf')) {
39
- url = pdfIcon;
40
- }
41
- return url;
42
- }
43
-
44
- </script>
45
-
46
- <style scoped lang="less">
47
- .img_wrap {
48
- display: grid;
49
- gap: 10px;
50
- justify-content: right;
51
- padding: 10px 0;
52
- .img {
53
- cursor: pointer;
54
- }
55
- &.grid_1 {
56
- grid-template-columns: 200px;
57
- }
58
- &.grid_2 {
59
- display: grid;
60
- grid-template-columns: 100px 100px;
61
- }
62
- }
63
- </style>