@douyinfe/semi-foundation 2.78.0 → 2.79.0-beta.0
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/button/button.scss +8 -1
- package/button/variables.scss +10 -1
- package/cascader/cascader.scss +20 -0
- package/cascader/variables.scss +14 -4
- package/chat/chat.scss +5 -0
- package/chat/variables.scss +2 -0
- package/inputNumber/inputNumber.scss +2 -0
- package/inputNumber/variables.scss +2 -1
- package/lib/cjs/button/button.css +8 -3
- package/lib/cjs/button/button.scss +8 -1
- package/lib/cjs/button/variables.scss +10 -1
- package/lib/cjs/cascader/cascader.css +16 -0
- package/lib/cjs/cascader/cascader.scss +20 -0
- package/lib/cjs/cascader/variables.scss +14 -4
- package/lib/cjs/chat/chat.css +5 -0
- package/lib/cjs/chat/chat.scss +5 -0
- package/lib/cjs/chat/variables.scss +2 -0
- package/lib/cjs/inputNumber/inputNumber.css +2 -0
- package/lib/cjs/inputNumber/inputNumber.scss +2 -0
- package/lib/cjs/inputNumber/variables.scss +2 -1
- package/lib/cjs/popover/popover.css +7 -0
- package/lib/cjs/popover/popover.scss +10 -0
- package/lib/cjs/popover/variables.scss +2 -0
- package/lib/cjs/progress/progress.css +4 -0
- package/lib/cjs/progress/progress.scss +6 -0
- package/lib/cjs/table/foundation.d.ts +7 -1
- package/lib/cjs/table/foundation.js +21 -0
- package/lib/es/button/button.css +8 -3
- package/lib/es/button/button.scss +8 -1
- package/lib/es/button/variables.scss +10 -1
- package/lib/es/cascader/cascader.css +16 -0
- package/lib/es/cascader/cascader.scss +20 -0
- package/lib/es/cascader/variables.scss +14 -4
- package/lib/es/chat/chat.css +5 -0
- package/lib/es/chat/chat.scss +5 -0
- package/lib/es/chat/variables.scss +2 -0
- package/lib/es/inputNumber/inputNumber.css +2 -0
- package/lib/es/inputNumber/inputNumber.scss +2 -0
- package/lib/es/inputNumber/variables.scss +2 -1
- package/lib/es/popover/popover.css +7 -0
- package/lib/es/popover/popover.scss +10 -0
- package/lib/es/popover/variables.scss +2 -0
- package/lib/es/progress/progress.css +4 -0
- package/lib/es/progress/progress.scss +6 -0
- package/lib/es/table/foundation.d.ts +7 -1
- package/lib/es/table/foundation.js +21 -0
- package/package.json +4 -4
- package/popover/popover.scss +10 -0
- package/popover/variables.scss +2 -0
- package/progress/progress.scss +6 -0
- package/table/foundation.ts +29 -1
package/button/button.scss
CHANGED
|
@@ -6,7 +6,6 @@ $module: #{$prefix}-button;
|
|
|
6
6
|
|
|
7
7
|
.#{$module} {
|
|
8
8
|
@include shadow-0;
|
|
9
|
-
@include font-size-regular;
|
|
10
9
|
height: $height-button_default;
|
|
11
10
|
display: inline-flex;
|
|
12
11
|
align-items: center;
|
|
@@ -19,6 +18,8 @@ $module: #{$prefix}-button;
|
|
|
19
18
|
padding-right: $spacing-button_default-paddingRight;
|
|
20
19
|
padding-top: $spacing-button_default-paddingTop;
|
|
21
20
|
padding-bottom: $spacing-button_default-paddingTop;
|
|
21
|
+
font-size: $font-button-fontSize;
|
|
22
|
+
line-height: $font-button-lineHeight;
|
|
22
23
|
font-weight: $font-button-fontWeight;
|
|
23
24
|
outline: none;
|
|
24
25
|
vertical-align: middle;
|
|
@@ -313,6 +314,9 @@ $module: #{$prefix}-button;
|
|
|
313
314
|
padding-bottom: $spacing-button_small-paddingBottom;
|
|
314
315
|
padding-left: $spacing-button_small-paddingLeft;
|
|
315
316
|
padding-right: $spacing-button_small-paddingRight;
|
|
317
|
+
font-size: $font-button_small-fontSize;
|
|
318
|
+
line-height: $font-button_small-lineHeight;
|
|
319
|
+
font-weight: $font-button_small-fontWeight;
|
|
316
320
|
}
|
|
317
321
|
|
|
318
322
|
&-size-large {
|
|
@@ -321,6 +325,9 @@ $module: #{$prefix}-button;
|
|
|
321
325
|
padding-bottom: $spacing-button_large-paddingBottom;
|
|
322
326
|
padding-left: $spacing-button_large-paddingLeft;
|
|
323
327
|
padding-right: $spacing-button_large-paddingRight;
|
|
328
|
+
font-size: $font-button_large-fontSize;
|
|
329
|
+
line-height: $font-button_large-lineHeight;
|
|
330
|
+
font-weight: $font-button_large-fontWeight;
|
|
324
331
|
}
|
|
325
332
|
|
|
326
333
|
&-block {
|
package/button/variables.scss
CHANGED
|
@@ -165,7 +165,16 @@ $width-button_iconOnly_large: $height-control-large; // 图标按钮 width - 大
|
|
|
165
165
|
$spacing-button_iconOnly_content-marginLeft: $spacing-tight; // 按钮左侧图标距离文字间距
|
|
166
166
|
$spacing-button_iconOnly_content-marginRight: $spacing-tight; // 按钮右侧图标距离文字间距
|
|
167
167
|
|
|
168
|
-
$font-button-fontWeight: $font-weight-bold; // 按钮文字字重
|
|
168
|
+
$font-button-fontWeight: $font-weight-bold; // 按钮文字字重 - 默认
|
|
169
|
+
$font-button-fontSize: $font-size-regular; // 按钮文字字号- 默认
|
|
170
|
+
$font-button-lineHeight: 20px; // 按钮文字行高 - 默认
|
|
171
|
+
$font-button_small-fontWeight: $font-weight-bold; // 按钮文字字重 - 小尺寸
|
|
172
|
+
$font-button_small-fontSize: $font-size-regular; // 按钮文字字号- 小尺寸
|
|
173
|
+
$font-button_small-lineHeight: 20px; // 按钮文字行高 - 小尺寸
|
|
174
|
+
$font-button_large-fontWeight: $font-weight-bold; // 默认按钮文字字重 - 大尺寸
|
|
175
|
+
$font-button_large-fontSize: $font-size-regular; // 默认按钮文字字号 - 大尺寸
|
|
176
|
+
$font-button_large-lineHeight: 20px; // 默认按钮文字行高 - 大尺寸
|
|
177
|
+
|
|
169
178
|
$height-button_large: $height-control-large; // 按钮高度 - 大尺寸
|
|
170
179
|
$height-button_small: $height-control-small; // 按钮高度 - 小尺寸
|
|
171
180
|
$height-button_default: $height-control-default; // 按钮高度 - 默认
|
package/cascader/cascader.scss
CHANGED
|
@@ -39,6 +39,16 @@ $module: #{$prefix}-cascader;
|
|
|
39
39
|
&-small {
|
|
40
40
|
min-height: $height-cascader_small;
|
|
41
41
|
line-height: $height-cascader_small;
|
|
42
|
+
|
|
43
|
+
.#{$module}-selection {
|
|
44
|
+
padding-left: $spacing-cascader_small_selection-paddingLeft;
|
|
45
|
+
padding-right: $spacing-cascader_small_selection-paddingRight;
|
|
46
|
+
|
|
47
|
+
&-multiple {
|
|
48
|
+
padding-left: $spacing-cascader_small_selection_multiple-paddingLeft;
|
|
49
|
+
padding-right: $spacing-cascader_small_selection_multiple-paddingRight;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
&-large {
|
|
@@ -47,6 +57,16 @@ $module: #{$prefix}-cascader;
|
|
|
47
57
|
.#{$module}-selection {
|
|
48
58
|
@include font-size-header-6;
|
|
49
59
|
}
|
|
60
|
+
|
|
61
|
+
.#{$module}-selection {
|
|
62
|
+
padding-left: $spacing-cascader_large_selection-paddingLeft;
|
|
63
|
+
padding-right: $spacing-cascader_large_selection-paddingRight;
|
|
64
|
+
|
|
65
|
+
&-multiple {
|
|
66
|
+
padding-left: $spacing-cascader_large_selection_multiple-paddingLeft;
|
|
67
|
+
padding-right: $spacing-cascader_large_selection_multiple-paddingRight;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
50
70
|
}
|
|
51
71
|
|
|
52
72
|
&-focus {
|
package/cascader/variables.scss
CHANGED
|
@@ -45,10 +45,20 @@ $color-cascader_danger-border-active: var(--semi-color-danger-light-active); //
|
|
|
45
45
|
|
|
46
46
|
$color-cascader_prefix_suffix_text-default: var(--semi-color-text-2); // 级联选择前后缀文字颜色
|
|
47
47
|
|
|
48
|
-
$spacing-cascader_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距
|
|
49
|
-
$spacing-cascader_selection-paddingRight: 12px; // 级联选择触发器右侧内边距
|
|
50
|
-
$spacing-
|
|
51
|
-
$spacing-
|
|
48
|
+
$spacing-cascader_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 默认
|
|
49
|
+
$spacing-cascader_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 默认
|
|
50
|
+
$spacing-cascader_small_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 小尺寸
|
|
51
|
+
$spacing-cascader_small_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 小尺寸
|
|
52
|
+
$spacing-cascader_large_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 大尺寸
|
|
53
|
+
$spacing-cascader_large_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 大尺寸
|
|
54
|
+
|
|
55
|
+
$spacing-cascader_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 默认
|
|
56
|
+
$spacing-cascader_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时右侧内边距 - 默认
|
|
57
|
+
$spacing-cascader_small_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 小尺寸
|
|
58
|
+
$spacing-cascader_small_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 小尺寸
|
|
59
|
+
$spacing-cascader_large_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 大尺寸
|
|
60
|
+
$spacing-cascader_large_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 大尺寸
|
|
61
|
+
|
|
52
62
|
$spacing-cascader_selection_tag-marginLeft: $spacing-none; // 级联选择触发器多选时标签的水平左外边距
|
|
53
63
|
$spacing-cascader_selection_tag-marginRight: $spacing-super-tight; // 级联选择触发器多选时标签的水平右外边距
|
|
54
64
|
$spacing-cascader_selection_tag-marginY: 1px; // 级联选择触发器多选时标签的垂直外边距
|
package/chat/chat.scss
CHANGED
|
@@ -138,6 +138,8 @@ $module: #{$prefix}-chat;
|
|
|
138
138
|
|
|
139
139
|
&-avatar {
|
|
140
140
|
flex-shrink: 0;
|
|
141
|
+
width: $width-chat_chatBox_avatar;
|
|
142
|
+
height: $width-chat_chatBox_avatar;
|
|
141
143
|
|
|
142
144
|
&-hidden {
|
|
143
145
|
visibility: hidden;
|
|
@@ -208,6 +210,7 @@ $module: #{$prefix}-chat;
|
|
|
208
210
|
align-items: flex-start;
|
|
209
211
|
position: relative;
|
|
210
212
|
row-gap: $spacing-chat_chatBox_wrap;
|
|
213
|
+
max-width: calc(100% - $spacing-chat_chatBox-columnGap - $width-chat_chatBox_avatar);
|
|
211
214
|
}
|
|
212
215
|
|
|
213
216
|
|
|
@@ -217,6 +220,8 @@ $module: #{$prefix}-chat;
|
|
|
217
220
|
padding: $spacing-chat_chatBox_content-paddingY $spacing-chat_chatBox_content-paddingX;
|
|
218
221
|
border-radius: $radius-chat_chatBox_content;
|
|
219
222
|
background-color: $color-chat_chatBox_content_bg;
|
|
223
|
+
max-width: 100%;
|
|
224
|
+
box-sizing: border-box;
|
|
220
225
|
}
|
|
221
226
|
|
|
222
227
|
code {
|
package/chat/variables.scss
CHANGED
|
@@ -104,6 +104,8 @@ $width-chat_attachment_file_title: 90px; // 附件文件标题最大宽度
|
|
|
104
104
|
$width-chat_max: 800px; // chat组件最大宽度
|
|
105
105
|
$width-chat_dropArea-border: 5px; // 拖拽上传边框宽度
|
|
106
106
|
$width-chat_chatBox_content_code_topSlot_copy: 150px; // 聊天框代码块顶部复制按钮最小宽度
|
|
107
|
+
$width-chat_chatBox_avatar: 24px; // 聊天框头像宽度
|
|
108
|
+
|
|
107
109
|
// height
|
|
108
110
|
$height-chat_action_stop: 42px; //停止生成按钮高度
|
|
109
111
|
|
|
@@ -6,7 +6,8 @@ $height-inputNumber_button_inner_large: $height-control-large - 2px; // 隐藏
|
|
|
6
6
|
$height-inputNumber_button_inner_small: $height-control-small - 2px; // 隐藏步进器的数字输入框高度 - 小
|
|
7
7
|
|
|
8
8
|
$width-inputNumber_button: 14px; // 步进器按钮宽度
|
|
9
|
-
$radius-inputNumber: var(--semi-border-radius-small);
|
|
9
|
+
$radius-inputNumber: var(--semi-border-radius-small); // 步进器按钮圆角 - 外部
|
|
10
|
+
$radius-inputNumber_inner: var(--semi-border-radius-small); // 步进器按钮圆角 - 内部
|
|
10
11
|
$spacing-inputNumber_button-marginLeft: 4px; // 步进器按钮左侧外边距
|
|
11
12
|
$color-inputNumber_button-text-default: var(--semi-color-text-2); // 步进器按钮图标颜色
|
|
12
13
|
$color-inputNumber_button-text-disabled: var(--semi-color-disabled-text); // 步进器按钮图标颜色 - 禁用
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
|
|
24
24
|
.semi-button {
|
|
25
25
|
box-shadow: none;
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
line-height: 20px;
|
|
28
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
29
26
|
height: 32px;
|
|
30
27
|
display: inline-flex;
|
|
31
28
|
align-items: center;
|
|
@@ -38,6 +35,8 @@
|
|
|
38
35
|
padding-right: 12px;
|
|
39
36
|
padding-top: 6px;
|
|
40
37
|
padding-bottom: 6px;
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
line-height: 20px;
|
|
41
40
|
font-weight: 600;
|
|
42
41
|
outline: none;
|
|
43
42
|
vertical-align: middle;
|
|
@@ -255,6 +254,9 @@
|
|
|
255
254
|
padding-bottom: 2px;
|
|
256
255
|
padding-left: 12px;
|
|
257
256
|
padding-right: 12px;
|
|
257
|
+
font-size: 14px;
|
|
258
|
+
line-height: 20px;
|
|
259
|
+
font-weight: 600;
|
|
258
260
|
}
|
|
259
261
|
.semi-button-size-large {
|
|
260
262
|
height: 40px;
|
|
@@ -262,6 +264,9 @@
|
|
|
262
264
|
padding-bottom: 10px;
|
|
263
265
|
padding-left: 16px;
|
|
264
266
|
padding-right: 16px;
|
|
267
|
+
font-size: 14px;
|
|
268
|
+
line-height: 20px;
|
|
269
|
+
font-weight: 600;
|
|
265
270
|
}
|
|
266
271
|
.semi-button-block {
|
|
267
272
|
width: 100%;
|
|
@@ -6,7 +6,6 @@ $module: #{$prefix}-button;
|
|
|
6
6
|
|
|
7
7
|
.#{$module} {
|
|
8
8
|
@include shadow-0;
|
|
9
|
-
@include font-size-regular;
|
|
10
9
|
height: $height-button_default;
|
|
11
10
|
display: inline-flex;
|
|
12
11
|
align-items: center;
|
|
@@ -19,6 +18,8 @@ $module: #{$prefix}-button;
|
|
|
19
18
|
padding-right: $spacing-button_default-paddingRight;
|
|
20
19
|
padding-top: $spacing-button_default-paddingTop;
|
|
21
20
|
padding-bottom: $spacing-button_default-paddingTop;
|
|
21
|
+
font-size: $font-button-fontSize;
|
|
22
|
+
line-height: $font-button-lineHeight;
|
|
22
23
|
font-weight: $font-button-fontWeight;
|
|
23
24
|
outline: none;
|
|
24
25
|
vertical-align: middle;
|
|
@@ -313,6 +314,9 @@ $module: #{$prefix}-button;
|
|
|
313
314
|
padding-bottom: $spacing-button_small-paddingBottom;
|
|
314
315
|
padding-left: $spacing-button_small-paddingLeft;
|
|
315
316
|
padding-right: $spacing-button_small-paddingRight;
|
|
317
|
+
font-size: $font-button_small-fontSize;
|
|
318
|
+
line-height: $font-button_small-lineHeight;
|
|
319
|
+
font-weight: $font-button_small-fontWeight;
|
|
316
320
|
}
|
|
317
321
|
|
|
318
322
|
&-size-large {
|
|
@@ -321,6 +325,9 @@ $module: #{$prefix}-button;
|
|
|
321
325
|
padding-bottom: $spacing-button_large-paddingBottom;
|
|
322
326
|
padding-left: $spacing-button_large-paddingLeft;
|
|
323
327
|
padding-right: $spacing-button_large-paddingRight;
|
|
328
|
+
font-size: $font-button_large-fontSize;
|
|
329
|
+
line-height: $font-button_large-lineHeight;
|
|
330
|
+
font-weight: $font-button_large-fontWeight;
|
|
324
331
|
}
|
|
325
332
|
|
|
326
333
|
&-block {
|
|
@@ -165,7 +165,16 @@ $width-button_iconOnly_large: $height-control-large; // 图标按钮 width - 大
|
|
|
165
165
|
$spacing-button_iconOnly_content-marginLeft: $spacing-tight; // 按钮左侧图标距离文字间距
|
|
166
166
|
$spacing-button_iconOnly_content-marginRight: $spacing-tight; // 按钮右侧图标距离文字间距
|
|
167
167
|
|
|
168
|
-
$font-button-fontWeight: $font-weight-bold; // 按钮文字字重
|
|
168
|
+
$font-button-fontWeight: $font-weight-bold; // 按钮文字字重 - 默认
|
|
169
|
+
$font-button-fontSize: $font-size-regular; // 按钮文字字号- 默认
|
|
170
|
+
$font-button-lineHeight: 20px; // 按钮文字行高 - 默认
|
|
171
|
+
$font-button_small-fontWeight: $font-weight-bold; // 按钮文字字重 - 小尺寸
|
|
172
|
+
$font-button_small-fontSize: $font-size-regular; // 按钮文字字号- 小尺寸
|
|
173
|
+
$font-button_small-lineHeight: 20px; // 按钮文字行高 - 小尺寸
|
|
174
|
+
$font-button_large-fontWeight: $font-weight-bold; // 默认按钮文字字重 - 大尺寸
|
|
175
|
+
$font-button_large-fontSize: $font-size-regular; // 默认按钮文字字号 - 大尺寸
|
|
176
|
+
$font-button_large-lineHeight: 20px; // 默认按钮文字行高 - 大尺寸
|
|
177
|
+
|
|
169
178
|
$height-button_large: $height-control-large; // 按钮高度 - 大尺寸
|
|
170
179
|
$height-button_small: $height-control-small; // 按钮高度 - 小尺寸
|
|
171
180
|
$height-button_default: $height-control-default; // 按钮高度 - 默认
|
|
@@ -33,6 +33,14 @@
|
|
|
33
33
|
min-height: 24px;
|
|
34
34
|
line-height: 24px;
|
|
35
35
|
}
|
|
36
|
+
.semi-cascader-small .semi-cascader-selection {
|
|
37
|
+
padding-left: 12px;
|
|
38
|
+
padding-right: 12px;
|
|
39
|
+
}
|
|
40
|
+
.semi-cascader-small .semi-cascader-selection-multiple {
|
|
41
|
+
padding-left: 4px;
|
|
42
|
+
padding-right: 4px;
|
|
43
|
+
}
|
|
36
44
|
.semi-cascader-large {
|
|
37
45
|
min-height: 40px;
|
|
38
46
|
line-height: 40px;
|
|
@@ -42,6 +50,14 @@
|
|
|
42
50
|
line-height: 22px;
|
|
43
51
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
44
52
|
}
|
|
53
|
+
.semi-cascader-large .semi-cascader-selection {
|
|
54
|
+
padding-left: 12px;
|
|
55
|
+
padding-right: 12px;
|
|
56
|
+
}
|
|
57
|
+
.semi-cascader-large .semi-cascader-selection-multiple {
|
|
58
|
+
padding-left: 4px;
|
|
59
|
+
padding-right: 4px;
|
|
60
|
+
}
|
|
45
61
|
.semi-cascader-focus {
|
|
46
62
|
border: 1px solid var(--semi-color-focus-border);
|
|
47
63
|
outline: 0;
|
|
@@ -39,6 +39,16 @@ $module: #{$prefix}-cascader;
|
|
|
39
39
|
&-small {
|
|
40
40
|
min-height: $height-cascader_small;
|
|
41
41
|
line-height: $height-cascader_small;
|
|
42
|
+
|
|
43
|
+
.#{$module}-selection {
|
|
44
|
+
padding-left: $spacing-cascader_small_selection-paddingLeft;
|
|
45
|
+
padding-right: $spacing-cascader_small_selection-paddingRight;
|
|
46
|
+
|
|
47
|
+
&-multiple {
|
|
48
|
+
padding-left: $spacing-cascader_small_selection_multiple-paddingLeft;
|
|
49
|
+
padding-right: $spacing-cascader_small_selection_multiple-paddingRight;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
&-large {
|
|
@@ -47,6 +57,16 @@ $module: #{$prefix}-cascader;
|
|
|
47
57
|
.#{$module}-selection {
|
|
48
58
|
@include font-size-header-6;
|
|
49
59
|
}
|
|
60
|
+
|
|
61
|
+
.#{$module}-selection {
|
|
62
|
+
padding-left: $spacing-cascader_large_selection-paddingLeft;
|
|
63
|
+
padding-right: $spacing-cascader_large_selection-paddingRight;
|
|
64
|
+
|
|
65
|
+
&-multiple {
|
|
66
|
+
padding-left: $spacing-cascader_large_selection_multiple-paddingLeft;
|
|
67
|
+
padding-right: $spacing-cascader_large_selection_multiple-paddingRight;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
50
70
|
}
|
|
51
71
|
|
|
52
72
|
&-focus {
|
|
@@ -45,10 +45,20 @@ $color-cascader_danger-border-active: var(--semi-color-danger-light-active); //
|
|
|
45
45
|
|
|
46
46
|
$color-cascader_prefix_suffix_text-default: var(--semi-color-text-2); // 级联选择前后缀文字颜色
|
|
47
47
|
|
|
48
|
-
$spacing-cascader_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距
|
|
49
|
-
$spacing-cascader_selection-paddingRight: 12px; // 级联选择触发器右侧内边距
|
|
50
|
-
$spacing-
|
|
51
|
-
$spacing-
|
|
48
|
+
$spacing-cascader_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 默认
|
|
49
|
+
$spacing-cascader_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 默认
|
|
50
|
+
$spacing-cascader_small_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 小尺寸
|
|
51
|
+
$spacing-cascader_small_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 小尺寸
|
|
52
|
+
$spacing-cascader_large_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 大尺寸
|
|
53
|
+
$spacing-cascader_large_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 大尺寸
|
|
54
|
+
|
|
55
|
+
$spacing-cascader_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 默认
|
|
56
|
+
$spacing-cascader_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时右侧内边距 - 默认
|
|
57
|
+
$spacing-cascader_small_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 小尺寸
|
|
58
|
+
$spacing-cascader_small_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 小尺寸
|
|
59
|
+
$spacing-cascader_large_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 大尺寸
|
|
60
|
+
$spacing-cascader_large_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 大尺寸
|
|
61
|
+
|
|
52
62
|
$spacing-cascader_selection_tag-marginLeft: $spacing-none; // 级联选择触发器多选时标签的水平左外边距
|
|
53
63
|
$spacing-cascader_selection_tag-marginRight: $spacing-super-tight; // 级联选择触发器多选时标签的水平右外边距
|
|
54
64
|
$spacing-cascader_selection_tag-marginY: 1px; // 级联选择触发器多选时标签的垂直外边距
|
package/lib/cjs/chat/chat.css
CHANGED
|
@@ -107,6 +107,8 @@
|
|
|
107
107
|
}
|
|
108
108
|
.semi-chat-chatBox-avatar {
|
|
109
109
|
flex-shrink: 0;
|
|
110
|
+
width: 24px;
|
|
111
|
+
height: 24px;
|
|
110
112
|
}
|
|
111
113
|
.semi-chat-chatBox-avatar-hidden {
|
|
112
114
|
visibility: hidden;
|
|
@@ -161,11 +163,14 @@
|
|
|
161
163
|
align-items: flex-start;
|
|
162
164
|
position: relative;
|
|
163
165
|
row-gap: 8px;
|
|
166
|
+
max-width: calc(100% - 12px - 24px);
|
|
164
167
|
}
|
|
165
168
|
.semi-chat-chatBox-content-bubble, .semi-chat-chatBox-content-userBubble {
|
|
166
169
|
padding: 8px 12px;
|
|
167
170
|
border-radius: var(--semi-border-radius-large);
|
|
168
171
|
background-color: var(--semi-color-fill-0);
|
|
172
|
+
max-width: 100%;
|
|
173
|
+
box-sizing: border-box;
|
|
169
174
|
}
|
|
170
175
|
.semi-chat-chatBox-content code {
|
|
171
176
|
white-space: pre-wrap;
|
package/lib/cjs/chat/chat.scss
CHANGED
|
@@ -138,6 +138,8 @@ $module: #{$prefix}-chat;
|
|
|
138
138
|
|
|
139
139
|
&-avatar {
|
|
140
140
|
flex-shrink: 0;
|
|
141
|
+
width: $width-chat_chatBox_avatar;
|
|
142
|
+
height: $width-chat_chatBox_avatar;
|
|
141
143
|
|
|
142
144
|
&-hidden {
|
|
143
145
|
visibility: hidden;
|
|
@@ -208,6 +210,7 @@ $module: #{$prefix}-chat;
|
|
|
208
210
|
align-items: flex-start;
|
|
209
211
|
position: relative;
|
|
210
212
|
row-gap: $spacing-chat_chatBox_wrap;
|
|
213
|
+
max-width: calc(100% - $spacing-chat_chatBox-columnGap - $width-chat_chatBox_avatar);
|
|
211
214
|
}
|
|
212
215
|
|
|
213
216
|
|
|
@@ -217,6 +220,8 @@ $module: #{$prefix}-chat;
|
|
|
217
220
|
padding: $spacing-chat_chatBox_content-paddingY $spacing-chat_chatBox_content-paddingX;
|
|
218
221
|
border-radius: $radius-chat_chatBox_content;
|
|
219
222
|
background-color: $color-chat_chatBox_content_bg;
|
|
223
|
+
max-width: 100%;
|
|
224
|
+
box-sizing: border-box;
|
|
220
225
|
}
|
|
221
226
|
|
|
222
227
|
code {
|
|
@@ -104,6 +104,8 @@ $width-chat_attachment_file_title: 90px; // 附件文件标题最大宽度
|
|
|
104
104
|
$width-chat_max: 800px; // chat组件最大宽度
|
|
105
105
|
$width-chat_dropArea-border: 5px; // 拖拽上传边框宽度
|
|
106
106
|
$width-chat_chatBox_content_code_topSlot_copy: 150px; // 聊天框代码块顶部复制按钮最小宽度
|
|
107
|
+
$width-chat_chatBox_avatar: 24px; // 聊天框头像宽度
|
|
108
|
+
|
|
107
109
|
// height
|
|
108
110
|
$height-chat_action_stop: 42px; //停止生成按钮高度
|
|
109
111
|
|
|
@@ -6,7 +6,8 @@ $height-inputNumber_button_inner_large: $height-control-large - 2px; // 隐藏
|
|
|
6
6
|
$height-inputNumber_button_inner_small: $height-control-small - 2px; // 隐藏步进器的数字输入框高度 - 小
|
|
7
7
|
|
|
8
8
|
$width-inputNumber_button: 14px; // 步进器按钮宽度
|
|
9
|
-
$radius-inputNumber: var(--semi-border-radius-small);
|
|
9
|
+
$radius-inputNumber: var(--semi-border-radius-small); // 步进器按钮圆角 - 外部
|
|
10
|
+
$radius-inputNumber_inner: var(--semi-border-radius-small); // 步进器按钮圆角 - 内部
|
|
10
11
|
$spacing-inputNumber_button-marginLeft: 4px; // 步进器按钮左侧外边距
|
|
11
12
|
$color-inputNumber_button-text-default: var(--semi-color-text-2); // 步进器按钮图标颜色
|
|
12
13
|
$color-inputNumber_button-text-disabled: var(--semi-color-disabled-text); // 步进器按钮图标颜色 - 禁用
|
|
@@ -61,6 +61,13 @@
|
|
|
61
61
|
animation-fill-mode: forwards;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
.semi-popover-icon-arrow path:nth-child(1) {
|
|
65
|
+
fill: var(--semi-color-border);
|
|
66
|
+
}
|
|
67
|
+
.semi-popover-icon-arrow path:nth-child(2) {
|
|
68
|
+
fill: var(--semi-color-bg-3);
|
|
69
|
+
}
|
|
70
|
+
|
|
64
71
|
.semi-popover-wrapper .semi-popover-icon-arrow {
|
|
65
72
|
height: 8px;
|
|
66
73
|
width: 24px;
|
|
@@ -88,5 +88,15 @@ $module-icon: #{$module}-icon-arrow;
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
.#{$module}-icon-arrow {
|
|
92
|
+
path:nth-child(1) {
|
|
93
|
+
fill: $color-popover-arrow-border;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
path:nth-child(2) {
|
|
97
|
+
fill: $color-popover-arrow-bg;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
91
101
|
@import '../tooltip/arrow.scss';
|
|
92
102
|
@import "./rtl.scss";
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
$color-tooltip_arrow-icon-default: unset; // 箭头图标
|
|
3
3
|
$color-popover-bg-default: var(--semi-color-bg-3); // 默认背景色
|
|
4
4
|
$color-popover-border-default: var(--semi-color-border); // 默认描边颜色
|
|
5
|
+
$color-popover-arrow-border: var(--semi-color-border); // 箭头描边颜色
|
|
6
|
+
$color-popover-arrow-bg: var(--semi-color-bg-3); // 箭头默认背景色
|
|
5
7
|
|
|
6
8
|
// Width/Height
|
|
7
9
|
$width-popover_arrow: 24px; // 水平箭头宽度 ignore-semi-css-trans
|
|
@@ -67,11 +67,15 @@
|
|
|
67
67
|
.semi-progress-circle-ring {
|
|
68
68
|
display: block;
|
|
69
69
|
}
|
|
70
|
+
.semi-progress-circle-ring-track {
|
|
71
|
+
stroke: var(--semi-color-fill-0);
|
|
72
|
+
}
|
|
70
73
|
.semi-progress-circle-ring-inner {
|
|
71
74
|
transition: stroke-dashoffset 0.3s;
|
|
72
75
|
transition-timing-function: cubic-bezier(0.62, 0.05, 0.36, 0.95);
|
|
73
76
|
transform: rotate(-90deg);
|
|
74
77
|
transform-origin: 50% 50%;
|
|
78
|
+
stroke: var(--semi-color-success);
|
|
75
79
|
}
|
|
76
80
|
.semi-progress-circle-text {
|
|
77
81
|
position: absolute;
|
|
@@ -81,12 +81,18 @@ $module: #{$prefix}-progress;
|
|
|
81
81
|
display: block;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
&-ring-track {
|
|
85
|
+
stroke: $color-progress_default-bg;
|
|
86
|
+
}
|
|
87
|
+
|
|
84
88
|
&-ring-inner {
|
|
85
89
|
transition: stroke-dashoffset $motion-progress-transition_duration;
|
|
86
90
|
transition-timing-function: $motion-progress-transition_timing_function;
|
|
87
91
|
|
|
88
92
|
transform: rotate(-90deg);
|
|
89
93
|
transform-origin: 50% 50%;
|
|
94
|
+
|
|
95
|
+
stroke: $color-progress_track_inner-bg;
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
&-text {
|
|
@@ -37,6 +37,10 @@ export interface BaseColumnProps<RecordType> {
|
|
|
37
37
|
export interface OnChangeExtra {
|
|
38
38
|
changeType?: 'sorter' | 'filter' | 'pagination';
|
|
39
39
|
}
|
|
40
|
+
interface MouseDownTarget {
|
|
41
|
+
targetName: string;
|
|
42
|
+
className: string;
|
|
43
|
+
}
|
|
40
44
|
export interface TableAdapter<RecordType> extends DefaultAdapter {
|
|
41
45
|
resetScrollY: () => void;
|
|
42
46
|
setSelectedRowKeys: (selectedRowKeys: BaseRowKeyType[]) => void;
|
|
@@ -104,6 +108,7 @@ declare class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<Re
|
|
|
104
108
|
* init sortOrder of sorting column, use defaultSortOrder or [] when it is undefined
|
|
105
109
|
*/
|
|
106
110
|
static initSorterOrder(column: BaseColumnProps<unknown>): void;
|
|
111
|
+
mouseDownTarget: MouseDownTarget;
|
|
107
112
|
constructor(adapter: TableAdapter<RecordType>);
|
|
108
113
|
init(): void;
|
|
109
114
|
initExpandedRowKeys({ groups }?: {
|
|
@@ -283,7 +288,8 @@ declare class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<Re
|
|
|
283
288
|
handleSort(column: {
|
|
284
289
|
dataIndex?: string;
|
|
285
290
|
sortOrder?: BaseSortOrder;
|
|
286
|
-
}, e: any): void;
|
|
291
|
+
}, e: any, check?: boolean): void;
|
|
292
|
+
handleMouseDown: (e: any) => void;
|
|
287
293
|
/**
|
|
288
294
|
* Recalculate the cached data after clicking filter or sorter
|
|
289
295
|
* @param {*} queries
|
|
@@ -105,12 +105,20 @@ class TableFoundation extends _foundation.default {
|
|
|
105
105
|
const filteredSortedRowKeys = this.getAllRowKeys(filteredSortedDataSource);
|
|
106
106
|
this._adapter.setCachedFilteredSortedRowKeys(filteredSortedRowKeys);
|
|
107
107
|
};
|
|
108
|
+
this.handleMouseDown = e => {
|
|
109
|
+
var _a, _b;
|
|
110
|
+
this.mouseDownTarget = {
|
|
111
|
+
targetName: (_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName,
|
|
112
|
+
className: (_b = e.target) === null || _b === void 0 ? void 0 : _b.className
|
|
113
|
+
};
|
|
114
|
+
};
|
|
108
115
|
this.isSortOrderValid = sortOrder => _constants.strings.SORT_DIRECTIONS.includes(sortOrder) || sortOrder === false;
|
|
109
116
|
/**
|
|
110
117
|
* memoized function list
|
|
111
118
|
*/
|
|
112
119
|
const handleColumns = this._adapter.getHandleColumns();
|
|
113
120
|
const mergePagination = this._adapter.getMergePagination();
|
|
121
|
+
this.mouseDownTarget = null;
|
|
114
122
|
this.memoizedWithFnsColumns = (0, _memoizeOne.default)(handleColumns, _isEqual2.default);
|
|
115
123
|
this.memoizedFilterColumns = (0, _memoizeOne.default)(_utils.filterColumns);
|
|
116
124
|
this.memoizedFlattenFnsColumns = (0, _memoizeOne.default)(_utils.flattenColumns);
|
|
@@ -878,7 +886,20 @@ class TableFoundation extends _foundation.default {
|
|
|
878
886
|
handleSort() {
|
|
879
887
|
let column = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
880
888
|
let e = arguments.length > 1 ? arguments[1] : undefined;
|
|
889
|
+
let check = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
890
|
+
var _a, _b, _c, _d;
|
|
881
891
|
this.stopPropagation(e);
|
|
892
|
+
/* if mouse down to the resizable handle, do not trigger the sorting,fix #2802
|
|
893
|
+
The target of the click event may be different from the target of the mousedown,
|
|
894
|
+
e.g: Press the mouse, move to another node and then release it,
|
|
895
|
+
So according to the event in the mousedown to determine whether to trigger the sorting
|
|
896
|
+
*/
|
|
897
|
+
if (check) {
|
|
898
|
+
if (this.mouseDownTarget && ((_a = this.mouseDownTarget) === null || _a === void 0 ? void 0 : _a.targetName) === 'SPAN' && ((_d = (_c = (_b = this.mouseDownTarget) === null || _b === void 0 ? void 0 : _b.className) === null || _c === void 0 ? void 0 : _c.includes) === null || _d === void 0 ? void 0 : _d.call(_c, 'react-resizable-handle'))) {
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
this.mouseDownTarget = null;
|
|
902
|
+
}
|
|
882
903
|
const {
|
|
883
904
|
dataIndex
|
|
884
905
|
} = column;
|
package/lib/es/button/button.css
CHANGED
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
|
|
24
24
|
.semi-button {
|
|
25
25
|
box-shadow: none;
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
line-height: 20px;
|
|
28
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
29
26
|
height: 32px;
|
|
30
27
|
display: inline-flex;
|
|
31
28
|
align-items: center;
|
|
@@ -38,6 +35,8 @@
|
|
|
38
35
|
padding-right: 12px;
|
|
39
36
|
padding-top: 6px;
|
|
40
37
|
padding-bottom: 6px;
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
line-height: 20px;
|
|
41
40
|
font-weight: 600;
|
|
42
41
|
outline: none;
|
|
43
42
|
vertical-align: middle;
|
|
@@ -255,6 +254,9 @@
|
|
|
255
254
|
padding-bottom: 2px;
|
|
256
255
|
padding-left: 12px;
|
|
257
256
|
padding-right: 12px;
|
|
257
|
+
font-size: 14px;
|
|
258
|
+
line-height: 20px;
|
|
259
|
+
font-weight: 600;
|
|
258
260
|
}
|
|
259
261
|
.semi-button-size-large {
|
|
260
262
|
height: 40px;
|
|
@@ -262,6 +264,9 @@
|
|
|
262
264
|
padding-bottom: 10px;
|
|
263
265
|
padding-left: 16px;
|
|
264
266
|
padding-right: 16px;
|
|
267
|
+
font-size: 14px;
|
|
268
|
+
line-height: 20px;
|
|
269
|
+
font-weight: 600;
|
|
265
270
|
}
|
|
266
271
|
.semi-button-block {
|
|
267
272
|
width: 100%;
|
|
@@ -6,7 +6,6 @@ $module: #{$prefix}-button;
|
|
|
6
6
|
|
|
7
7
|
.#{$module} {
|
|
8
8
|
@include shadow-0;
|
|
9
|
-
@include font-size-regular;
|
|
10
9
|
height: $height-button_default;
|
|
11
10
|
display: inline-flex;
|
|
12
11
|
align-items: center;
|
|
@@ -19,6 +18,8 @@ $module: #{$prefix}-button;
|
|
|
19
18
|
padding-right: $spacing-button_default-paddingRight;
|
|
20
19
|
padding-top: $spacing-button_default-paddingTop;
|
|
21
20
|
padding-bottom: $spacing-button_default-paddingTop;
|
|
21
|
+
font-size: $font-button-fontSize;
|
|
22
|
+
line-height: $font-button-lineHeight;
|
|
22
23
|
font-weight: $font-button-fontWeight;
|
|
23
24
|
outline: none;
|
|
24
25
|
vertical-align: middle;
|
|
@@ -313,6 +314,9 @@ $module: #{$prefix}-button;
|
|
|
313
314
|
padding-bottom: $spacing-button_small-paddingBottom;
|
|
314
315
|
padding-left: $spacing-button_small-paddingLeft;
|
|
315
316
|
padding-right: $spacing-button_small-paddingRight;
|
|
317
|
+
font-size: $font-button_small-fontSize;
|
|
318
|
+
line-height: $font-button_small-lineHeight;
|
|
319
|
+
font-weight: $font-button_small-fontWeight;
|
|
316
320
|
}
|
|
317
321
|
|
|
318
322
|
&-size-large {
|
|
@@ -321,6 +325,9 @@ $module: #{$prefix}-button;
|
|
|
321
325
|
padding-bottom: $spacing-button_large-paddingBottom;
|
|
322
326
|
padding-left: $spacing-button_large-paddingLeft;
|
|
323
327
|
padding-right: $spacing-button_large-paddingRight;
|
|
328
|
+
font-size: $font-button_large-fontSize;
|
|
329
|
+
line-height: $font-button_large-lineHeight;
|
|
330
|
+
font-weight: $font-button_large-fontWeight;
|
|
324
331
|
}
|
|
325
332
|
|
|
326
333
|
&-block {
|
|
@@ -165,7 +165,16 @@ $width-button_iconOnly_large: $height-control-large; // 图标按钮 width - 大
|
|
|
165
165
|
$spacing-button_iconOnly_content-marginLeft: $spacing-tight; // 按钮左侧图标距离文字间距
|
|
166
166
|
$spacing-button_iconOnly_content-marginRight: $spacing-tight; // 按钮右侧图标距离文字间距
|
|
167
167
|
|
|
168
|
-
$font-button-fontWeight: $font-weight-bold; // 按钮文字字重
|
|
168
|
+
$font-button-fontWeight: $font-weight-bold; // 按钮文字字重 - 默认
|
|
169
|
+
$font-button-fontSize: $font-size-regular; // 按钮文字字号- 默认
|
|
170
|
+
$font-button-lineHeight: 20px; // 按钮文字行高 - 默认
|
|
171
|
+
$font-button_small-fontWeight: $font-weight-bold; // 按钮文字字重 - 小尺寸
|
|
172
|
+
$font-button_small-fontSize: $font-size-regular; // 按钮文字字号- 小尺寸
|
|
173
|
+
$font-button_small-lineHeight: 20px; // 按钮文字行高 - 小尺寸
|
|
174
|
+
$font-button_large-fontWeight: $font-weight-bold; // 默认按钮文字字重 - 大尺寸
|
|
175
|
+
$font-button_large-fontSize: $font-size-regular; // 默认按钮文字字号 - 大尺寸
|
|
176
|
+
$font-button_large-lineHeight: 20px; // 默认按钮文字行高 - 大尺寸
|
|
177
|
+
|
|
169
178
|
$height-button_large: $height-control-large; // 按钮高度 - 大尺寸
|
|
170
179
|
$height-button_small: $height-control-small; // 按钮高度 - 小尺寸
|
|
171
180
|
$height-button_default: $height-control-default; // 按钮高度 - 默认
|
|
@@ -33,6 +33,14 @@
|
|
|
33
33
|
min-height: 24px;
|
|
34
34
|
line-height: 24px;
|
|
35
35
|
}
|
|
36
|
+
.semi-cascader-small .semi-cascader-selection {
|
|
37
|
+
padding-left: 12px;
|
|
38
|
+
padding-right: 12px;
|
|
39
|
+
}
|
|
40
|
+
.semi-cascader-small .semi-cascader-selection-multiple {
|
|
41
|
+
padding-left: 4px;
|
|
42
|
+
padding-right: 4px;
|
|
43
|
+
}
|
|
36
44
|
.semi-cascader-large {
|
|
37
45
|
min-height: 40px;
|
|
38
46
|
line-height: 40px;
|
|
@@ -42,6 +50,14 @@
|
|
|
42
50
|
line-height: 22px;
|
|
43
51
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
44
52
|
}
|
|
53
|
+
.semi-cascader-large .semi-cascader-selection {
|
|
54
|
+
padding-left: 12px;
|
|
55
|
+
padding-right: 12px;
|
|
56
|
+
}
|
|
57
|
+
.semi-cascader-large .semi-cascader-selection-multiple {
|
|
58
|
+
padding-left: 4px;
|
|
59
|
+
padding-right: 4px;
|
|
60
|
+
}
|
|
45
61
|
.semi-cascader-focus {
|
|
46
62
|
border: 1px solid var(--semi-color-focus-border);
|
|
47
63
|
outline: 0;
|
|
@@ -39,6 +39,16 @@ $module: #{$prefix}-cascader;
|
|
|
39
39
|
&-small {
|
|
40
40
|
min-height: $height-cascader_small;
|
|
41
41
|
line-height: $height-cascader_small;
|
|
42
|
+
|
|
43
|
+
.#{$module}-selection {
|
|
44
|
+
padding-left: $spacing-cascader_small_selection-paddingLeft;
|
|
45
|
+
padding-right: $spacing-cascader_small_selection-paddingRight;
|
|
46
|
+
|
|
47
|
+
&-multiple {
|
|
48
|
+
padding-left: $spacing-cascader_small_selection_multiple-paddingLeft;
|
|
49
|
+
padding-right: $spacing-cascader_small_selection_multiple-paddingRight;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
&-large {
|
|
@@ -47,6 +57,16 @@ $module: #{$prefix}-cascader;
|
|
|
47
57
|
.#{$module}-selection {
|
|
48
58
|
@include font-size-header-6;
|
|
49
59
|
}
|
|
60
|
+
|
|
61
|
+
.#{$module}-selection {
|
|
62
|
+
padding-left: $spacing-cascader_large_selection-paddingLeft;
|
|
63
|
+
padding-right: $spacing-cascader_large_selection-paddingRight;
|
|
64
|
+
|
|
65
|
+
&-multiple {
|
|
66
|
+
padding-left: $spacing-cascader_large_selection_multiple-paddingLeft;
|
|
67
|
+
padding-right: $spacing-cascader_large_selection_multiple-paddingRight;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
50
70
|
}
|
|
51
71
|
|
|
52
72
|
&-focus {
|
|
@@ -45,10 +45,20 @@ $color-cascader_danger-border-active: var(--semi-color-danger-light-active); //
|
|
|
45
45
|
|
|
46
46
|
$color-cascader_prefix_suffix_text-default: var(--semi-color-text-2); // 级联选择前后缀文字颜色
|
|
47
47
|
|
|
48
|
-
$spacing-cascader_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距
|
|
49
|
-
$spacing-cascader_selection-paddingRight: 12px; // 级联选择触发器右侧内边距
|
|
50
|
-
$spacing-
|
|
51
|
-
$spacing-
|
|
48
|
+
$spacing-cascader_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 默认
|
|
49
|
+
$spacing-cascader_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 默认
|
|
50
|
+
$spacing-cascader_small_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 小尺寸
|
|
51
|
+
$spacing-cascader_small_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 小尺寸
|
|
52
|
+
$spacing-cascader_large_selection-paddingLeft: 12px; // 级联选择触发器左侧内边距 - 大尺寸
|
|
53
|
+
$spacing-cascader_large_selection-paddingRight: 12px; // 级联选择触发器右侧内边距 - 大尺寸
|
|
54
|
+
|
|
55
|
+
$spacing-cascader_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 默认
|
|
56
|
+
$spacing-cascader_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时右侧内边距 - 默认
|
|
57
|
+
$spacing-cascader_small_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 小尺寸
|
|
58
|
+
$spacing-cascader_small_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 小尺寸
|
|
59
|
+
$spacing-cascader_large_selection_multiple-paddingLeft: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 大尺寸
|
|
60
|
+
$spacing-cascader_large_selection_multiple-paddingRight: $spacing-extra-tight; // 级联选择触发器多选时左侧内边距 - 大尺寸
|
|
61
|
+
|
|
52
62
|
$spacing-cascader_selection_tag-marginLeft: $spacing-none; // 级联选择触发器多选时标签的水平左外边距
|
|
53
63
|
$spacing-cascader_selection_tag-marginRight: $spacing-super-tight; // 级联选择触发器多选时标签的水平右外边距
|
|
54
64
|
$spacing-cascader_selection_tag-marginY: 1px; // 级联选择触发器多选时标签的垂直外边距
|
package/lib/es/chat/chat.css
CHANGED
|
@@ -107,6 +107,8 @@
|
|
|
107
107
|
}
|
|
108
108
|
.semi-chat-chatBox-avatar {
|
|
109
109
|
flex-shrink: 0;
|
|
110
|
+
width: 24px;
|
|
111
|
+
height: 24px;
|
|
110
112
|
}
|
|
111
113
|
.semi-chat-chatBox-avatar-hidden {
|
|
112
114
|
visibility: hidden;
|
|
@@ -161,11 +163,14 @@
|
|
|
161
163
|
align-items: flex-start;
|
|
162
164
|
position: relative;
|
|
163
165
|
row-gap: 8px;
|
|
166
|
+
max-width: calc(100% - 12px - 24px);
|
|
164
167
|
}
|
|
165
168
|
.semi-chat-chatBox-content-bubble, .semi-chat-chatBox-content-userBubble {
|
|
166
169
|
padding: 8px 12px;
|
|
167
170
|
border-radius: var(--semi-border-radius-large);
|
|
168
171
|
background-color: var(--semi-color-fill-0);
|
|
172
|
+
max-width: 100%;
|
|
173
|
+
box-sizing: border-box;
|
|
169
174
|
}
|
|
170
175
|
.semi-chat-chatBox-content code {
|
|
171
176
|
white-space: pre-wrap;
|
package/lib/es/chat/chat.scss
CHANGED
|
@@ -138,6 +138,8 @@ $module: #{$prefix}-chat;
|
|
|
138
138
|
|
|
139
139
|
&-avatar {
|
|
140
140
|
flex-shrink: 0;
|
|
141
|
+
width: $width-chat_chatBox_avatar;
|
|
142
|
+
height: $width-chat_chatBox_avatar;
|
|
141
143
|
|
|
142
144
|
&-hidden {
|
|
143
145
|
visibility: hidden;
|
|
@@ -208,6 +210,7 @@ $module: #{$prefix}-chat;
|
|
|
208
210
|
align-items: flex-start;
|
|
209
211
|
position: relative;
|
|
210
212
|
row-gap: $spacing-chat_chatBox_wrap;
|
|
213
|
+
max-width: calc(100% - $spacing-chat_chatBox-columnGap - $width-chat_chatBox_avatar);
|
|
211
214
|
}
|
|
212
215
|
|
|
213
216
|
|
|
@@ -217,6 +220,8 @@ $module: #{$prefix}-chat;
|
|
|
217
220
|
padding: $spacing-chat_chatBox_content-paddingY $spacing-chat_chatBox_content-paddingX;
|
|
218
221
|
border-radius: $radius-chat_chatBox_content;
|
|
219
222
|
background-color: $color-chat_chatBox_content_bg;
|
|
223
|
+
max-width: 100%;
|
|
224
|
+
box-sizing: border-box;
|
|
220
225
|
}
|
|
221
226
|
|
|
222
227
|
code {
|
|
@@ -104,6 +104,8 @@ $width-chat_attachment_file_title: 90px; // 附件文件标题最大宽度
|
|
|
104
104
|
$width-chat_max: 800px; // chat组件最大宽度
|
|
105
105
|
$width-chat_dropArea-border: 5px; // 拖拽上传边框宽度
|
|
106
106
|
$width-chat_chatBox_content_code_topSlot_copy: 150px; // 聊天框代码块顶部复制按钮最小宽度
|
|
107
|
+
$width-chat_chatBox_avatar: 24px; // 聊天框头像宽度
|
|
108
|
+
|
|
107
109
|
// height
|
|
108
110
|
$height-chat_action_stop: 42px; //停止生成按钮高度
|
|
109
111
|
|
|
@@ -6,7 +6,8 @@ $height-inputNumber_button_inner_large: $height-control-large - 2px; // 隐藏
|
|
|
6
6
|
$height-inputNumber_button_inner_small: $height-control-small - 2px; // 隐藏步进器的数字输入框高度 - 小
|
|
7
7
|
|
|
8
8
|
$width-inputNumber_button: 14px; // 步进器按钮宽度
|
|
9
|
-
$radius-inputNumber: var(--semi-border-radius-small);
|
|
9
|
+
$radius-inputNumber: var(--semi-border-radius-small); // 步进器按钮圆角 - 外部
|
|
10
|
+
$radius-inputNumber_inner: var(--semi-border-radius-small); // 步进器按钮圆角 - 内部
|
|
10
11
|
$spacing-inputNumber_button-marginLeft: 4px; // 步进器按钮左侧外边距
|
|
11
12
|
$color-inputNumber_button-text-default: var(--semi-color-text-2); // 步进器按钮图标颜色
|
|
12
13
|
$color-inputNumber_button-text-disabled: var(--semi-color-disabled-text); // 步进器按钮图标颜色 - 禁用
|
|
@@ -61,6 +61,13 @@
|
|
|
61
61
|
animation-fill-mode: forwards;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
.semi-popover-icon-arrow path:nth-child(1) {
|
|
65
|
+
fill: var(--semi-color-border);
|
|
66
|
+
}
|
|
67
|
+
.semi-popover-icon-arrow path:nth-child(2) {
|
|
68
|
+
fill: var(--semi-color-bg-3);
|
|
69
|
+
}
|
|
70
|
+
|
|
64
71
|
.semi-popover-wrapper .semi-popover-icon-arrow {
|
|
65
72
|
height: 8px;
|
|
66
73
|
width: 24px;
|
|
@@ -88,5 +88,15 @@ $module-icon: #{$module}-icon-arrow;
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
.#{$module}-icon-arrow {
|
|
92
|
+
path:nth-child(1) {
|
|
93
|
+
fill: $color-popover-arrow-border;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
path:nth-child(2) {
|
|
97
|
+
fill: $color-popover-arrow-bg;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
91
101
|
@import '../tooltip/arrow.scss';
|
|
92
102
|
@import "./rtl.scss";
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
$color-tooltip_arrow-icon-default: unset; // 箭头图标
|
|
3
3
|
$color-popover-bg-default: var(--semi-color-bg-3); // 默认背景色
|
|
4
4
|
$color-popover-border-default: var(--semi-color-border); // 默认描边颜色
|
|
5
|
+
$color-popover-arrow-border: var(--semi-color-border); // 箭头描边颜色
|
|
6
|
+
$color-popover-arrow-bg: var(--semi-color-bg-3); // 箭头默认背景色
|
|
5
7
|
|
|
6
8
|
// Width/Height
|
|
7
9
|
$width-popover_arrow: 24px; // 水平箭头宽度 ignore-semi-css-trans
|
|
@@ -67,11 +67,15 @@
|
|
|
67
67
|
.semi-progress-circle-ring {
|
|
68
68
|
display: block;
|
|
69
69
|
}
|
|
70
|
+
.semi-progress-circle-ring-track {
|
|
71
|
+
stroke: var(--semi-color-fill-0);
|
|
72
|
+
}
|
|
70
73
|
.semi-progress-circle-ring-inner {
|
|
71
74
|
transition: stroke-dashoffset 0.3s;
|
|
72
75
|
transition-timing-function: cubic-bezier(0.62, 0.05, 0.36, 0.95);
|
|
73
76
|
transform: rotate(-90deg);
|
|
74
77
|
transform-origin: 50% 50%;
|
|
78
|
+
stroke: var(--semi-color-success);
|
|
75
79
|
}
|
|
76
80
|
.semi-progress-circle-text {
|
|
77
81
|
position: absolute;
|
|
@@ -81,12 +81,18 @@ $module: #{$prefix}-progress;
|
|
|
81
81
|
display: block;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
&-ring-track {
|
|
85
|
+
stroke: $color-progress_default-bg;
|
|
86
|
+
}
|
|
87
|
+
|
|
84
88
|
&-ring-inner {
|
|
85
89
|
transition: stroke-dashoffset $motion-progress-transition_duration;
|
|
86
90
|
transition-timing-function: $motion-progress-transition_timing_function;
|
|
87
91
|
|
|
88
92
|
transform: rotate(-90deg);
|
|
89
93
|
transform-origin: 50% 50%;
|
|
94
|
+
|
|
95
|
+
stroke: $color-progress_track_inner-bg;
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
&-text {
|
|
@@ -37,6 +37,10 @@ export interface BaseColumnProps<RecordType> {
|
|
|
37
37
|
export interface OnChangeExtra {
|
|
38
38
|
changeType?: 'sorter' | 'filter' | 'pagination';
|
|
39
39
|
}
|
|
40
|
+
interface MouseDownTarget {
|
|
41
|
+
targetName: string;
|
|
42
|
+
className: string;
|
|
43
|
+
}
|
|
40
44
|
export interface TableAdapter<RecordType> extends DefaultAdapter {
|
|
41
45
|
resetScrollY: () => void;
|
|
42
46
|
setSelectedRowKeys: (selectedRowKeys: BaseRowKeyType[]) => void;
|
|
@@ -104,6 +108,7 @@ declare class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<Re
|
|
|
104
108
|
* init sortOrder of sorting column, use defaultSortOrder or [] when it is undefined
|
|
105
109
|
*/
|
|
106
110
|
static initSorterOrder(column: BaseColumnProps<unknown>): void;
|
|
111
|
+
mouseDownTarget: MouseDownTarget;
|
|
107
112
|
constructor(adapter: TableAdapter<RecordType>);
|
|
108
113
|
init(): void;
|
|
109
114
|
initExpandedRowKeys({ groups }?: {
|
|
@@ -283,7 +288,8 @@ declare class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<Re
|
|
|
283
288
|
handleSort(column: {
|
|
284
289
|
dataIndex?: string;
|
|
285
290
|
sortOrder?: BaseSortOrder;
|
|
286
|
-
}, e: any): void;
|
|
291
|
+
}, e: any, check?: boolean): void;
|
|
292
|
+
handleMouseDown: (e: any) => void;
|
|
287
293
|
/**
|
|
288
294
|
* Recalculate the cached data after clicking filter or sorter
|
|
289
295
|
* @param {*} queries
|
|
@@ -98,12 +98,20 @@ class TableFoundation extends BaseFoundation {
|
|
|
98
98
|
const filteredSortedRowKeys = this.getAllRowKeys(filteredSortedDataSource);
|
|
99
99
|
this._adapter.setCachedFilteredSortedRowKeys(filteredSortedRowKeys);
|
|
100
100
|
};
|
|
101
|
+
this.handleMouseDown = e => {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
this.mouseDownTarget = {
|
|
104
|
+
targetName: (_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName,
|
|
105
|
+
className: (_b = e.target) === null || _b === void 0 ? void 0 : _b.className
|
|
106
|
+
};
|
|
107
|
+
};
|
|
101
108
|
this.isSortOrderValid = sortOrder => strings.SORT_DIRECTIONS.includes(sortOrder) || sortOrder === false;
|
|
102
109
|
/**
|
|
103
110
|
* memoized function list
|
|
104
111
|
*/
|
|
105
112
|
const handleColumns = this._adapter.getHandleColumns();
|
|
106
113
|
const mergePagination = this._adapter.getMergePagination();
|
|
114
|
+
this.mouseDownTarget = null;
|
|
107
115
|
this.memoizedWithFnsColumns = memoizeOne(handleColumns, _isEqual);
|
|
108
116
|
this.memoizedFilterColumns = memoizeOne(filterColumns);
|
|
109
117
|
this.memoizedFlattenFnsColumns = memoizeOne(flattenColumns);
|
|
@@ -871,7 +879,20 @@ class TableFoundation extends BaseFoundation {
|
|
|
871
879
|
handleSort() {
|
|
872
880
|
let column = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
873
881
|
let e = arguments.length > 1 ? arguments[1] : undefined;
|
|
882
|
+
let check = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
883
|
+
var _a, _b, _c, _d;
|
|
874
884
|
this.stopPropagation(e);
|
|
885
|
+
/* if mouse down to the resizable handle, do not trigger the sorting,fix #2802
|
|
886
|
+
The target of the click event may be different from the target of the mousedown,
|
|
887
|
+
e.g: Press the mouse, move to another node and then release it,
|
|
888
|
+
So according to the event in the mousedown to determine whether to trigger the sorting
|
|
889
|
+
*/
|
|
890
|
+
if (check) {
|
|
891
|
+
if (this.mouseDownTarget && ((_a = this.mouseDownTarget) === null || _a === void 0 ? void 0 : _a.targetName) === 'SPAN' && ((_d = (_c = (_b = this.mouseDownTarget) === null || _b === void 0 ? void 0 : _b.className) === null || _c === void 0 ? void 0 : _c.includes) === null || _d === void 0 ? void 0 : _d.call(_c, 'react-resizable-handle'))) {
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
this.mouseDownTarget = null;
|
|
895
|
+
}
|
|
875
896
|
const {
|
|
876
897
|
dataIndex
|
|
877
898
|
} = column;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.79.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.
|
|
11
|
-
"@douyinfe/semi-json-viewer-core": "2.
|
|
10
|
+
"@douyinfe/semi-animation": "2.79.0-beta.0",
|
|
11
|
+
"@douyinfe/semi-json-viewer-core": "2.79.0-beta.0",
|
|
12
12
|
"@mdx-js/mdx": "^3.0.1",
|
|
13
13
|
"async-validator": "^3.5.0",
|
|
14
14
|
"classnames": "^2.2.6",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"*.scss",
|
|
30
30
|
"*.css"
|
|
31
31
|
],
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "94b1ff629a2acd929f92c5cdf17d6bd27e04d46e",
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
35
35
|
"@babel/preset-env": "^7.15.8",
|
package/popover/popover.scss
CHANGED
|
@@ -88,5 +88,15 @@ $module-icon: #{$module}-icon-arrow;
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
.#{$module}-icon-arrow {
|
|
92
|
+
path:nth-child(1) {
|
|
93
|
+
fill: $color-popover-arrow-border;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
path:nth-child(2) {
|
|
97
|
+
fill: $color-popover-arrow-bg;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
91
101
|
@import '../tooltip/arrow.scss';
|
|
92
102
|
@import "./rtl.scss";
|
package/popover/variables.scss
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
$color-tooltip_arrow-icon-default: unset; // 箭头图标
|
|
3
3
|
$color-popover-bg-default: var(--semi-color-bg-3); // 默认背景色
|
|
4
4
|
$color-popover-border-default: var(--semi-color-border); // 默认描边颜色
|
|
5
|
+
$color-popover-arrow-border: var(--semi-color-border); // 箭头描边颜色
|
|
6
|
+
$color-popover-arrow-bg: var(--semi-color-bg-3); // 箭头默认背景色
|
|
5
7
|
|
|
6
8
|
// Width/Height
|
|
7
9
|
$width-popover_arrow: 24px; // 水平箭头宽度 ignore-semi-css-trans
|
package/progress/progress.scss
CHANGED
|
@@ -81,12 +81,18 @@ $module: #{$prefix}-progress;
|
|
|
81
81
|
display: block;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
&-ring-track {
|
|
85
|
+
stroke: $color-progress_default-bg;
|
|
86
|
+
}
|
|
87
|
+
|
|
84
88
|
&-ring-inner {
|
|
85
89
|
transition: stroke-dashoffset $motion-progress-transition_duration;
|
|
86
90
|
transition-timing-function: $motion-progress-transition_timing_function;
|
|
87
91
|
|
|
88
92
|
transform: rotate(-90deg);
|
|
89
93
|
transform-origin: 50% 50%;
|
|
94
|
+
|
|
95
|
+
stroke: $color-progress_track_inner-bg;
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
&-text {
|
package/table/foundation.ts
CHANGED
|
@@ -59,6 +59,11 @@ export interface OnChangeExtra {
|
|
|
59
59
|
changeType?: 'sorter' | 'filter' | 'pagination'
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
interface MouseDownTarget {
|
|
63
|
+
targetName: string;
|
|
64
|
+
className: string
|
|
65
|
+
}
|
|
66
|
+
|
|
62
67
|
export interface TableAdapter<RecordType> extends DefaultAdapter {
|
|
63
68
|
resetScrollY: () => void;
|
|
64
69
|
setSelectedRowKeys: (selectedRowKeys: BaseRowKeyType[]) => void;
|
|
@@ -158,6 +163,8 @@ class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<RecordType
|
|
|
158
163
|
}
|
|
159
164
|
}
|
|
160
165
|
|
|
166
|
+
mouseDownTarget: MouseDownTarget;
|
|
167
|
+
|
|
161
168
|
constructor(adapter: TableAdapter<RecordType>) {
|
|
162
169
|
super({ ...adapter });
|
|
163
170
|
|
|
@@ -166,6 +173,7 @@ class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<RecordType
|
|
|
166
173
|
*/
|
|
167
174
|
const handleColumns: (queries: BaseColumnProps<RecordType>[], cachedColumns: BaseColumnProps<RecordType>[]) => BaseColumnProps<RecordType>[] = this._adapter.getHandleColumns();
|
|
168
175
|
const mergePagination: (pagination: BasePagination) => BasePagination = this._adapter.getMergePagination();
|
|
176
|
+
this.mouseDownTarget = null ;
|
|
169
177
|
|
|
170
178
|
this.memoizedWithFnsColumns = memoizeOne(handleColumns, isEqual);
|
|
171
179
|
this.memoizedFilterColumns = memoizeOne(filterColumns);
|
|
@@ -1079,8 +1087,21 @@ class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<RecordType
|
|
|
1079
1087
|
* @param {*} column
|
|
1080
1088
|
* @param {*} e
|
|
1081
1089
|
*/
|
|
1082
|
-
handleSort(column: { dataIndex?: string; sortOrder?: BaseSortOrder } = {}, e: any) {
|
|
1090
|
+
handleSort(column: { dataIndex?: string; sortOrder?: BaseSortOrder } = {}, e: any, check = false) {
|
|
1083
1091
|
this.stopPropagation(e);
|
|
1092
|
+
/* if mouse down to the resizable handle, do not trigger the sorting,fix #2802
|
|
1093
|
+
The target of the click event may be different from the target of the mousedown,
|
|
1094
|
+
e.g: Press the mouse, move to another node and then release it,
|
|
1095
|
+
So according to the event in the mousedown to determine whether to trigger the sorting
|
|
1096
|
+
*/
|
|
1097
|
+
if (check) {
|
|
1098
|
+
if (this.mouseDownTarget && this.mouseDownTarget?.targetName === 'SPAN' &&
|
|
1099
|
+
this.mouseDownTarget?.className?.includes?.('react-resizable-handle')
|
|
1100
|
+
) {
|
|
1101
|
+
return;
|
|
1102
|
+
}
|
|
1103
|
+
this.mouseDownTarget = null;
|
|
1104
|
+
}
|
|
1084
1105
|
|
|
1085
1106
|
const { dataIndex } = column;
|
|
1086
1107
|
|
|
@@ -1127,6 +1148,13 @@ class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<RecordType
|
|
|
1127
1148
|
this._notifyChange(null, null, curQuery, { changeType: 'sorter' });
|
|
1128
1149
|
}
|
|
1129
1150
|
|
|
1151
|
+
handleMouseDown = (e: any) => {
|
|
1152
|
+
this.mouseDownTarget = {
|
|
1153
|
+
targetName: e.target?.tagName,
|
|
1154
|
+
className: e.target?.className,
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1130
1158
|
/**
|
|
1131
1159
|
* Recalculate the cached data after clicking filter or sorter
|
|
1132
1160
|
* @param {*} queries
|