Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
9cc2030c
authored
2022-10-10 12:04:14 +0800
by
liangyifan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
弹窗
1 parent
eb5b05a8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
src/components/tanchuang/index.vue
src/components/tanchuang/index.vue
View file @
9cc2030
...
...
@@ -5,7 +5,7 @@
<div
:style=
"
{'text-align':titleStyle}">
<b
>
{{
title
}}
</b></div>
<i
class=
"el-icon-close"
@
click=
"onCancel"
></i>
<div
class=
"ls-mask-content"
>
<component
:is=
"editItem"
ref=
'childRef'
@
loading=
'loadingFn'
/>
<component
:is=
"editItem"
ref=
'childRef'
@
loading=
'loadingFn'
:formData=
'formData'
/>
</div>
<div
class=
"ls-mask-footer"
>
<el-button
type=
"primary"
@
click=
"onConfirm"
>
{{
confirmText
}}
</el-button>
...
...
@@ -31,6 +31,7 @@
titleStyle
:
''
,
width
:
"75%"
,
height
:
"500px"
,
formData
:
""
,
//父组件传递的参数 负责传给子组件
}
},
props
:{
...
...
@@ -48,8 +49,13 @@
},
onConfirm
()
{
this
.
loading
=
true
this
.
$refs
.
childRef
.
childFn
()
let
isOk
=
this
.
$refs
.
childRef
.
childFn
()
//子组件方法 必须命名一致
if
(
isOk
||
isOk
==
undefined
){
//如果子组件没有 return false 就代表子组件方法一切正常
this
.
isShow
=
false
this
.
confirm
()
}
else
{
//否则
console
.
log
(
'弹窗不关闭'
)
}
},
loadingFn
(
e
){
//加载状态
this
.
loading
=
e
...
...
Please
register
or
sign in
to post a comment