Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3e6d608a
authored
May 01, 2025
by
Netfan
Committed by
GitHub
May 01, 2025
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: destroyOnClose incorrect default value, fixed #6092 (#6093)
1 parent
5de954ba
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
9 deletions
docs/src/components/common-ui/vben-drawer.md
packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue
packages/@core/ui-kit/popup-ui/src/drawer/use-drawer.ts
packages/@core/ui-kit/popup-ui/src/modal/modal.vue
packages/@core/ui-kit/popup-ui/src/modal/use-modal.ts
docs/src/components/common-ui/vben-drawer.md
View file @
3e6d608
...
@@ -78,7 +78,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
...
@@ -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`
| - |
...
...
packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue
View file @
3e6d608
...
@@ -35,7 +35,7 @@ interface Props extends DrawerProps {
...
@@ -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
:
tru
e
,
destroyOnClose
:
fals
e
,
drawerApi
:
undefined
,
drawerApi
:
undefined
,
submitting
:
false
,
submitting
:
false
,
zIndex
:
1000
,
zIndex
:
1000
,
...
...
packages/@core/ui-kit/popup-ui/src/drawer/use-drawer.ts
View file @
3e6d608
...
@@ -21,9 +21,7 @@ import VbenDrawer from './drawer.vue';
...
@@ -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
);
...
...
packages/@core/ui-kit/popup-ui/src/modal/modal.vue
View file @
3e6d608
...
@@ -34,7 +34,7 @@ interface Props extends ModalProps {
...
@@ -34,7 +34,7 @@ interface Props extends ModalProps {
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
appendToMain
:
false
,
appendToMain
:
false
,
destroyOnClose
:
tru
e
,
destroyOnClose
:
fals
e
,
modalApi
:
undefined
,
modalApi
:
undefined
,
});
});
...
...
packages/@core/ui-kit/popup-ui/src/modal/use-modal.ts
View file @
3e6d608
...
@@ -17,9 +17,7 @@ import VbenModal from './modal.vue';
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment