File tree Expand file tree Collapse file tree 16 files changed +157
-19
lines changed
tdesign-mobile-react/src/divider
tdesign-mobile-vue/src/divider
tdesign-react/packages/components/divider Expand file tree Collapse file tree 16 files changed +157
-19
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ children | TNode | - | Typescript:`string \| TNode`。[see more ts definition]
1313content | TNode | - | Typescript:` string \| TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
1414dashed | Boolean | false | \- | N
1515layout | String | horizontal | options: horizontal/vertical | N
16+ size | Number | - | Spacing size | N
Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ children | TNode | - | 子元素,同 content。TS 类型:`string \| TNode`
1313content | TNode | - | 子元素。TS 类型:` string \| TNode ` 。[ 通用类型定义] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
1414dashed | Boolean | false | 是否虚线(仅在水平分割线有效) | N
1515layout | String | horizontal | 分隔线类型有两种:水平和垂直。可选项:horizontal/vertical | N
16+ size | Number | - | 间距大小 | N
Original file line number Diff line number Diff line change @@ -30,4 +30,8 @@ export interface TdDividerProps {
3030 * @default horizontal
3131 */
3232 layout ?: 'horizontal' | 'vertical' ;
33+ /**
34+ * 间距大小
35+ */
36+ size ?: number ;
3337}
Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ content | String / Slot / Function | - | Typescript:`string \| TNode`。[see m
1111dashed | Boolean | false | \- | N
1212default | String / Slot / Function | - | Typescript:` string \| TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts ) | N
1313layout | String | horizontal | options: horizontal/vertical | N
14+ size | Number | - | Spacing size | N
Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ content | String / Slot / Function | - | 子元素。TS 类型:`string \| TNod
1111dashed | Boolean | false | 是否虚线(仅在水平分割线有效) | N
1212default | String / Slot / Function | - | 子元素,同 content。TS 类型:` string \| TNode ` 。[ 通用类型定义] ( https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts ) | N
1313layout | String | horizontal | 分隔线类型有两种:水平和垂直。可选项:horizontal/vertical | N
14+ size | Number | - | 间距大小 | N
Original file line number Diff line number Diff line change 1+ /* eslint-disable */
2+
3+ /**
4+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
5+ * */
6+
7+ import { TdDividerProps } from './type' ;
8+ import { PropType } from 'vue' ;
9+
10+ export default {
11+ /** 文本位置(仅在水平分割线有效) */
12+ align : {
13+ type : String as PropType < TdDividerProps [ 'align' ] > ,
14+ default : 'center' as TdDividerProps [ 'align' ] ,
15+ validator ( val : TdDividerProps [ 'align' ] ) : boolean {
16+ if ( ! val ) return true ;
17+ return [ 'left' , 'right' , 'center' ] . includes ( val ) ;
18+ } ,
19+ } ,
20+ /** 子元素 */
21+ content : {
22+ type : [ String , Function ] as PropType < TdDividerProps [ 'content' ] > ,
23+ } ,
24+ /** 是否虚线(仅在水平分割线有效) */
25+ dashed : Boolean ,
26+ /** 子元素,同 content */
27+ default : {
28+ type : [ String , Function ] as PropType < TdDividerProps [ 'default' ] > ,
29+ } ,
30+ /** 分隔线类型有两种:水平和垂直 */
31+ layout : {
32+ type : String as PropType < TdDividerProps [ 'layout' ] > ,
33+ default : 'horizontal' as TdDividerProps [ 'layout' ] ,
34+ validator ( val : TdDividerProps [ 'layout' ] ) : boolean {
35+ if ( ! val ) return true ;
36+ return [ 'horizontal' , 'vertical' ] . includes ( val ) ;
37+ } ,
38+ } ,
39+ /** 间距大小 */
40+ size : {
41+ type : Number ,
42+ } ,
43+ } ;
Original file line number Diff line number Diff line change 1+ /* eslint-disable */
2+
3+ /**
4+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
5+ * */
6+
7+ import { TNode } from '../common' ;
8+
9+ export interface TdDividerProps {
10+ /**
11+ * 文本位置(仅在水平分割线有效)
12+ * @default center
13+ */
14+ align ?: 'left' | 'right' | 'center' ;
15+ /**
16+ * 子元素
17+ */
18+ content ?: string | TNode ;
19+ /**
20+ * 是否虚线(仅在水平分割线有效)
21+ * @default false
22+ */
23+ dashed ?: boolean ;
24+ /**
25+ * 子元素,同 content
26+ */
27+ default ?: string | TNode ;
28+ /**
29+ * 分隔线类型有两种:水平和垂直
30+ * @default horizontal
31+ */
32+ layout ?: 'horizontal' | 'vertical' ;
33+ /**
34+ * 间距大小
35+ */
36+ size ?: number ;
37+ }
Original file line number Diff line number Diff line change 11:: BASE_DOC ::
22
33## API
4+
45### Divider Props
56
67name | type | default | description | required
78-- | -- | -- | -- | --
8- className | String | - | 类名 | N
9- style | Object | - | 样式 ,Typescript:` React.CSSProperties ` | N
10- align | String | center | options: left/right/center | N
9+ className | String | - | className of component | N
10+ style | Object | - | CSS(Cascading Style Sheets) ,Typescript:` React.CSSProperties ` | N
11+ align | String | center | options: left/right/center | N
1112children | TNode | - | Typescript:` string \| TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts ) | N
1213content | TNode | - | Typescript:` string \| TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts ) | N
1314dashed | Boolean | false | \- | N
14- layout | String | horizontal | options:horizontal/vertical | N
15+ layout | String | horizontal | options: horizontal/vertical | N
16+ size | Number | - | Spacing size | N
Original file line number Diff line number Diff line change 11:: BASE_DOC ::
22
33## API
4+
45### Divider Props
56
6- 名称 | 类型 | 默认值 | 说明 | 必传
7+ 名称 | 类型 | 默认值 | 描述 | 必传
78-- | -- | -- | -- | --
89className | String | - | 类名 | N
910style | Object | - | 样式,TS 类型:` React.CSSProperties ` | N
@@ -12,3 +13,4 @@ children | TNode | - | 子元素,同 content。TS 类型:`string \| TNode`
1213content | TNode | - | 子元素。TS 类型:` string \| TNode ` 。[ 通用类型定义] ( https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts ) | N
1314dashed | Boolean | false | 是否虚线(仅在水平分割线有效) | N
1415layout | String | horizontal | 分隔线类型有两种:水平和垂直。可选项:horizontal/vertical | N
16+ size | Number | - | 间距大小 | N
You can’t perform that action at this time.
0 commit comments