@myun/gimi-chat 0.9.27 → 0.9.29

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 (50) hide show
  1. package/dist/client/components/history-list/index.module.css +6 -6
  2. package/dist/client/components/new-main/index.css +1 -1
  3. package/dist/client/components/slider/index.css +7 -7
  4. package/dist/components/ai-chat-dialogue/index.js +4 -4
  5. package/dist/components/ai-chat-dialogue/index.module copy.css +7 -7
  6. package/dist/components/ai-chat-dialogue/index.module.css +16 -9
  7. package/dist/components/ai-loading/index.module.css +1 -1
  8. package/dist/components/answer-item/index.module.css +9 -9
  9. package/dist/components/ask-card/index.js +6 -4
  10. package/dist/components/ask-card/index.module.css +10 -10
  11. package/dist/components/chat-input/extension/title-slot/index.less +3 -2
  12. package/dist/components/chat-input/index.js +13 -9
  13. package/dist/components/chat-input/index.module.css +11 -7
  14. package/dist/components/chat-voice/VoiceCommunication.js +5 -8
  15. package/dist/components/chat-voice/VoiceRecord.js +5 -8
  16. package/dist/components/dots-loading/index.module.css +1 -1
  17. package/dist/components/empty/index.module.css +1 -1
  18. package/dist/components/excel-components/index.module.css +15 -15
  19. package/dist/components/excel-components/styles.module.css +2 -2
  20. package/dist/components/file-card/index.js +5 -4
  21. package/dist/components/file-card/index.module.css +7 -7
  22. package/dist/components/file-preview/index.module.css +6 -6
  23. package/dist/components/file-upload/index.js +35 -9
  24. package/dist/components/iconfont-com/index.js +1 -1
  25. package/dist/components/knowledge-trace/index.module.css +12 -12
  26. package/dist/components/message-actions/CopyButton.js +5 -9
  27. package/dist/components/message-actions/LikeButton.js +7 -11
  28. package/dist/components/message-actions/RegenerateButton.js +2 -1
  29. package/dist/components/message-actions/UnLikeButton.js +7 -11
  30. package/dist/components/message-actions/VoicePlay.js +5 -10
  31. package/dist/components/message-list/index.module.css +9 -9
  32. package/dist/components/product-tag/index.module.css +3 -3
  33. package/dist/components/quoted-content/index.js +5 -6
  34. package/dist/components/quoted-content/index.module.css +33 -8
  35. package/dist/components/reasoning-content/index.module.css +5 -5
  36. package/dist/components/reference-content/index.module.css +5 -5
  37. package/dist/components/search-course-list/index.module.css +4 -4
  38. package/dist/components/search-result/index.module.css +12 -12
  39. package/dist/components/templates/index.module.css +1 -1
  40. package/dist/components/upload-list/CustomFile.js +20 -10
  41. package/dist/components/upload-list/ImageFile.js +22 -16
  42. package/dist/components/upload-list/customFile.module.css +6 -6
  43. package/dist/components/upload-list/imageFile.module.css +7 -15
  44. package/dist/components/upload-list/index.module.css +1 -1
  45. package/dist/components/voice-bars/index.js +1 -1
  46. package/dist/components/work-flow-content/index.module.css +1 -1
  47. package/dist/hooks/useFile.d.ts +1 -0
  48. package/dist/hooks/useFile.js +51 -13
  49. package/dist/umd/index.min.js +1 -1
  50. package/package.json +1 -1
@@ -42,7 +42,7 @@
42
42
  display: inline-block;
43
43
  max-width: 680px;
44
44
  padding: 12px 16px;
