Skip to content

Commit

Permalink
fix(dialog): Dialog component support confirmLoading (#2814)
Browse files Browse the repository at this point in the history
* fix(dialog): confirmLoading

* docs(dialog): remove docs
  • Loading branch information
chaishi committed Sep 20, 2023
1 parent 2b0f6f7 commit 325aa4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/dialog/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default Vue.extend({
const defaultButtonProps = this.getDefaultConfirmBtnProps(options);
// 属性和插槽都不存在,就返回全局默认配置
if (!confirmBtn && !this.$scopedSlots.confirmBtn) {
return <TButton class={className} props={{ ...defaultButtonProps }} />;
return <TButton class={className} props={{ loading: confirmLoading, ...defaultButtonProps }} />;
}
// 如果属性存在,优先返回属性配置
if (confirmBtn && ['string', 'object'].includes(typeof confirmBtn)) {
Expand Down
6 changes: 0 additions & 6 deletions src/dialog/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@
{{ plugin }}

## API
### DialogCard Props

名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
`Pick<DialogProps, 'body' \| 'cancelBtn' \| 'closeBtn' \| 'confirmBtn' \| 'footer' \| 'header' \| 'theme' \| 'onCancel' \| 'onCloseBtnClick' \| 'onConfirm'>` | String / Slot / Function | - | 继承 `Pick<DialogProps, 'body' \| 'cancelBtn' \| 'closeBtn' \| 'confirmBtn' \| 'footer' \| 'header' \| 'theme' \| 'onCancel' \| 'onCloseBtnClick' \| 'onConfirm'>` 中的全部属性。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N

### Dialog Props

名称 | 类型 | 默认值 | 说明 | 必传
Expand Down

0 comments on commit 325aa4c

Please sign in to comment.