@douyinfe/semi-foundation 2.62.0-beta.0 → 2.62.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/carousel/foundation.ts +4 -2
- package/lib/cjs/carousel/foundation.js +5 -1
- package/lib/cjs/slider/foundation.d.ts +1 -1
- package/lib/cjs/table/table.css +0 -1
- package/lib/cjs/table/table.scss +0 -1
- package/lib/cjs/table/variables.scss +1 -1
- package/lib/es/carousel/foundation.js +5 -1
- package/lib/es/slider/foundation.d.ts +1 -1
- package/lib/es/table/table.css +0 -1
- package/lib/es/table/table.scss +0 -1
- package/lib/es/table/variables.scss +1 -1
- package/package.json +3 -3
- package/slider/foundation.ts +1 -1
- package/table/table.scss +0 -1
- package/table/variables.scss +1 -1
package/carousel/foundation.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface CarouselAdapter<P = Record<string, any>, S = Record<string, any
|
|
|
7
7
|
setNewActiveIndex: (activeIndex: number) => void;
|
|
8
8
|
setPreActiveIndex: (activeIndex: number) => void;
|
|
9
9
|
setIsReverse: (isReverse: boolean) => void;
|
|
10
|
-
setIsInit: (isInit: boolean) => void
|
|
10
|
+
setIsInit: (isInit: boolean) => void
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
class CarouselFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<CarouselAdapter<P, S>, P, S> {
|
|
@@ -124,9 +124,11 @@ class CarouselFoundation<P = Record<string, any>, S = Record<string, any>> exten
|
|
|
124
124
|
|
|
125
125
|
handleAutoPlay(): void {
|
|
126
126
|
const { autoPlay } = this.getProps();
|
|
127
|
+
const { children } = this.getStates();
|
|
127
128
|
const autoPlayType = typeof autoPlay;
|
|
128
129
|
// when user manually call the play function, force play
|
|
129
|
-
|
|
130
|
+
// only when carousel children length > 1 to start play
|
|
131
|
+
if (children.length > 1 && ((autoPlay === true) || isObject(autoPlay) || this._forcePlay)) {
|
|
130
132
|
this.play(this.getSwitchingTime());
|
|
131
133
|
}
|
|
132
134
|
}
|
|
@@ -123,9 +123,13 @@ class CarouselFoundation extends _foundation.default {
|
|
|
123
123
|
const {
|
|
124
124
|
autoPlay
|
|
125
125
|
} = this.getProps();
|
|
126
|
+
const {
|
|
127
|
+
children
|
|
128
|
+
} = this.getStates();
|
|
126
129
|
const autoPlayType = typeof autoPlay;
|
|
127
130
|
// when user manually call the play function, force play
|
|
128
|
-
|
|
131
|
+
// only when carousel children length > 1 to start play
|
|
132
|
+
if (children.length > 1 && (autoPlay === true || (0, _isObject2.default)(autoPlay) || this._forcePlay)) {
|
|
129
133
|
this.play(this.getSwitchingTime());
|
|
130
134
|
}
|
|
131
135
|
}
|
package/lib/cjs/table/table.css
CHANGED
package/lib/cjs/table/table.scss
CHANGED
|
@@ -541,7 +541,6 @@ $module: #{$prefix}-table;
|
|
|
541
541
|
text-align: center;
|
|
542
542
|
background: $color-table_pl-bg-default;
|
|
543
543
|
border-bottom: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
|
|
544
|
-
border-radius: 0 0 #{$radius-table_base} #{$radius-table_base};
|
|
545
544
|
}
|
|
546
545
|
|
|
547
546
|
&-fixed {
|
|
@@ -32,7 +32,7 @@ $spacing-table_panel_operation-paddingY: $spacing-tight;
|
|
|
32
32
|
$width-table_base_border: 1px; // 表格单元格分割线宽度
|
|
33
33
|
$width-table_header_border: 2px; // 表格表头分割线宽度
|
|
34
34
|
$width-table_resizer_border: 2px; // 表格拉伸列标示线宽度
|
|
35
|
-
$radius-table_base: 4px;
|
|
35
|
+
// $radius-table_base: 4px;
|
|
36
36
|
$width-table_column_selection: 48px; // 表格默认列宽
|
|
37
37
|
$width-table_column_sorter-icon: 16px; // 表格排序按钮宽度
|
|
38
38
|
$height-table_column_sorter-icon: 16px; // 表格排序按钮高度
|
|
@@ -116,9 +116,13 @@ class CarouselFoundation extends BaseFoundation {
|
|
|
116
116
|
const {
|
|
117
117
|
autoPlay
|
|
118
118
|
} = this.getProps();
|
|
119
|
+
const {
|
|
120
|
+
children
|
|
121
|
+
} = this.getStates();
|
|
119
122
|
const autoPlayType = typeof autoPlay;
|
|
120
123
|
// when user manually call the play function, force play
|
|
121
|
-
|
|
124
|
+
// only when carousel children length > 1 to start play
|
|
125
|
+
if (children.length > 1 && (autoPlay === true || _isObject(autoPlay) || this._forcePlay)) {
|
|
122
126
|
this.play(this.getSwitchingTime());
|
|
123
127
|
}
|
|
124
128
|
}
|
package/lib/es/table/table.css
CHANGED
package/lib/es/table/table.scss
CHANGED
|
@@ -541,7 +541,6 @@ $module: #{$prefix}-table;
|
|
|
541
541
|
text-align: center;
|
|
542
542
|
background: $color-table_pl-bg-default;
|
|
543
543
|
border-bottom: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
|
|
544
|
-
border-radius: 0 0 #{$radius-table_base} #{$radius-table_base};
|
|
545
544
|
}
|
|
546
545
|
|
|
547
546
|
&-fixed {
|
|
@@ -32,7 +32,7 @@ $spacing-table_panel_operation-paddingY: $spacing-tight;
|
|
|
32
32
|
$width-table_base_border: 1px; // 表格单元格分割线宽度
|
|
33
33
|
$width-table_header_border: 2px; // 表格表头分割线宽度
|
|
34
34
|
$width-table_resizer_border: 2px; // 表格拉伸列标示线宽度
|
|
35
|
-
$radius-table_base: 4px;
|
|
35
|
+
// $radius-table_base: 4px;
|
|
36
36
|
$width-table_column_selection: 48px; // 表格默认列宽
|
|
37
37
|
$width-table_column_sorter-icon: 16px; // 表格排序按钮宽度
|
|
38
38
|
$height-table_column_sorter-icon: 16px; // 表格排序按钮高度
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.62.0
|
|
3
|
+
"version": "2.62.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.62.0
|
|
10
|
+
"@douyinfe/semi-animation": "2.62.0",
|
|
11
11
|
"@mdx-js/mdx": "^3.0.1",
|
|
12
12
|
"async-validator": "^3.5.0",
|
|
13
13
|
"classnames": "^2.2.6",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"*.scss",
|
|
29
29
|
"*.css"
|
|
30
30
|
],
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "e64eec886e0046db6787303086f1ddd067196aa9",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
34
34
|
"@babel/preset-env": "^7.15.8",
|
package/slider/foundation.ts
CHANGED
package/table/table.scss
CHANGED
|
@@ -541,7 +541,6 @@ $module: #{$prefix}-table;
|
|
|
541
541
|
text-align: center;
|
|
542
542
|
background: $color-table_pl-bg-default;
|
|
543
543
|
border-bottom: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
|
|
544
|
-
border-radius: 0 0 #{$radius-table_base} #{$radius-table_base};
|
|
545
544
|
}
|
|
546
545
|
|
|
547
546
|
&-fixed {
|
package/table/variables.scss
CHANGED
|
@@ -32,7 +32,7 @@ $spacing-table_panel_operation-paddingY: $spacing-tight;
|
|
|
32
32
|
$width-table_base_border: 1px; // 表格单元格分割线宽度
|
|
33
33
|
$width-table_header_border: 2px; // 表格表头分割线宽度
|
|
34
34
|
$width-table_resizer_border: 2px; // 表格拉伸列标示线宽度
|
|
35
|
-
$radius-table_base: 4px;
|
|
35
|
+
// $radius-table_base: 4px;
|
|
36
36
|
$width-table_column_selection: 48px; // 表格默认列宽
|
|
37
37
|
$width-table_column_sorter-icon: 16px; // 表格排序按钮宽度
|
|
38
38
|
$height-table_column_sorter-icon: 16px; // 表格排序按钮高度
|