45
- background: #ebf2ff;
45
+ background: var(--theme-subtleNeutral, #F5F7FA);
46
46
  border-radius: 16px;
47
47
  white-space: pre-wrap;
48
48
  word-break: break-word;
@@ -70,7 +70,7 @@
70
70
  align-items: center;
71
71
  position: relative;
72
72
  font-size: 16px;
73
- color: #000000;
73
+ color: var(--theme-deepNeutral, #2E394C);
74
74
  line-height: 24px;
75
75
  width: fit-content;
76
76
  text-align: left;
@@ -120,7 +120,7 @@
120
120
  font-family: PingFangSC, PingFang SC;
121
121
  font-weight: 400;
122
122
  font-size: 14px;
123
- color: #2e394c;
123
+ color: var(--theme-deepNeutral, #2E394C);
124
124
  line-height: 20px;
125
125
  text-align: left;
126
126
  font-style: normal;
@@ -152,7 +152,7 @@
152
152
  margin: 40px 0;
153
153
  width: 100%;
154
154
  height: 1px;
155
- background: #dfe8f7;
155
+ background: var(--theme-lightNeutral, #E9EBF2);
156
156
  }
157
157
  .main .textWrap .textItem .course_recommend .course_recommend_header {
158
158
  width: 100%;
@@ -165,7 +165,7 @@
165
165
  font-family: PingFangSC, PingFang SC;
166
166
  font-weight: 600;
167
167
  font-size: 18px;
168
- color: #2e394c;
168
+ color: var(--theme-deepNeutral, #2E394C);
169
169
  line-height: 28px;
170
170
  text-align: left;
171
171
  font-style: normal;
@@ -180,7 +180,7 @@
180
180
  font-family: PingFangSC, PingFang SC;
181
181
  font-weight: 500;
182
182
  font-size: 14px;
183
- color: #2e394c;
183
+ color: var(--theme-deepNeutral, #2E394C);
184
184
  line-height: 20px;
185
185
  text-align: left;
186
186
  font-style: normal;
@@ -218,7 +218,7 @@
218
218
  font-family: PingFangSC, PingFang SC;
219
219
  font-weight: 400;
220
220
  font-size: 14px;
221
- color: #2e394c;
221
+ color: var(--theme-deepNeutral, #2E394C);
222
222
  line-height: 20px;
223
223
  text-align: left;
224
224
  font-style: normal;
@@ -243,13 +243,13 @@
243
243
  .main .emptyWrap .title {
244
244
  font-weight: 600;
245
245
  font-size: 20px;
246
- color: #2e394c;
246
+ color: var(--theme-deepNeutral, #2E394C);
247
247
  line-height: 28px;
248
248
  margin-bottom: 12px;
249
249
  }
250
250
  .main .emptyWrap .tips {
251
251
  font-size: 16px;
252
- color: #54698c;
252
+ color: var(--theme-neutral, #4C5A70);
253
253
  }
254
254
 
255
255
  .copyBtn {
@@ -8,8 +8,8 @@
8
8
  justify-content: center;
9
9
  border-radius: 4px;
10
10
  gap: 5px;
11
- border: 0;
12
- background-color: #f1f7ff;
11
+ border: 1px solid var(--theme-softNeutral, #D9DCE5);
12
+ background-color: var(--theme-subtleNeutral, #F5F7FA);
13
13
  cursor: pointer;
14
14
  }
15
15
  .icon_btn span {
@@ -17,5 +17,5 @@
17
17
  }
18
18
  .icon_btn:hover {
19
19
  background-color: #FFFFFF;
20
- color: #4086FF;
20
+ color: var(--theme-primary, #4086FF);
21
21
  }
@@ -36,8 +36,6 @@ var tabList = [{
36
36
  }
37
37
  // { key: 'course', displayName: '课程' },
38
38
  ];
39
- var quotoIcon = 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202601/30/be6d9_20260130135139.png';
40
- var isActiveQuotoIcon = 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202601/30/8e64c_20260130135037.png';
41
39
  var QuotedContent = function QuotedContent(_ref) {
42
40
  var initQuoteSource = _ref.initQuoteSource;
43
41
  var _useTranslation = useTranslation(),
@@ -238,7 +236,7 @@ var QuotedContent = function QuotedContent(_ref) {
238
236
  className: styles.searchInput,
239
237
  prefix: /*#__PURE__*/React.createElement(IconFontCom, {
240
238
  type: "icon-search1",
241
- color: "#7D91B3",
239
+ color: "var(--theme-mediumNeutral, #9AA7B7)",
242
240
  size: 16
243
241
  }),
244
242
  onChange: handleChange,
@@ -318,9 +316,10 @@ var QuotedContent = function QuotedContent(_ref) {
318
316
  content: t('quote.courseTooltip'),
319
317
  position: "top",
320
318
  visible: showmodel ? false : undefined
321
- }, /*#__PURE__*/React.createElement("img", {
322
- src: showmodel ? isActiveQuotoIcon : quotoIcon,
323
- alt: ""
319
+ }, /*#__PURE__*/React.createElement(IconFontCom, {
320
+ type: "icon-shurukuang-kechengyinyong",
321
+ size: 26,
322
+ className: styles.quoteIcon
324
323
  }))));
325
324
  };
326
325
  export default QuotedContent;
@@ -15,9 +15,19 @@
15
15
  border-radius: 8px;
16
16
  margin-left: 5px;
17
17
  width: calc(100% - 10px);
18
+ border: 1px solid var(--theme-lightNeutral, #E9EBF2);
19
+ background-color: #fff;
18
20
  }
19
21
  .searchInput input::placeholder {
20
- color: #7d91b3;
22
+ color: var(--theme-mediumNeutral, #9AA7B7);
23
+ }
24
+
25
+ :global .semi-input-wrapper:hover, :global .semi-input-wrapper:active {
26
+ border-color: var(--theme-primary, #4086FF);
27
+ background-color: #fff;
28
+ }
29
+ :global .semi-input-clearbtn:hover {
30
+ border-color: var(--theme-primary, #4086FF);
21
31
  }
22
32
 
23
33
  .content {
@@ -41,14 +51,15 @@
41
51
  border-radius: 8px;
42
52
  cursor: pointer;
43
53
  flex-shrink: 0;
54
+ color: var(--theme-neutral, #4C5A70);
44
55
  }
45
56
  .newtab .tabItem:hover {
46
- background-color: #f7f7fc;
47
- color: var(--theme-primary, #4086ff);
57
+ background-color: var(--theme-primary-pale, #F0F8FF);
58
+ color: var(--theme-deepNeutral, #2E394C);
48
59
  }
49
60
  .newtab .active {
50
- background-color: #f7f7fc;
51
- color: var(--theme-primary, #4086ff);
61
+ background-color: var(--theme-primary-pale, #F0F8FF);
62
+ color: var(--theme-deepNeutral, #2E394C);
52
63
  font-weight: 600;
53
64
  }
54
65
 
@@ -122,11 +133,17 @@
122
133
  width: 32px;
123
134
  height: 32px;
124
135
  cursor: pointer;
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
125
139
  }
126
140
  .quotationIcon:hover {
127
- background-color: #f2f3f7;
141
+ background-color: var(--theme-paleNeutral, #F2F3F7);
128
142
  border-radius: 8px;
129
143
  }
144
+ .quotationIcon:hover .quoteIcon, .quotationIcon.isActive .quoteIcon {
145
+ color: var(--theme-primary, #4086FF);
146
+ }
130
147
  .quotationIcon img {
131
148
  width: 100%;
132
149
  height: 100%;
@@ -134,10 +151,17 @@
134
151
  }
135
152
 
136
153
  .isActive {
137
- background-color: #f2f3f7;
154
+ background-color: var(--theme-paleNeutral, #F2F3F7);
138
155
  border-radius: 8px;
139
156
  }
140
157
 
158
+ .quoteIcon {
159
+ color: var(--theme-deepNeutral, #2E394C);
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ }
164
+
141
165
  .current_video {
142
166
  display: flex;
143
167
  flex-direction: column;
@@ -162,9 +186,10 @@
162
186
  min-width: 0;
163
187
  font-size: 12px;
164
188
  padding: 8px;
189
+ color: var(--theme-deepNeutral, #2E394C);
165
190
  }
166
191
  .current_video .currentItem:hover {
167
- background-color: #f7f7fc;
192
+ background-color: var(--theme-paleNeutral, #F2F3F7);
168
193
  color: var(--theme-primary, #4086ff);
169
194
  }
170
195
  .current_video .currentItem .img {
@@ -2,7 +2,7 @@
2
2
  .container {
3
3
  max-width: clamp(360px, 90%, 800px);
4
4
  padding: 0 20px;
5
- border-left: 2px solid #d9dce5;
5
+ border-left: 2px solid var(--theme-softNeutral, #D9DCE5);
6
6
  margin-bottom: 16px;
7
7
  user-select: none;
8
8
  }
@@ -18,7 +18,7 @@
18
18
  font-family: PingFangSC, PingFang SC;
19
19
  font-weight: 600;
20
20
  font-size: 16px;
21
- color: #2e394c;
21
+ color: var(--theme-deepNeutral, #2E394C);
22
22
  line-height: 16px;
23
23
  text-align: left;
24
24
  font-style: normal;
@@ -34,7 +34,7 @@
34
34
  font-family: PingFangSC, PingFang SC;
35
35
  font-weight: 400;
36
36
  font-size: 14px;
37
- color: #7d91b3;
37
+ color: var(--theme-neutral, #4C5A70);
38
38
  line-height: 26px;
39
39
  text-align: left;
40
40
  font-style: normal;
@@ -121,7 +121,7 @@
121
121
  font-family: PingFangSC, PingFang SC;
122
122
  font-weight: 400;
123
123
  font-size: 14px;
124
- color: #2e394c;
124
+ color: var(--theme-deepNeutral, #2E394C);
125
125
  line-height: 26px;
126
126
  text-align: left;
127
127
  font-style: normal;
@@ -156,7 +156,7 @@
156
156
  .dot {
157
157
  width: 8px; /* 减小大小 */
158
158
  height: 8px; /* 减小大小 */
159
- background-color: #4086ff; /* 换成antd主题浅蓝色 */
159
+ background-color: var(--theme-primary, #4086FF); /* 换成antd主题浅蓝色 */
160
160
  border-radius: 50%;
161
161
  will-change: transform; /* 告诉浏览器提前优化动画 */
162
162
  animation: bounce 0.8s infinite ease-in-out both; /* 减小动画变化幅度 */
@@ -7,7 +7,7 @@
7
7
  }
8
8
 
9
9
  .main {
10
- background-color: #f7f8fa;
10
+ background-color: var(--theme-subtleNeutral, #F5F7FA);
11
11
  border-radius: 12px;
12
12
  display: flex;
13
13
  align-items: center;
@@ -41,7 +41,7 @@
41
41
  font-size: 14px;
42
42
  line-height: 150%;
43
43
  letter-spacing: 0px;
44
- color: #2e394c;
44
+ color: var(--theme-deepNeutral, #2E394C);
45
45
  }
46
46
  .main .description .text_twoline {
47
47
  text-overflow: ellipsis;
@@ -55,7 +55,7 @@
55
55
  font-size: 14px;
56
56
  line-height: 150%;
57
57
  letter-spacing: 0px;
58
- color: #2e394c;
58
+ color: var(--theme-deepNeutral, #2E394C);
59
59
  }
60
60
  .main .description .product_text {
61
61
  text-overflow: ellipsis;
@@ -69,10 +69,10 @@
69
69
  font-size: 14px;
70
70
  line-height: 150%;
71
71
  letter-spacing: 0px;
72
- color: #2e394c;
72
+ color: var(--theme-deepNeutral, #2E394C);
73
73
  }
74
74
  .main .description .duration {
75
- color: #717f94;
75
+ color: var(--theme-dustyNeutral, #717F94);
76
76
  font-family: "PingFang SC";
77
77
  font-weight: 400;
78
78
  font-style: Regular;
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  .knowledge {
36
- background-color: #f7f8fa;
36
+ background-color: var(--theme-subtleNeutral, #F5F7FA);
37
37
  border-radius: 12px;
38
38
  display: flex;
39
39
  align-items: center;
@@ -113,7 +113,7 @@
113
113
  border-radius: 4px;
114
114
  float: left;
115
115
  margin-right: 5px;
116
- background-color: #7d91b3;
116
+ background-color: var(--theme-neutral, #4C5A70);
117
117
  color: #ffffff;
118
118
  }
119
119
  .knowledge .class_description .text {
@@ -129,7 +129,7 @@
129
129
  font-size: 14px;
130
130
  line-height: 150%;
131
131
  letter-spacing: 0px;
132
- color: #2e394c;
132
+ color: var(--theme-deepNeutral, #2E394C);
133
133
  }
134
134
 
135
135
  .list {
@@ -143,5 +143,5 @@
143
143
  font-size: 14px;
144
144
  line-height: 150%;
145
145
  letter-spacing: 0px;
146
- color: #4c5a70;
146
+ color: var(--theme-neutral, #4C5A70);
147
147
  }
@@ -9,7 +9,7 @@
9
9
  width: 305px;
10
10
  display: flex;
11
11
  align-items: center;
12
- background: #f7f8fa;
12
+ background: var(--theme-subtleNeutral, #F5F7FA);
13
13
  padding: 16px;
14
14
  border-radius: 8px;
15
15
  margin-right: 10px;
@@ -33,7 +33,7 @@
33
33
  font-family: PingFangSC, PingFang SC;
34
34
  font-weight: 500;
35
35
  font-size: 12px;
36
- color: #2e394c;
36
+ color: var(--theme-deepNeutral, #2E394C);
37
37
  text-align: left;
38
38
  font-style: normal;
39
39
  display: -webkit-box;
@@ -64,14 +64,14 @@
64
64
  }
65
65
  .search .search_cards .courseItem .courseTitle .newEquityLabel-3 {
66
66
  color: #fff;
67
- background: #7d91b3;
67
+ background: var(--theme-neutral, #4C5A70);
68
68
  }
69
69
  .search .search_cards .courseItem .infoTitle {
70
70
  width: 100%;
71
71
  font-family: PingFangSC, PingFang SC;
72
72
  font-weight: 400;
73
73
  font-size: 12px;
74
- color: #7d91b3;
74
+ color: var(--theme-neutral, #4C5A70);
75
75
  line-height: 12px;
76
76
  text-align: left;
77
77
  font-style: normal;
@@ -81,7 +81,7 @@
81
81
  line-height: 17px;
82
82
  }
83
83
  .search .search_cards .newsItem {
84
- background: #f7f8fa;
84
+ background: var(--theme-subtleNeutral, #F5F7FA);
85
85
  padding: 16px;
86
86
  border-radius: 8px;
87
87
  margin-right: 10px;
@@ -111,7 +111,7 @@
111
111
  font-family: PingFangSC, PingFang SC;
112
112
  font-weight: 500;
113
113
  font-size: 12px;
114
- color: #2e394c;
114
+ color: var(--theme-deepNeutral, #2E394C);
115
115
  text-align: left;
116
116
  font-style: normal;
117
117
  display: -webkit-box;
@@ -141,14 +141,14 @@
141
141
  }
142
142
  .search .search_cards .newsItem .courseTitle .newEquityLabel-3 {
143
143
  color: #fff;
144
- background: #7d91b3;
144
+ background: var(--theme-neutral, #4C5A70);
145
145
  }
146
146
  .search .search_cards .newsItem .infoTitle {
147
147
  width: 100%;
148
148
  font-family: PingFangSC, PingFang SC;
149
149
  font-weight: 400;
150
150
  font-size: 12px;
151
- color: #7d91b3;
151
+ color: var(--theme-neutral, #4C5A70);
152
152
  line-height: 12px;
153
153
  text-align: left;
154
154
  font-style: normal;
@@ -184,7 +184,7 @@
184
184
  font-family: PingFangSC, PingFang SC;
185
185
  font-weight: 400;
186
186
  font-size: 14px;
187
- color: #2e394c;
187
+ color: var(--theme-deepNeutral, #2E394C);
188
188
  line-height: 20px;
189
189
  text-align: left;
190
190
  font-style: normal;
@@ -194,7 +194,7 @@
194
194
  .search .searchAll {
195
195
  width: 78px;
196
196
  height: 83px;
197
- background: #f7f8fa;
197
+ background: var(--theme-subtleNeutral, #F5F7FA);
198
198
  border-radius: 8px;
199
199
  display: flex;
200
200
  align-items: center;
@@ -202,7 +202,7 @@
202
202
  font-family: PingFangSC, PingFang SC;
203
203
  font-weight: 400;
204
204
  font-size: 14px;
205
- color: #2e394c;
205
+ color: var(--theme-deepNeutral, #2E394C);
206
206
  line-height: 14px;
207
207
  text-align: left;
208
208
  font-style: normal;
@@ -214,7 +214,7 @@
214
214
  font-family: PingFangSC, PingFang SC;
215
215
  font-weight: 400;
216
216
  font-size: 14px;
217
- color: #2e394c;
217
+ color: var(--theme-deepNeutral, #2E394C);
218
218
  line-height: 26px;
219
219
  text-align: left;
220
220
  font-style: normal;
@@ -81,7 +81,7 @@
81
81
  font-family: PingFangSC, PingFang SC;
82
82
  font-weight: 500;
83
83
  font-size: 16px;
84
- color: #2e394c;
84
+ color: var(--theme-deepNeutral, #2E394C);
85
85
  line-height: 22px;
86
86
  text-align: center;
87
87
  font-style: normal;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import styles from "./customFile.module.css";
4
- import reTry from "../../assets/image/retry.png";
5
4
  import { FileStatus } from "../../interfaces/fileInterface";
6
5
  import { formatSizeToKB } from "../../utils/tools";
6
+ import IconFontCom from "../iconfont-com";
7
7
  var CustomFile = function CustomFile(_ref) {
8
8
  var file = _ref.file,
9
9
  handleDelFile = _ref.handleDelFile,
@@ -50,11 +50,21 @@ var CustomFile = function CustomFile(_ref) {
50
50
 
51
51
  var isError = file.status === FileStatus.UPLOAD_FAILED || file.status === FileStatus.ANALYSE_FAILED || file.status === FileStatus.NETWORK_ERROR;
52
52
  var isLoading = [FileStatus.PADDING, FileStatus.RETRING, FileStatus.UPLOADING].includes(file.status);
53
+ // 仅上传中阶段 fileUrl/fileIcon 尚未就绪;解析中(PADDING/RETRING)资源已就绪,应展示真实图
54
+ var isUploading = file.status === FileStatus.UPLOADING;
53
55
  return /*#__PURE__*/React.createElement("div", {
54
56
  className: styles.uploadBox
55
57
  }, /*#__PURE__*/React.createElement("div", {
56
58
  className: styles.uploadIcon
57
- }, isImage ? /*#__PURE__*/React.createElement("img", {
59
+ }, isUploading ? /*#__PURE__*/React.createElement("div", {
60
+ style: {
61
+ width: '24px',
62
+ height: '22px',
63
+ borderRadius: 4,
64
+ background: "var(--theme-softNeutral, #D9DCE5)",
65
+ flexShrink: 0
66
+ }
67
+ }) : isImage ? /*#__PURE__*/React.createElement("img", {
58
68
  src: file.fileUrl,
59
69
  alt: "file-icon",
60
70
  style: {
@@ -62,7 +72,10 @@ var CustomFile = function CustomFile(_ref) {
62
72
  height: '36px',
63
73
  objectFit: 'cover',
64
74
  borderRadius: 8,
65
- background: "#D9DCE5"
75
+ background: "var(--theme-softNeutral, #D9DCE5)"
76
+ },
77
+ onError: function onError(e) {
78
+ e.currentTarget.style.visibility = 'hidden';
66
79
  }
67
80
  }) : /*#__PURE__*/React.createElement("img", {
68
81
  src: fileIcon,
@@ -87,13 +100,10 @@ var CustomFile = function CustomFile(_ref) {
87
100
  })), isError && /*#__PURE__*/React.createElement("div", {
88
101
  className: styles.uploadError,
89
102
  onClick: handleRetryClick
90
- }, t('common.retry'), /*#__PURE__*/React.createElement("img", {
91
- src: reTry,
92
- alt: "",
93
- style: {
94
- width: 16,
95
- height: 16
96
- }
103
+ }, t('common.retry'), /*#__PURE__*/React.createElement(IconFontCom, {
104
+ type: "icon-shuaxin1",
105
+ size: 16,
106
+ color: "var(--theme-primary, #4086FF)"
97
107
  })), showDel && /*#__PURE__*/React.createElement("div", {
98
108
  className: styles.delIcon,
99
109
  onClick: handleDeleteClick
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import styles from "./imageFile.module.css";
4
- import reTry from "../../assets/image/retry.png";
5
4
  import { FileStatus } from "../../interfaces/fileInterface";
6
5
  import classNames from 'classnames';
6
+ import IconFontCom from "../iconfont-com";
7
7
  var ImageFile = function ImageFile(_ref) {
8
8
  var file = _ref.file,
9
9
  handleDelFile = _ref.handleDelFile,
@@ -30,19 +30,23 @@ var ImageFile = function ImageFile(_ref) {
30
30
 
31
31
  var isError = file.status === FileStatus.UPLOAD_FAILED || file.status === FileStatus.ANALYSE_FAILED || file.status === FileStatus.NETWORK_ERROR;
32
32
  var isLoading = [FileStatus.PADDING, FileStatus.RETRING, FileStatus.UPLOADING].includes(file.status);
33
+ // 仅上传中阶段 fileUrl 尚未就绪;解析中(PADDING/RETRING)资源已就绪,应展示真实图片
34
+ var isUploading = file.status === FileStatus.UPLOADING;
33
35
  return /*#__PURE__*/React.createElement("div", {
34
36
  className: classNames(styles.uploadBox, isMessage ? styles.messageImg : styles.inputImg, isSingle ? styles.singleImg : '')
35
- }, /*#__PURE__*/React.createElement("img", {
37
+ }, isUploading ? /*#__PURE__*/React.createElement("div", {
38
+ className: classNames(styles.uploadImg),
39
+ style: {
40
+ background: "var(--theme-softNeutral, #D9DCE5)"
41
+ }
42
+ }) : /*#__PURE__*/React.createElement("img", {
36
43
  src: file.fileUrl,
37
44
  alt: "file-icon",
38
- className: classNames(styles.uploadImg)
39
- }), /*#__PURE__*/React.createElement("div", {
40
- className: styles.uploadName
41
- }, isError && /*#__PURE__*/React.createElement("div", {
42
- className: styles.sizeText
43
- }, isError && /*#__PURE__*/React.createElement("span", {
44
- className: styles.errorText
45
- }, file.status === FileStatus.UPLOAD_FAILED ? t('upload.status.uploadFailed') : file.status === FileStatus.NETWORK_ERROR ? t('upload.status.networkError') : t('upload.status.parseFailed')))), isLoading && /*#__PURE__*/React.createElement("div", {
45
+ className: classNames(styles.uploadImg),
46
+ onError: function onError(e) {
47
+ e.currentTarget.style.visibility = 'hidden';
48
+ }
49
+ }), isLoading && /*#__PURE__*/React.createElement("div", {
46
50
  className: styles.uploadLoading
47
51
  }, /*#__PURE__*/React.createElement("img", {
48
52
  src: "https://simg01.gaodunwangxiao.com/uploadfiles/tmp/upload/202509/07/0a0fa_20250907093927.gif",
@@ -50,12 +54,14 @@ var ImageFile = function ImageFile(_ref) {
50
54
  })), isError && /*#__PURE__*/React.createElement("div", {
51
55
  className: styles.uploadError,
52
56
  onClick: handleRetryClick
53
- }, t('common.retry'), /*#__PURE__*/React.createElement("img", {
54
- src: reTry,
55
- alt: "",
56
- style: {
57
- width: 16,
58
- height: 16
57
+ }, /*#__PURE__*/React.createElement(IconFontCom, {
58
+ type: "icon-a-iconjichu1",
59
+ size: 16,
60
+ extraStyle: {
61
+ position: 'absolute',
62
+ top: '50%',
63
+ left: '50%',
64
+ transform: 'translate(-50%, -50%)'
59
65
  }
60
66
  })), showDel && /*#__PURE__*/React.createElement("div", {
61
67
  className: styles.delIcon,
@@ -7,7 +7,7 @@
7
7
  width: fit-content; /* 自动适应内容宽度 */
8
8
  flex-shrink: 0;
9
9
  border-radius: 12px;
10
- background: var(---, #f2f3f7);
10
+ background: var(--theme-subtleNeutral, #F5F7FA);
11
11
  padding: 14px 16px 14px 12px;
12
12
  margin-bottom: 12px;
13
13
  position: relative;
@@ -29,7 +29,7 @@
29
29
 
30
30
  .uploadName {
31
31
  flex: 1; /* 让文件名占满剩余空间 */
32
- color: #2e394c;
32
+ color: var(--theme-deepNeutral, #2E394C);
33
33
  font-family: "PingFang SC";
34
34
  font-size: 14px;
35
35
  font-style: normal;
@@ -53,12 +53,12 @@
53
53
  }
54
54
  .uploadName .uploadfileName .fileExtension {
55
55
  white-space: nowrap; /* 确保扩展名不换行 */
56
- color: #717F94; /* 可以给扩展名一个不同的颜色区分 */
56
+ color: var(--theme-neutral, #4C5A70); /* 可以给扩展名一个不同的颜色区分 */
57
57
  }
58
58
  .uploadName .sizeText .size {
59
59
  margin-right: 4px;
60
60
  font-size: 12px; /* 修复之前的语法错误,添加单位px */
61
- color: #717F94;
61
+ color: var(--theme-neutral, #4C5A70);
62
62
  }
63
63
  .uploadName .sizeText .errorText {
64
64
  color: #f33;
@@ -76,7 +76,7 @@
76
76
  margin-left: 8px;
77
77
  font-size: 14px;
78
78
  flex-shrink: 0;
79
- color: #717F94;
79
+ color: var(--theme-deepNeutral, #2E394C);
80
80
  }
81
81
  .uploadStatus img,
82
82
  .uploadLoading img {
@@ -109,7 +109,7 @@
109
109
 
110
110
  .uploadError {
111
111
  cursor: pointer;
112
- color: #4086ff;
112
+ color: var(--theme-primary, #4086ff);
113
113
  text-align: right;
114
114
  font-family: "PingFang SC";
115
115
  font-size: 14px;
@@ -4,7 +4,7 @@
4
4
  width: 54px;
5
5
  height: 54px;
6
6
  border-radius: 8px;
7
- border: 0.5px solid #D9DCE5;
7
+ border: 0.5px solid var(--theme-softNeutral, #D9DCE5);
8
8
  position: relative;
9
9
  overflow: visible;
10
10
  margin-bottom: 12px;
@@ -31,7 +31,7 @@
31
31
  width: 54px;
32
32
  height: 54px;
33
33
  border-radius: 8px;
34
- border: 0.5px solid #D9DCE5;
34
+ border: 0.5px solid var(--theme-softNeutral, #D9DCE5);
35
35
  }
36
36
  .uploadBox:hover .delIcon {
37
37
  display: flex;
@@ -44,18 +44,20 @@
44
44
  }
45
45
 
46
46
  .uploadStatus,
47
- .uploadLoading {
47
+ .uploadLoading,
48
+ .uploadError {
48
49
  position: absolute;
49
50
  top: 0;
50
51
  left: 0;
51
52
  bottom: 0;
52
53
  right: 0;
53
54
  border-radius: 8px;
54
- border: 0.5px solid #D9DCE5;
55
+ border: 0.5px solid var(--theme-softNeutral, #D9DCE5);
55
56
  background: rgba(0, 0, 0, 0.4);
56
57
  }
57
58
  .uploadStatus img,
58
- .uploadLoading img {
59
+ .uploadLoading img,
60
+ .uploadError img {
59
61
  position: absolute;
60
62
  top: 50%;
61
63
  left: 50%;
@@ -88,14 +90,4 @@
88
90
 
89
91
  .uploadError {
90
92
  cursor: pointer;
91
- color: #4086ff;
92
- text-align: right;
93
- font-family: "PingFang SC";
94
- font-size: 14px;
95
- font-style: normal;
96
- font-weight: 400;
97
- line-height: normal;
98
- margin-left: 20px;
99
- display: flex;
100
- align-items: center;
101
93
  }