Skip to content

Commit ee6ce5b

Browse files
committed
Merge branch 'main' into rss1102/feat/swiper/navigation
2 parents ab672b0 + 81e42e6 commit ee6ce5b

File tree

72 files changed

+4132
-356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4132
-356
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: pr-spell-check
2+
on: [pull_request]
3+
4+
jobs:
5+
run:
6+
uses: TDesignOteam/workflows/.github/workflows/spell-check.yml@main

.github/workflows/pr-spelling.template.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

db/TDesign.db

12 KB
Binary file not shown.

packages/products/tdesign-miniprogram/packages/components/cascader/README.en-US.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111
check-strictly | Boolean | false | \- | N
1212
close-btn | Boolean | true | \- | N
13-
keys | Object | - | Typescript`KeysType`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
14-
options | Array | [] | Typescript`Array<CascaderOption>` | N
13+
keys | Object | - | Typescript: `CascaderKeysType` `type CascaderKeysType = TreeKeysType`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/cascader/type.ts) | N
14+
options | Array | [] | Typescript: `Array<CascaderOption>` | N
1515
placeholder | String | 选择选项 | \- | N
16-
sub-titles | Array | [] | Typescript`Array<string>` | N
16+
sub-titles | Array | [] | Typescript: `Array<string>` | N
1717
theme | String | step | options: step/tab | N
1818
title | String | - | \- | N
1919
value | String / Number | null | \- | N

packages/products/tdesign-miniprogram/packages/components/cascader/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ style | Object | - | 样式 | N
1010
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
1111
check-strictly | Boolean | false | 父子节点选中状态不再关联,可各自选中或取消 | N
1212
close-btn | Boolean | true | 关闭按钮 | N
13-
keys | Object | - | 用来定义 value / label 在 `options` 中对应的字段别名。TS 类型:`KeysType`[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
13+
keys | Object | - | 用来定义 value / label / children / disabled `options` 中对应的字段别名。TS 类型:`CascaderKeysType` `type CascaderKeysType = TreeKeysType`[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/cascader/type.ts) | N
1414
options | Array | [] | 可选项数据源。TS 类型:`Array<CascaderOption>` | N
1515
placeholder | String | 选择选项 | 未选中时的提示文案 | N
1616
sub-titles | Array | [] | 每级展示的次标题。TS 类型:`Array<string>` | N

packages/products/tdesign-miniprogram/packages/components/cascader/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const props: TdCascaderProps = {
1616
type: Boolean,
1717
value: true,
1818
},
19-
/** 用来定义 value / label 在 `options` 中对应的字段别名 */
19+
/** 用来定义 value / label / children / disabled 在 `options` 中对应的字段别名 */
2020
keys: {
2121
type: Object,
2222
},

packages/products/tdesign-miniprogram/packages/components/cascader/type.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
55
* */
66

7-
import { TreeOptionData, KeysType } from '../common/common';
7+
import { TreeOptionData, TreeKeysType } from '../common/common';
88

99
export interface TdCascaderProps<CascaderOption extends TreeOptionData = TreeOptionData> {
1010
/**
@@ -24,11 +24,11 @@ export interface TdCascaderProps<CascaderOption extends TreeOptionData = TreeOpt
2424
value?: boolean;
2525
};
2626
/**
27-
* 用来定义 value / label 在 `options` 中对应的字段别名
27+
* 用来定义 value / label / children / disabled 在 `options` 中对应的字段别名
2828
*/
2929
keys?: {
3030
type: ObjectConstructor;
31-
value?: KeysType;
31+
value?: CascaderKeysType;
3232
};
3333
/**
3434
* 可选项数据源
@@ -94,3 +94,5 @@ export interface TdCascaderProps<CascaderOption extends TreeOptionData = TreeOpt
9494
value?: boolean;
9595
};
9696
}
97+
98+
export type CascaderKeysType = TreeKeysType;

packages/products/tdesign-miniprogram/packages/components/common/common.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ export interface Styles {
66

77
export type ImageEvent = any;
88

9-
/**
10-
* 通用全局类型
11-
* */
129
export type PlainObject = { [key: string]: any };
1310

1411
export type OptionData = {
@@ -19,15 +16,18 @@ export type OptionData = {
1916
export type TreeOptionData<T = string | number> = {
2017
children?: Array<TreeOptionData<T>> | boolean;
2118
/** option label content */
22-
label?: string | TNode;
19+
label?: string;
2320
/** option search text */
2421
text?: string;
2522
/** option value */
2623
value?: T;
2724
/** option node content */
28-
content?: string | TNode;
25+
content?: string;
2926
} & PlainObject;
3027

28+
/**
29+
* 通用全局类型
30+
* */
3131
export type SizeEnum = 'small' | 'medium' | 'large';
3232

3333
export type ShapeEnum = 'circle' | 'round';
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
:: BASE_DOC ::
2+
3+
## API
4+
5+
### Attachments Props
6+
7+
name | type | default | description | required
8+
-- | -- | -- | -- | --
9+
style | Object | - | CSS(Cascading Style Sheets) | N
10+
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
11+
addable | Boolean | true | \- | N
12+
image-viewer | Boolean | true | \- | N
13+
items | Array | [] | Typescript: `FileItem[]` `interface FileItem { fileType: 'image'\|'video'\|'audio'\|'pdf'\|'doc'\|'ppt'\|'txt'; name: string; url: string; size: number; status?: 'success'\|'fail'\|'pending'\|'error'; progress?: number; errorMessage?: string; fileIcon?: string; width?: number; height?: number; mode?: 'aspectFit' \| 'aspectFill' \| 'widthFix' \| 'heightFix' \| 'scaleToFill'}`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/attachments/type.ts) | N
14+
removable | Boolean | true | \- | N
15+
16+
### Attachments Events
17+
18+
name | params | description
19+
-- | -- | --
20+
add | \- | \-
21+
file-click | `(item: FileItem)` | \-
22+
remove | `(item: FileItem, index: number)` | \-
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
:: BASE_DOC ::
2+
3+
## API
4+
5+
### Attachments Props
6+
7+
名称 | 类型 | 默认值 | 描述 | 必传
8+
-- | -- | -- | -- | --
9+
style | Object | - | 样式 | N
10+
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
11+
addable | Boolean | true | 【讨论中】是否显示添加按钮 | N
12+
image-viewer | Boolean | true | 是否启用图片预览功能 | N
13+
items | Array | [] | 【实验】附件列表。TS 类型:`FileItem[]` `interface FileItem { fileType: 'image'\|'video'\|'audio'\|'pdf'\|'doc'\|'ppt'\|'txt'; name: string; url: string; size: number; status?: 'success'\|'fail'\|'pending'\|'error'; progress?: number; errorMessage?: string; fileIcon?: string; width?: number; height?: number; mode?: 'aspectFit' \| 'aspectFill' \| 'widthFix' \| 'heightFix' \| 'scaleToFill'}`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/attachments/type.ts) | N
14+
removable | Boolean | true | 是否显示删除按钮 | N
15+
16+
### Attachments Events
17+
18+
名称 | 参数 | 描述
19+
-- | -- | --
20+
add | \- | 点击添加按钮时触发
21+
file-click | `(item: FileItem)` | 点击文件时触发
22+
remove | `(item: FileItem, index: number)` | 点击删除按钮时触发

0 commit comments

Comments
 (0)