Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zuiqiangwanggong
vue-vben-admin
提交
5d554f18
V
vue-vben-admin
项目概览
zuiqiangwanggong
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5d554f18
编写于
6月 03, 2021
作者:
无
无木
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(modal): redoModalHeight not work as expected
修复redoModalHeight根据内容重设高度时,只会增大而不能减少Modal高度的问题
上级
f732b569
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
27 addition
and
15 deletion
+27
-15
src/components/Modal/src/components/ModalWrapper.vue
src/components/Modal/src/components/ModalWrapper.vue
+7
-9
src/views/demo/comp/modal/Modal1.vue
src/views/demo/comp/modal/Modal1.vue
+20
-6
未找到文件。
src/components/Modal/src/components/ModalWrapper.vue
浏览文件 @
5d554f18
...
@@ -60,15 +60,13 @@
...
@@ -60,15 +60,13 @@
redoModalHeight
:
setModalHeight
,
redoModalHeight
:
setModalHeight
,
});
});
const
spinStyle
=
computed
(
const
spinStyle
=
computed
(():
CSSProperties
=>
{
():
CSSProperties
=>
{
return
{
return
{
minHeight
:
`
${
props
.
minHeight
}
px`
,
minHeight
:
`
${
props
.
minHeight
}
px`
,
// padding 28
// padding 28
h
eight
:
`
${
unref
(
realHeightRef
)}
px`
,
maxH
eight
:
`
${
unref
(
realHeightRef
)}
px`
,
};
};
}
});
);
watchEffect
(()
=>
{
watchEffect
(()
=>
{
props
.
useWrapper
&&
setModalHeight
();
props
.
useWrapper
&&
setModalHeight
();
...
...
src/views/demo/comp/modal/Modal1.vue
浏览文件 @
5d554f18
...
@@ -7,6 +7,9 @@
...
@@ -7,6 +7,9 @@
:helpMessage=
"['提示1', '提示2']"
:helpMessage=
"['提示1', '提示2']"
@
visible-change=
"handleShow"
@
visible-change=
"handleShow"
>
>
<template
#insertFooter
>
<a-button
type=
"danger"
@
click=
"setLines"
:disabled=
"loading"
>
点我更新内容
</a-button>
</
template
>
<
template
v-if=
"loading"
>
<
template
v-if=
"loading"
>
<div
class=
"empty-tips"
>
加载中,稍等3秒……
</div>
<div
class=
"empty-tips"
>
加载中,稍等3秒……
</div>
</
template
>
</
template
>
...
@@ -18,7 +21,7 @@
...
@@ -18,7 +21,7 @@
</BasicModal>
</BasicModal>
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
}
from
'
vue
'
;
import
{
defineComponent
,
ref
,
watch
}
from
'
vue
'
;
import
{
BasicModal
,
useModalInner
}
from
'
/@/components/Modal
'
;
import
{
BasicModal
,
useModalInner
}
from
'
/@/components/Modal
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
BasicModal
},
components
:
{
BasicModal
},
...
@@ -26,19 +29,30 @@
...
@@ -26,19 +29,30 @@
const
loading
=
ref
(
true
);
const
loading
=
ref
(
true
);
const
lines
=
ref
(
10
);
const
lines
=
ref
(
10
);
const
[
register
,
{
setModalProps
,
redoModalHeight
}]
=
useModalInner
();
const
[
register
,
{
setModalProps
,
redoModalHeight
}]
=
useModalInner
();
watch
(
()
=>
lines
.
value
,
()
=>
{
redoModalHeight
();
}
);
function
handleShow
(
visible
:
boolean
)
{
function
handleShow
(
visible
:
boolean
)
{
if
(
visible
)
{
if
(
visible
)
{
loading
.
value
=
true
;
loading
.
value
=
true
;
setModalProps
({
loading
:
true
});
setModalProps
({
loading
:
true
,
confirmLoading
:
true
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
lines
.
value
=
Math
.
round
(
Math
.
random
()
*
20
+
10
);
lines
.
value
=
Math
.
round
(
Math
.
random
()
*
30
+
5
);
loading
.
value
=
false
;
loading
.
value
=
false
;
setModalProps
({
loading
:
false
});
setModalProps
({
loading
:
false
,
confirmLoading
:
false
});
redoModalHeight
();
},
3000
);
},
3000
);
}
}
}
}
return
{
register
,
loading
,
handleShow
,
lines
};
function
setLines
()
{
lines
.
value
=
Math
.
round
(
Math
.
random
()
*
20
+
10
);
}
return
{
register
,
loading
,
handleShow
,
lines
,
setLines
};
},
},
});
});
</
script
>
</
script
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录