Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
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 66fa5eae
authored
Oct 28, 2020
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
弹窗组件
1 parent
b2c3e73d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
16 deletions
src/components/d2-dialog/index.vue
src/components/d2-table/index.vue
src/components/d2-dialog/index.vue
0 → 100644
View file @
66fa5ea
<!-- 弹窗 -->
<
template
>
<div>
<el-dialog
:title=
"title"
:visible
.
sync=
"isVisible"
:before-close=
"handleClose"
:close-on-click-modal=
"false"
:width=
"width"
>
<slot></slot>
<div
slot=
"footer"
>
<slot
name=
"btn-start"
></slot>
<el-button
type=
"primary"
@
click=
"handleConfirm"
:loading=
"$store.state.d2admin.loading.value"
>
{{
btnOkLabel
}}
</el-button>
<slot
name=
"btn-middle"
></slot>
<el-button
v-if=
"!noCancel"
@
click=
"handleClose"
>
取消
</el-button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
'd2-dialog'
,
data
()
{
return
{
}
},
props
:
{
title
:
{
type
:
String
,
default
:
''
},
isVisible
:
{
type
:
Boolean
,
default
:
false
},
btnOkLabel
:
{
type
:
String
,
default
:
'确定'
},
noCancel
:
{
type
:
Boolean
,
default
:
false
},
width
:
{
type
:
String
,
default
:
'580px'
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'closeDialog'
)
},
handleConfirm
()
{
this
.
$emit
(
'confirmDialog'
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/d2-table/index.vue
View file @
66fa5ea
...
@@ -213,22 +213,6 @@ export default {
...
@@ -213,22 +213,6 @@ export default {
}
}
},
},
watch
:
{
// searchForm: {
// handler(val) {
// const attr = Object.keys(val).find(item => val[item] !== this.oldValue[item])
// if (!val[attr] && this.oldValue[attr]) {
// this.getListApi ? this.refreshEmit() : this.$emit('refreshTable', this.page)
// }
// this.oldValue = _.cloneDeep(val)
// },
// deep: true
// },
// 调用其他接口,导致表格刷新-标识
// '$store.state.d2admin.refreshtable.value'(val) {
// (val === 'fresh') && this.refreshEmit()
// }
},
mounted
()
{
mounted
()
{
const
btn
=
document
.
getElementById
(
this
.
tableParams
.
btnId
)
const
btn
=
document
.
getElementById
(
this
.
tableParams
.
btnId
)
btn
&&
btn
.
addEventListener
(
'click'
,
this
.
refreshEmit
)
btn
&&
btn
.
addEventListener
(
'click'
,
this
.
refreshEmit
)
...
...
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