Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
ae7821e2
提交
ae7821e2
authored
7月 13, 2021
作者:
Vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(modal): ensure that props are passed correctly,fix #897
上级
a1d956d3
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
7 行增加
和
7 行删除
+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
没有找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
ae7821e2
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
-
修复菜单默认折叠的配置不起作用的问题
-
修复菜单默认折叠的配置不起作用的问题
-
修复
`safari`
浏览器报错导致网站打不开
-
修复
`safari`
浏览器报错导致网站打不开
-
修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题
-
修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题
-
**Modal**
确保 props 正确被传递
### 🎫 Chores
### 🎫 Chores
...
...
src/components/Modal/src/BasicModal.vue
浏览文件 @
ae7821e2
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</
template
>
</
template
>
<
template
#
footer
v-if=
"!$slots.footer"
>
<
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)"
>
<template
#[
item
]="
data
"
v-for=
"item in Object.keys($slots)"
>
<slot
:name=
"item"
v-bind=
"data"
></slot>
<slot
:name=
"item"
v-bind=
"data"
></slot>
</
template
>
</
template
>
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
setup
(
props
,
{
emit
,
attrs
})
{
setup
(
props
,
{
emit
,
attrs
})
{
const
visibleRef
=
ref
(
false
);
const
visibleRef
=
ref
(
false
);
const
propsRef
=
ref
<
Partial
<
ModalProps
>
|
null
>
(
null
);
const
propsRef
=
ref
<
Partial
<
ModalProps
>
|
null
>
(
null
);
const
modalWrapperRef
=
ref
<
ComponentRef
>
(
null
);
const
modalWrapperRef
=
ref
<
any
>
(
null
);
// modal Bottom and top height
// modal Bottom and top height
const
extHeightRef
=
ref
(
0
);
const
extHeightRef
=
ref
(
0
);
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
});
});
const
getBindValue
=
computed
(():
Recordable
=>
{
const
getBindValue
=
computed
(():
Recordable
=>
{
const
attr
=
{
...
attrs
,
...
unref
(
get
Props
)
};
const
attr
=
{
...
attrs
,
...
unref
(
get
MergeProps
),
visible
:
unref
(
visibleRef
)
};
if
(
unref
(
fullScreenRef
))
{
if
(
unref
(
fullScreenRef
))
{
return
omit
(
attr
,
'height'
);
return
omit
(
attr
,
'height'
);
}
}
...
...
src/views/demo/comp/modal/Modal1.vue
浏览文件 @
ae7821e2
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
@
visible-change=
"handleShow"
@
visible-change=
"handleShow"
>
>
<template
#
insertFooter
>
<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
>
<
template
v-if=
"loading"
>
<
template
v-if=
"loading"
>
<div
class=
"empty-tips"
>
加载中,稍等3秒……
</div>
<div
class=
"empty-tips"
>
加载中,稍等3秒……
</div>
...
...
src/views/demo/comp/modal/Modal2.vue
浏览文件 @
ae7821e2
<
template
>
<
template
>
<BasicModal
<BasicModal
v-bind=
"$attrs"
@
register=
"register"
@
register=
"register"
title=
"Modal Title"
title=
"Modal Title"
:helpMessage=
"['提示1', '提示2']"
:helpMessage=
"['提示1', '提示2']"
:okButtonProps=
"
{ disabled: true }"
>
>
<a-button
type=
"primary"
@
click=
"closeModal"
class=
"mr-2"
>
从内部关闭弹窗
</a-button>
<a-button
type=
"primary"
@
click=
"closeModal"
class=
"mr-2"
>
从内部关闭弹窗
</a-button>
<a-button
type=
"primary"
@
click=
"setModalProps"
>
从内部修改title
</a-button>
<a-button
type=
"primary"
@
click=
"setModalProps"
>
从内部修改title
</a-button>
</BasicModal>
</BasicModal>
</
template
>
</
template
>
...
...
src/views/demo/system/account/AccountDetail.vue
浏览文件 @
ae7821e2
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
@
back=
"goBack"
@
back=
"goBack"
>
>
<template
#
extra
>
<template
#
extra
>
<a-button
type=
"
danger"
>
禁用账号
</a-button>
<a-button
type=
"
primary"
danger
>
禁用账号
</a-button>
<a-button
type=
"primary"
>
修改密码
</a-button>
<a-button
type=
"primary"
>
修改密码
</a-button>
</
template
>
</
template
>
<
template
#
footer
>
<
template
#
footer
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论