Skip to content

Commit

Permalink
feat(Swiper): update api docs (#1945)
Browse files Browse the repository at this point in the history
* feat(Swiper): update api docs

* Update CHANGELOG.md
  • Loading branch information
anlyyao authored Apr 28, 2023
1 parent 348ba4c commit c977ec5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ docClass: timeline
## 🌈 1.1.2 `2023-04-17`
### 🚀 Features
- `Swiper`: 支持无障碍访问 @zhangpaopao0609 ([#1598](https://github.com/Tencent/tdesign-miniprogram/pull/1598))
- `Swiper`: list 属性支持 SwiperList[] 类型 @zhangpaopao0609 ([#1598](https://github.com/Tencent/tdesign-miniprogram/pull/1598))
- `Divider`: 新增 CSS Variables 用于控制分割线样式 @favouredddd ([#1890](https://github.com/Tencent/tdesign-miniprogram/pull/1890))
- `Grid`: 补充 CSS Variables 以修改不同列数下的图片尺寸和文字大小 @lolhezihehe ([#1903](https://github.com/Tencent/tdesign-miniprogram/pull/1903))
- `Radio`: 新增 CSS Variables 用于控制内容字体大小 @favouredddd ([#1895](https://github.com/Tencent/tdesign-miniprogram/pull/1895))
Expand Down
8 changes: 0 additions & 8 deletions src/swiper-nav/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ export interface TdSwiperNavProps {
type: NumberConstructor;
value?: number;
};
/**
* 自定义组件样式
* @default ''
*/
style?: {
type: StringConstructor;
value?: string;
};
/**
* 轮播滑动方向,包括横向滑动和纵向滑动两个方向
* @default horizontal
Expand Down
2 changes: 1 addition & 1 deletion src/swiper/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ easing-function | String | default | `0.32.0`。options:default/linear/easeInC
height | String / Number | 192 | \- | N
image-props | Object | - | `0.34.0` | N
interval | Number | 5000 | \- | N
list | Array | - | `0.32.0`。Typescript:`string[]` | N
list | Array | - | `0.32.0`。Typescript:`string[] \| SwiperList[]` `interface SwiperList { value: string, ariaLabel: string }`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/swiper/type.ts) | N
loop | Boolean | true | \- | N
navigation | Boolean / Object / Slot | true | Typescript:`SwiperNavProps \| boolean`[SwiperNav API Documents](./swiper-nav?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/swiper/type.ts) | N
next-margin | String / Number | 0 | `0.32.0` | N
Expand Down
2 changes: 1 addition & 1 deletion src/swiper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ easing-function | String | default | `0.32.0`。指定 swiper 切换缓动动画
height | String / Number | 192 | 轮播的高度;默认单位 `px` | N
image-props | Object | - | `0.34.0`。透传至 Image 组件 | N
interval | Number | 5000 | 轮播间隔时间 | N
list | Array | - | `0.32.0`。图片列表。TS 类型:`string[]` | N
list | Array | - | `0.32.0`。图片列表。TS 类型:`string[] \| SwiperList[]` `interface SwiperList { value: string, ariaLabel: string }`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/swiper/type.ts) | N
loop | Boolean | true | 是否循环播放 | N
navigation | Boolean / Object / Slot | true | 导航器全部配置,true 的话使用默认配置。TS 类型:`SwiperNavProps \| boolean`[SwiperNav API Documents](./swiper-nav?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/swiper/type.ts) | N
next-margin | String / Number | 0 | `0.32.0`。后边距,可用于露出后一项的一小部分。默认单位 `px` | N
Expand Down
15 changes: 6 additions & 9 deletions src/swiper/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ export interface TdSwiperProps {
type: NumberConstructor;
value?: number;
};
/**
* 自定义组件样式
* @default ''
*/
style?: {
type: StringConstructor;
value?: string;
};
/**
* 轮播滑动方向,包括横向滑动和纵向滑动两个方向
* @default horizontal
Expand Down Expand Up @@ -91,7 +83,7 @@ export interface TdSwiperProps {
*/
list?: {
type: ArrayConstructor;
value?: string[];
value?: string[] | SwiperList[];
};
/**
* 是否循环播放
Expand Down Expand Up @@ -142,3 +134,8 @@ export interface TdSwiperProps {
value?: boolean;
};
}

export interface SwiperList {
value: string;
ariaLabel: string;
}

0 comments on commit c977ec5

Please sign in to comment.