Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
ae7821e2
Commit
ae7821e2
authored
Jul 13, 2021
by
Vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(modal): ensure that props are passed correctly,fix #897
parent
a1d956d3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
BasicModal.vue
src/components/Modal/src/BasicModal.vue
+3
-3
Modal1.vue
src/views/demo/comp/modal/Modal1.vue
+1
-1
Modal2.vue
src/views/demo/comp/modal/Modal2.vue
+1
-2
AccountDetail.vue
src/views/demo/system/account/AccountDetail.vue
+1
-1
No files found.
CHANGELOG.zh_CN.md
View file @
ae7821e2
...
...
@@ -26,6 +26,7 @@
-
修复菜单默认折叠的配置不起作用的问题
-
修复
`safari`
浏览器报错导致网站打不开
-
修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题
-
**Modal**
确保 props 正确被传递
### 🎫 Chores
...
...
src/components/Modal/src/BasicModal.vue
View file @
ae7821e2
...
...
@@ -18,7 +18,7 @@
</
template
>
<
template
#footer
v-if=
"!$slots.footer"
>
<ModalFooter
v-bind=
"get
Props
"
@
ok=
"handleOk"
@
cancel=
"handleCancel"
>
<ModalFooter
v-bind=
"get
BindValue
"
@
ok=
"handleOk"
@
cancel=
"handleCancel"
>
<template
#[item]=
"data"
v-for=
"item in Object.keys($slots)"
>
<slot
:name=
"item"
v-bind=
"data"
></slot>
</
template
>
...
...
@@ -82,7 +82,7 @@
setup
(
props
,
{
emit
,
attrs
})
{
const
visibleRef
=
ref
(
false
);
const
propsRef
=
ref
<
Partial
<
ModalProps
>
|
null
>
(
null
);
const
modalWrapperRef
=
ref
<
ComponentRef
>
(
null
);
const
modalWrapperRef
=
ref
<
any
>
(
null
);
// modal Bottom and top height
const
extHeightRef
=
ref
(
0
);
...
...
@@ -133,7 +133,7 @@
});
const
getBindValue
=
computed
(():
Recordable
=>
{
const
attr
=
{
...
attrs
,
...
unref
(
get
Props
)
};
const
attr
=
{
...
attrs
,
...
unref
(
get
MergeProps
),
visible
:
unref
(
visibleRef
)
};
if
(
unref
(
fullScreenRef
))
{
return
omit
(
attr
,
'
height
'
);
}
...
...
src/views/demo/comp/modal/Modal1.vue
View file @
ae7821e2
...
...
@@ -8,7 +8,7 @@
@
visible-change=
"handleShow"
>
<template
#insertFooter
>
<a-button
type=
"
danger"
@
click=
"setLines"
:disabled=
"loading"
>
点我更新内容
</a-button>
<a-button
type=
"
primary"
danger
@
click=
"setLines"
:disabled=
"loading"
>
点我更新内容
</a-button>
</
template
>
<
template
v-if=
"loading"
>
<div
class=
"empty-tips"
>
加载中,稍等3秒……
</div>
...
...
src/views/demo/comp/modal/Modal2.vue
View file @
ae7821e2
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"register"
title=
"Modal Title"
:helpMessage=
"['提示1', '提示2']"
:okButtonProps=
"
{ disabled: true }"
>
<a-button
type=
"primary"
@
click=
"closeModal"
class=
"mr-2"
>
从内部关闭弹窗
</a-button>
<a-button
type=
"primary"
@
click=
"setModalProps"
>
从内部修改title
</a-button>
</BasicModal>
</
template
>
...
...
src/views/demo/system/account/AccountDetail.vue
View file @
ae7821e2
...
...
@@ -6,7 +6,7 @@
@
back=
"goBack"
>
<template
#extra
>
<a-button
type=
"
danger"
>
禁用账号
</a-button>
<a-button
type=
"
primary"
danger
>
禁用账号
</a-button>
<a-button
type=
"primary"
>
修改密码
</a-button>
</
template
>
<
template
#footer
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment