parent
5de954baa4
commit
3e6d608a2f
@ -78,7 +78,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
|||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| appendToMain | 是否挂载到内容区域(默认挂载到body) | `boolean` | `false` |
|
| appendToMain | 是否挂载到内容区域(默认挂载到body) | `boolean` | `false` |
|
||||||
| connectedComponent | 连接另一个Modal组件 | `Component` | - |
|
| connectedComponent | 连接另一个Modal组件 | `Component` | - |
|
||||||
| destroyOnClose | 关闭时销毁`connectedComponent` | `boolean` | `false` |
|
| destroyOnClose | 关闭时销毁 | `boolean` | `false` |
|
||||||
| title | 标题 | `string\|slot` | - |
|
| title | 标题 | `string\|slot` | - |
|
||||||
| titleTooltip | 标题提示信息 | `string\|slot` | - |
|
| titleTooltip | 标题提示信息 | `string\|slot` | - |
|
||||||
| description | 描述信息 | `string\|slot` | - |
|
| description | 描述信息 | `string\|slot` | - |
|
||||||
|
@ -35,7 +35,7 @@ interface Props extends DrawerProps {
|
|||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
appendToMain: false,
|
appendToMain: false,
|
||||||
closeIconPlacement: 'right',
|
closeIconPlacement: 'right',
|
||||||
destroyOnClose: true,
|
destroyOnClose: false,
|
||||||
drawerApi: undefined,
|
drawerApi: undefined,
|
||||||
submitting: false,
|
submitting: false,
|
||||||
zIndex: 1000,
|
zIndex: 1000,
|
||||||
|
@ -21,9 +21,7 @@ import VbenDrawer from './drawer.vue';
|
|||||||
|
|
||||||
const USER_DRAWER_INJECT_KEY = Symbol('VBEN_DRAWER_INJECT');
|
const USER_DRAWER_INJECT_KEY = Symbol('VBEN_DRAWER_INJECT');
|
||||||
|
|
||||||
const DEFAULT_DRAWER_PROPS: Partial<DrawerProps> = {
|
const DEFAULT_DRAWER_PROPS: Partial<DrawerProps> = {};
|
||||||
destroyOnClose: true,
|
|
||||||
};
|
|
||||||
|
|
||||||
export function setDefaultDrawerProps(props: Partial<DrawerProps>) {
|
export function setDefaultDrawerProps(props: Partial<DrawerProps>) {
|
||||||
Object.assign(DEFAULT_DRAWER_PROPS, props);
|
Object.assign(DEFAULT_DRAWER_PROPS, props);
|
||||||
|
@ -34,7 +34,7 @@ interface Props extends ModalProps {
|
|||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
appendToMain: false,
|
appendToMain: false,
|
||||||
destroyOnClose: true,
|
destroyOnClose: false,
|
||||||
modalApi: undefined,
|
modalApi: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -17,9 +17,7 @@ import VbenModal from './modal.vue';
|
|||||||
|
|
||||||
const USER_MODAL_INJECT_KEY = Symbol('VBEN_MODAL_INJECT');
|
const USER_MODAL_INJECT_KEY = Symbol('VBEN_MODAL_INJECT');
|
||||||
|
|
||||||
const DEFAULT_MODAL_PROPS: Partial<ModalProps> = {
|
const DEFAULT_MODAL_PROPS: Partial<ModalProps> = {};
|
||||||
destroyOnClose: true,
|
|
||||||
};
|
|
||||||
|
|
||||||
export function setDefaultModalProps(props: Partial<ModalProps>) {
|
export function setDefaultModalProps(props: Partial<ModalProps>) {
|
||||||
Object.assign(DEFAULT_MODAL_PROPS, props);
|
Object.assign(DEFAULT_MODAL_PROPS, props);
|
||||||
|
Loading…
Reference in New Issue
Block a user