mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-11-29 22:12:11 +08:00
feat(form): form dialog新增show close/show cancel 配置
This commit is contained in:
parent
fa0e10f687
commit
310054b7d6
@ -128,6 +128,7 @@ export interface DialogProps {
|
||||
closeOnClickModal?: boolean;
|
||||
closeOnPressEscape?: boolean;
|
||||
destroyOnClose?: boolean;
|
||||
showClose?: boolean;
|
||||
}
|
||||
|
||||
export interface DividerProps {
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
:close-on-click-modal="closeOnClickModal"
|
||||
:close-on-press-escape="closeOnPressEscape"
|
||||
:destroy-on-close="destroyOnClose"
|
||||
:show-close="showClose"
|
||||
@close="closeHandler"
|
||||
>
|
||||
<div
|
||||
@ -44,7 +45,7 @@
|
||||
</TMagicCol>
|
||||
<TMagicCol :span="12">
|
||||
<slot name="footer">
|
||||
<TMagicButton @click="cancel" size="small">取 消</TMagicButton>
|
||||
<TMagicButton v-if="showCancel" @click="cancel" size="small">取 消</TMagicButton>
|
||||
<TMagicButton v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep"
|
||||
>上一步</TMagicButton
|
||||
>
|
||||
@ -92,6 +93,8 @@ const props = withDefaults(
|
||||
closeOnClickModal?: boolean;
|
||||
closeOnPressEscape?: boolean;
|
||||
destroyOnClose?: boolean;
|
||||
showClose?: boolean;
|
||||
showCancel?: boolean;
|
||||
}>(),
|
||||
{
|
||||
config: () => [],
|
||||
@ -100,6 +103,8 @@ const props = withDefaults(
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
destroyOnClose: false,
|
||||
showClose: true,
|
||||
showCancel: true,
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
:header="title"
|
||||
:width="width"
|
||||
:mode="fullscreen ? 'full-screen' : 'modal'"
|
||||
:close-btn="showClose"
|
||||
:close-on-overlay-click="closeOnClickModal"
|
||||
:close-on-esc-keydown="closeOnPressEscape"
|
||||
:destroy-on-close="destroyOnClose"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user