Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dialog alert ts error #796

Merged
merged 1 commit into from Apr 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/dialog/dialog.md
Expand Up @@ -20,7 +20,7 @@ header | String / Boolean / Slot / Function | true | 头部内容。值为 true
mode | String | modal | 对话框类型,有三种:模态对话框、非模态对话框和普通对话框。弹出「模态对话框」时,只能操作对话框里面的内容,不能操作其他内容。弹出「非模态对话框」时,则可以操作页面内所有内容。「普通对话框」是指没有脱离文档流的对话框,可以在这个基础上开发更多的插件。可选项:modal/modeless/normal | N
placement | String | top | 对话框位置,内置两种:垂直水平居中显示 和 靠近顶部(top:20%)显示。可选项:top/center | N
preventScrollThrough | Boolean | true | 防止滚动穿透 | N
showInAttachedElement | Boolean | false | 仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative | N
showInAttachedElement | Boolean | false | 【开发中】仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative | N
showOverlay | Boolean | true | 是否显示遮罩层 | N
theme | String | default | 对话框风格。可选项:default/info/warning/danger/success | N
top | String / Number | - | 用于弹框具体窗口顶部的距离,优先级大于 placement | N
Expand Down Expand Up @@ -91,4 +91,4 @@ options | - | - | TS 类型:`DialogOptions`

参数名称 | 参数类型 | 参数默认值 | 参数说明
-- | -- | -- | --
options | Object | - | TS 类型:`Omit<DialogOptions, 'confirmBtn'>`
options | Object | - | TS 类型:`Omit<DialogOptions, 'cancelBtn'>`
2 changes: 1 addition & 1 deletion src/dialog/props.ts
Expand Up @@ -84,7 +84,7 @@ export default {
type: Boolean,
default: true,
},
/** 仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative */
/** 【开发中】仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative */
showInAttachedElement: Boolean,
/** 是否显示遮罩层 */
showOverlay: {
Expand Down
4 changes: 2 additions & 2 deletions src/dialog/type.ts
Expand Up @@ -83,7 +83,7 @@ export interface TdDialogProps {
*/
preventScrollThrough?: boolean;
/**
* 仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative
* 【开发中】仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative
* @default false
*/
showInAttachedElement?: boolean;
Expand Down Expand Up @@ -195,4 +195,4 @@ export type DialogMethod = (options?: DialogOptions) => DialogInstance;

export type DialogConfirmMethod = (options?: DialogOptions) => DialogInstance;

export type DialogAlertMethod = (options?: Omit<DialogOptions, 'confirmBtn'>) => DialogInstance;
export type DialogAlertMethod = (options?: Omit<DialogOptions, 'cancelBtn'>) => DialogInstance;