Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
tianzhuanghu
ant-design-pro-vue
Commits
c4e48688
Unverified
Commit
c4e48688
authored
Mar 03, 2019
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: table a-swtich checked,record
parent
de613635
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
index.js
src/components/menu/index.js
+0
-1
TableInnerEditList.vue
src/views/list/TableInnerEditList.vue
+4
-0
No files found.
src/components/menu/index.js
View file @
c4e48688
...
...
@@ -79,7 +79,6 @@ export default {
const
subItem
=
[
h
(
'span'
,
{
slot
:
'title'
},
[
this
.
renderIcon
(
h
,
menu
.
meta
.
icon
),
h
(
'span'
,
[
menu
.
meta
.
title
])])]
const
itemArr
=
[]
const
pIndex_
=
pIndex
+
'_'
+
index
console
.
log
(
'menu'
,
menu
)
if
(
!
menu
.
hideChildrenInMenu
)
{
menu
.
children
.
forEach
(
function
(
item
,
i
)
{
itemArr
.
push
(
this2_
.
renderItem
(
h
,
item
,
pIndex_
,
i
))
...
...
src/views/list/TableInnerEditList.vue
View file @
c4e48688
...
...
@@ -95,6 +95,7 @@
</div>
</template>
<
template
slot=
"action"
slot-scope=
"text, record, index"
>
<a-switch
checkedChildren=
"开"
unCheckedChildren=
"关"
@
change=
"(checked) => switchChange(checked, record)"
></a-switch>
<div
class=
"editable-row-operations"
>
<span
v-if=
"record.editable"
>
<a
@
click=
"() => save(record)"
>
保存
</a>
...
...
@@ -220,6 +221,9 @@ export default {
cancel
(
row
)
{
row
.
editable
=
false
},
switchChange
(
checked
,
record
)
{
console
.
log
(
'checked'
,
checked
,
record
)
},
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
...
...
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