Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const swiperDefaultProps: TdSwiperProps = {
interval: 5000,
loop: true,
stopOnHover: true,
theme: 'light',
trigger: 'hover',
type: 'default',
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name | type | default | description | required
-- | -- | -- | -- | --
className | String | - | className of component | N
style | Object | - | CSS(Cascading Style Sheets),Typescript`React.CSSProperties` | N
style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N
animation | String | slide | options: slide/fade | N
autoplay | Boolean | true | \- | N
cardScale | Number | 210/332 | \- | N
Expand All @@ -18,12 +18,11 @@ duration | Number | 300 | \- | N
height | Number | - | \- | N
interval | Number | 5000 | \- | N
loop | Boolean | true | \- | N
navigation | TNode | - | Typescript`SwiperNavigation \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
navigation | TNode | - | Typescript: `SwiperNavigation \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
stopOnHover | Boolean | true | \- | N
theme | String | light | options: light/dark | N
trigger | String | hover | options: hover/click | N
type | String | default | options: default/card | N
onChange | Function | | Typescript`(current: number, context: { source: SwiperChangeSource }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N
onChange | Function | | Typescript: `(current: number, context: { source: SwiperChangeSource }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N

### SwiperNavigation

Expand All @@ -32,4 +31,4 @@ name | type | default | description | required
placement | String | inside | options: inside/outside | N
showSlideBtn | String | always | options: always/hover/never | N
size | String | medium | options: small/medium/large | N
type | String | - | Typescript`SwiperNavigationType` `type SwiperNavigationType = 'dots' \| 'dots-bar' \| 'bars' \| 'fraction'`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/swiper/type.ts) | N
type | String | - | Typescript: `SwiperNavigationType` `type SwiperNavigationType = 'dots' \| 'dots-bar' \| 'bars' \| 'fraction'`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/swiper/type.ts) | N
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ interval | Number | 5000 | 轮播间隔时间 | N
loop | Boolean | true | 是否循环播放 | N
navigation | TNode | - | 导航器全部配置。TS 类型:`SwiperNavigation \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
stopOnHover | Boolean | true | 是否悬浮时停止轮播 | N
theme | String | light | 深色模式和浅色模式。可选项:light/dark | N
trigger | String | hover | 触发切换的方式:悬浮、点击等。可选项:hover/click | N
type | String | default | 样式类型:默认样式、卡片样式。可选项:default/card | N
onChange | Function | | TS 类型:`(current: number, context: { source: SwiperChangeSource }) => void`<br/>轮播切换时触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ export interface TdSwiperProps {
* @default true
*/
stopOnHover?: boolean;
/**
* 深色模式和浅色模式
* @default light
*/
theme?: 'light' | 'dark';
/**
* 触发切换的方式:悬浮、点击等
* @default hover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ export default {
type: Boolean,
default: true,
},
/** 深色模式和浅色模式 */
theme: {
type: String as PropType<TdSwiperProps['theme']>,
default: 'light' as TdSwiperProps['theme'],
validator(val: TdSwiperProps['theme']): boolean {
if (!val) return true;
return ['light', 'dark'].includes(val);
},
},
/** 触发切换的方式:悬浮、点击等 */
trigger: {
type: String as PropType<TdSwiperProps['trigger']>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ duration | Number | 300 | \- | N
height | Number | - | \- | N
interval | Number | 5000 | \- | N
loop | Boolean | true | \- | N
navigation | Object / Slot / Function | - | Typescript`SwiperNavigation \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | N
navigation | Object / Slot / Function | - | Typescript: `SwiperNavigation \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | N
stopOnHover | Boolean | true | \- | N
theme | String | light | options: light/dark | N
trigger | String | hover | options: hover/click | N
type | String | default | options: default/card | N
onChange | Function | | Typescript`(current: number, context: { source: SwiperChangeSource }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N
onChange | Function | | Typescript: `(current: number, context: { source: SwiperChangeSource }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N

### Swiper Events

Expand All @@ -36,4 +35,4 @@ name | type | default | description | required
placement | String | inside | options: inside/outside | N
showSlideBtn | String | always | options: always/hover/never | N
size | String | medium | options: small/medium/large | N
type | String | - | Typescript`SwiperNavigationType` `type SwiperNavigationType = 'dots' \| 'dots-bar' \| 'bars' \| 'fraction'`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/swiper/type.ts) | N
type | String | - | Typescript: `SwiperNavigationType` `type SwiperNavigationType = 'dots' \| 'dots-bar' \| 'bars' \| 'fraction'`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/swiper/type.ts) | N
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interval | Number | 5000 | 轮播间隔时间 | N
loop | Boolean | true | 是否循环播放 | N
navigation | Object / Slot / Function | - | 导航器全部配置。TS 类型:`SwiperNavigation \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | N
stopOnHover | Boolean | true | 是否悬浮时停止轮播 | N
theme | String | light | 深色模式和浅色模式。可选项:light/dark | N
trigger | String | hover | 触发切换的方式:悬浮、点击等。可选项:hover/click | N
type | String | default | 样式类型:默认样式、卡片样式。可选项:default/card | N
onChange | Function | | TS 类型:`(current: number, context: { source: SwiperChangeSource }) => void`<br/>轮播切换时触发。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ export interface TdSwiperProps {
* @default true
*/
stopOnHover?: boolean;
/**
* 深色模式和浅色模式
* @default light
*/
theme?: 'light' | 'dark';
/**
* 触发切换的方式:悬浮、点击等
* @default hover
Expand Down
9 changes: 0 additions & 9 deletions packages/products/tdesign-vue/src/swiper/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,6 @@ export default {
type: Boolean,
default: true,
},
/** 深色模式和浅色模式 */
theme: {
type: String as PropType<TdSwiperProps['theme']>,
default: 'light' as TdSwiperProps['theme'],
validator(val: TdSwiperProps['theme']): boolean {
if (!val) return true;
return ['light', 'dark'].includes(val);
},
},
/** 触发切换的方式:悬浮、点击等 */
trigger: {
type: String as PropType<TdSwiperProps['trigger']>,
Expand Down
7 changes: 3 additions & 4 deletions packages/products/tdesign-vue/src/swiper/swiper.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ duration | Number | 300 | \- | N
height | Number | - | \- | N
interval | Number | 5000 | \- | N
loop | Boolean | true | \- | N
navigation | Object / Slot / Function | - | Typescript`SwiperNavigation \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
navigation | Object / Slot / Function | - | Typescript: `SwiperNavigation \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
stopOnHover | Boolean | true | \- | N
theme | String | light | options: light/dark | N
trigger | String | hover | options: hover/click | N
type | String | default | options: default/card | N
onChange | Function | | Typescript`(current: number, context: { source: SwiperChangeSource }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N
onChange | Function | | Typescript: `(current: number, context: { source: SwiperChangeSource }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N

### Swiper Events

Expand All @@ -36,4 +35,4 @@ name | type | default | description | required
placement | String | inside | options: inside/outside | N
showSlideBtn | String | always | options: always/hover/never | N
size | String | medium | options: small/medium/large | N
type | String | - | Typescript`SwiperNavigationType` `type SwiperNavigationType = 'dots' \| 'dots-bar' \| 'bars' \| 'fraction'`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/swiper/type.ts) | N
type | String | - | Typescript: `SwiperNavigationType` `type SwiperNavigationType = 'dots' \| 'dots-bar' \| 'bars' \| 'fraction'`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/swiper/type.ts) | N
1 change: 0 additions & 1 deletion packages/products/tdesign-vue/src/swiper/swiper.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interval | Number | 5000 | 轮播间隔时间 | N
loop | Boolean | true | 是否循环播放 | N
navigation | Object / Slot / Function | - | 导航器全部配置。TS 类型:`SwiperNavigation \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
stopOnHover | Boolean | true | 是否悬浮时停止轮播 | N
theme | String | light | 深色模式和浅色模式。可选项:light/dark | N
trigger | String | hover | 触发切换的方式:悬浮、点击等。可选项:hover/click | N
type | String | default | 样式类型:默认样式、卡片样式。可选项:default/card | N
onChange | Function | | TS 类型:`(current: number, context: { source: SwiperChangeSource }) => void`<br/>轮播切换时触发。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/swiper/type.ts)。<br/>`type SwiperChangeSource = 'autoplay' \| 'click' \| 'hover'`<br/> | N
Expand Down
5 changes: 0 additions & 5 deletions packages/products/tdesign-vue/src/swiper/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ export interface TdSwiperProps {
* @default true
*/
stopOnHover?: boolean;
/**
* 深色模式和浅色模式
* @default light
*/
theme?: 'light' | 'dark';
/**
* 触发切换的方式:悬浮、点击等
* @default hover
Expand Down
39 changes: 0 additions & 39 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -117414,45 +117414,6 @@
"Boolean"
]
},
{
"id": 2049,
"platform_framework": [
"1",
"2"
],
"component": "Swiper",
"field_category": 1,
"field_name": "theme",
"field_type": [
"1"
],
"field_default_value": "light",
"field_enum": "light/dark",
"field_desc_zh": "深色模式和浅色模式",
"field_desc_en": null,
"field_required": 0,
"event_input": "",
"create_time": "2021-12-15 13:04:30",
"update_time": "2021-12-15 13:04:30",
"event_output": null,
"custom_field_type": null,
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
"trigger_elements": "",
"deprecated": 0,
"version": "",
"test_description": null,
"support_default_value": 0,
"field_category_text": "Props",
"platform_framework_text": [
"Vue(PC)",
"React(PC)"
],
"field_type_text": [
"String"
]
},
{
"id": 2046,
"platform_framework": [
Expand Down