Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xichonght
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
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
zhangdishen
xichonght
Commits
39acbc07
Commit
39acbc07
authored
Aug 12, 2019
by
miaohaoyun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mhy2' into 'master'
Mhy2 See merge request
!26
parents
d5e1c8fb
7aee102d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
8 deletions
+39
-8
KtTable.vue
xichongSys/src/views/Core/KtTable.vue
+39
-8
No files found.
xichongSys/src/views/Core/KtTable.vue
View file @
39acbc07
...
...
@@ -13,12 +13,21 @@
<el-table-column
:label=
"$t('action.operation')"
width=
"185"
fixed=
"right"
v-if=
"showOperation"
header-align=
"center"
align=
"center"
>
<template
slot-scope=
"scope"
>
<kt-button
icon=
"fa fa-edit"
:label=
"$t('action.edit')"
:perms=
"permsEdit"
:size=
"size"
@
click=
"handleEdit(scope.$index, scope.row)"
style=
"float: left"
/>
<div
v-if=
"scope.row.status == 1"
>
<kt-button
icon=
"fa fa-trash"
label=
"禁用"
:perms=
"permsDelete"
:size=
"size"
type=
"danger"
@
click=
"handleDelete(scope.$index, scope.row)"
/>
</div>
<div
v-else
>
<kt-button
icon=
"fa fa-check-circle"
label=
"启用"
:perms=
"permsDelete"
:size=
"size"
type=
"success"
@
click=
"handleDelete(scope.$index, scope.row)"
/>
</div>
<el-switch
class=
"statusSwitch"
style=
"display: block"
v-model=
"scope.row.status==0?true:false"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"启"
inactive-text=
"禁"
@
change=
"handleDelete(scope.$index, scope.row)"
>
</el-switch>
<!--
<div
v-if=
"scope.row.status == 1"
>
-->
<!--
<kt-button
icon=
"fa fa-trash"
label=
"禁用"
:perms=
"permsDelete"
:size=
"size"
type=
"danger"
@
click=
"handleDelete(scope.$index, scope.row)"
/>
-->
<!--
</div>
-->
<!--
<div
v-else
>
-->
<!--
<kt-button
icon=
"fa fa-check-circle"
label=
"启用"
:perms=
"permsDelete"
:size=
"size"
type=
"success"
@
click=
"handleDelete(scope.$index, scope.row)"
/>
-->
<!--
</div>
-->
</
template
>
</el-table-column>
</el-table>
...
...
@@ -94,7 +103,7 @@ export default {
pageSize
:
10
},
loading
:
false
,
// 加载标识
selections
:
[]
// 列表选中列
selections
:
[]
,
// 列表选中列
}
},
methods
:
{
...
...
@@ -165,5 +174,27 @@ export default {
</
script
>
<
style
scoped
>
.statusSwitch
.el-switch__label
{
position
:
absolute
;
display
:
none
;
color
:
#fff
;
}
/*打开时文字位置设置*/
.statusSwitch
.el-switch__label--right
{
z-index
:
2
;
left
:
92px
;
bottom
:
0px
;
color
:
#000
;
}
/*关闭时文字位置设置*/
.statusSwitch
.el-switch__label--left
{
z-index
:
2
;
right
:
22px
;
bottom
:
0px
;
color
:
#fff
;
}
/*显示文字*/
.statusSwitch
.el-switch__label.is-active
{
display
:
block
;
}
</
style
>
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