Skip to content

Commit 187ac96

Browse files
authored
fix(Button): customDataset attribute type changed to any (#3179)
1 parent b3466bc commit 187ac96

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

src/button/README.en-US.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on v
7676
app-parameter | String | - | \- | N
7777
block | Boolean | false | make button to be a block-level element | N
7878
content | String / Slot | - | button's children elements。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
79-
custom-dataset | Object | - | Typescript:`any` | N
79+
custom-dataset | any | - | \- | N
8080
disabled | Boolean | undefined | disable the button, make it can not be clicked | N
8181
ghost | Boolean | false | make background-color to be transparent | N
8282
hover-class | String | - | \- | N
@@ -127,7 +127,6 @@ t-class | \-
127127
t-class-icon | class name of icon
128128
t-class-loading | class name of loading
129129

130-
131130
### CSS Variables
132131

133132
The component provides the following CSS variables, which can be used to customize styles.
@@ -231,4 +230,4 @@ Name | Default Value | Description
231230
--td-button-small-font-size | @font-size-base | -
232231
--td-button-small-height | 64rpx | -
233232
--td-button-small-icon-font-size | 36rpx | -
234-
--td-button-small-padding-horizontal | 24rpx | -
233+
--td-button-small-padding-horizontal | 24rpx | -

src/button/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场
7878
app-parameter | String | - | 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 | N
7979
block | Boolean | false | 是否为块级元素 | N
8080
content | String / Slot | - | 按钮内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
81-
custom-dataset | Object | - | 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取。。TS 类型:`any` | N
81+
custom-dataset | any | - | 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取 | N
8282
disabled | Boolean | undefined | 禁用状态。优先级:Button.disabled > Form.disabled | N
8383
ghost | Boolean | false | 是否为幽灵按钮(镂空按钮) | N
8484
hover-class | String | - | 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果 | N
@@ -129,7 +129,6 @@ t-class | 根节点样式类
129129
t-class-icon | 图标样式类
130130
t-class-loading | 加载样式类
131131

132-
133132
### CSS Variables
134133

135134
组件提供了下列 CSS 变量,可用于自定义样式。
@@ -233,4 +232,4 @@ t-class-loading | 加载样式类
233232
--td-button-small-font-size | @font-size-base | -
234233
--td-button-small-height | 64rpx | -
235234
--td-button-small-icon-font-size | 36rpx | -
236-
--td-button-small-padding-horizontal | 24rpx | -
235+
--td-button-small-padding-horizontal | 24rpx | -

src/button/props.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const props: TdButtonProps = {
2020
content: {
2121
type: String,
2222
},
23-
/** 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取 */
23+
/** 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取 */
2424
customDataset: {
25-
type: Object,
25+
type: null,
2626
},
2727
/** 禁用状态。优先级:Button.disabled > Form.disabled */
2828
disabled: {

src/button/type.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ export interface TdButtonProps {
3131
value?: string;
3232
};
3333
/**
34-
* 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取
34+
* 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取
3535
*/
3636
customDataset?: {
37-
type: ObjectConstructor;
38-
value?: any;
37+
type: null;
38+
value?: null;
3939
};
4040
/**
4141
* 禁用状态。优先级:Button.disabled > Form.disabled

0 commit comments

Comments
 (0)