mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-12-11 18:42:52 +00: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;
|
closeOnClickModal?: boolean;
|
||||||
closeOnPressEscape?: boolean;
|
closeOnPressEscape?: boolean;
|
||||||
destroyOnClose?: boolean;
|
destroyOnClose?: boolean;
|
||||||
|
showClose?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DividerProps {
|
export interface DividerProps {
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
:close-on-click-modal="closeOnClickModal"
|
:close-on-click-modal="closeOnClickModal"
|
||||||
:close-on-press-escape="closeOnPressEscape"
|
:close-on-press-escape="closeOnPressEscape"
|
||||||
:destroy-on-close="destroyOnClose"
|
:destroy-on-close="destroyOnClose"
|
||||||
|
:show-close="showClose"
|
||||||
@close="closeHandler"
|
@close="closeHandler"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -44,7 +45,7 @@
|
|||||||
</TMagicCol>
|
</TMagicCol>
|
||||||
<TMagicCol :span="12">
|
<TMagicCol :span="12">
|
||||||
<slot name="footer">
|
<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 v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep"
|
||||||
>上一步</TMagicButton
|
>上一步</TMagicButton
|
||||||
>
|
>
|
||||||
@ -92,6 +93,8 @@ const props = withDefaults(
|
|||||||
closeOnClickModal?: boolean;
|
closeOnClickModal?: boolean;
|
||||||
closeOnPressEscape?: boolean;
|
closeOnPressEscape?: boolean;
|
||||||
destroyOnClose?: boolean;
|
destroyOnClose?: boolean;
|
||||||
|
showClose?: boolean;
|
||||||
|
showCancel?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
config: () => [],
|
config: () => [],
|
||||||
@ -100,6 +103,8 @@ const props = withDefaults(
|
|||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
closeOnPressEscape: false,
|
closeOnPressEscape: false,
|
||||||
destroyOnClose: false,
|
destroyOnClose: false,
|
||||||
|
showClose: true,
|
||||||
|
showCancel: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
:header="title"
|
:header="title"
|
||||||
:width="width"
|
:width="width"
|
||||||
:mode="fullscreen ? 'full-screen' : 'modal'"
|
:mode="fullscreen ? 'full-screen' : 'modal'"
|
||||||
|
:close-btn="showClose"
|
||||||
:close-on-overlay-click="closeOnClickModal"
|
:close-on-overlay-click="closeOnClickModal"
|
||||||
:close-on-esc-keydown="closeOnPressEscape"
|
:close-on-esc-keydown="closeOnPressEscape"
|
||||||
:destroy-on-close="destroyOnClose"
|
:destroy-on-close="destroyOnClose"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user