@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.
@@ -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
- if ((autoPlayType === 'boolean' && autoPlay) || isObject(autoPlay) || this._forcePlay) {
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
- if (autoPlayType === 'boolean' && autoPlay || (0, _isObject2.default)(autoPlay) || this._forcePlay) {
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
  }
@@ -34,7 +34,7 @@ export interface SliderProps {
34
34
  handleDot?: {
35
35
  size?: string;
36
36
  color?: string;
37
- } & ({
37
+ } | ({
38
38
  size?: string;
39
39
  color?: string;
40
40
  }[]);
@@ -441,7 +441,6 @@
441
441
  text-align: center;
442
442
  background: transparent;
443
443
  border-bottom: 1px solid var(--semi-color-border);
444
- border-radius: 0 0 4px 4px;
445
444
  }
446
445
  .semi-table-fixed {
447
446
  table-layout: fixed;
@@ -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
- if (autoPlayType === 'boolean' && autoPlay || _isObject(autoPlay) || this._forcePlay) {
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
  }
@@ -34,7 +34,7 @@ export interface SliderProps {
34
34
  handleDot?: {
35
35
  size?: string;
36
36
  color?: string;
37
- } & ({
37
+ } | ({
38
38
  size?: string;
39
39
  color?: string;
40
40
  }[]);
@@ -441,7 +441,6 @@
441
441
  text-align: center;
442
442
  background: transparent;
443
443
  border-bottom: 1px solid var(--semi-color-border);
444
- border-radius: 0 0 4px 4px;
445
444
  }
446
445
  .semi-table-fixed {
447
446
  table-layout: fixed;
@@ -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-beta.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-beta.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": "aa6b83e5efc6705625be251749aa45a182c5eac3",
31
+ "gitHead": "e64eec886e0046db6787303086f1ddd067196aa9",
32
32
  "devDependencies": {
33
33
  "@babel/plugin-transform-runtime": "^7.15.8",
34
34
  "@babel/preset-env": "^7.15.8",
@@ -40,7 +40,7 @@ export interface SliderProps{
40
40
  handleDot?: {
41
41
  size?: string;
42
42
  color?: string
43
- } & ({
43
+ } | ({
44
44
  size?: string;
45
45
  color?: string
46
46
  }[])
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 {
@@ -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; // 表格排序按钮高度