Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
周远喜
mes-ui
Commits
d0c65d4d
Commit
d0c65d4d
authored
Oct 17, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
treetable 完成
parent
fc14e32c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
174 additions
and
67 deletions
+174
-67
columnSolt.js
components/page/treeGrid/columnSolt.js
+2
-1
index.vue
components/page/treeGrid/index.vue
+156
-62
index.vue
pages/test/example/tree/index.vue
+16
-4
No files found.
components/page/treeGrid/columnSolt.js
View file @
d0c65d4d
export
default
{
export
default
{
name
:
'ColumnSlot'
,
name
:
'ColumnSlot'
,
functional
:
true
,
functional
:
true
,
inject
:
[
'slots'
],
props
:
{
props
:
{
row
:
Object
,
row
:
Object
,
index
:
Number
,
index
:
Number
,
...
@@ -10,7 +11,7 @@ export default {
...
@@ -10,7 +11,7 @@ export default {
}
}
},
},
render
:
(
h
,
ctx
)
=>
{
render
:
(
h
,
ctx
)
=>
{
return
h
(
'
div'
,
ctx
.
injections
.
$scopedSlots
[
ctx
.
props
.
column
.
slot
]({
return
h
(
'
span'
,
ctx
.
injections
.
slots
()
[
ctx
.
props
.
column
.
slot
]({
row
:
ctx
.
props
.
row
,
row
:
ctx
.
props
.
row
,
column
:
ctx
.
props
.
column
,
column
:
ctx
.
props
.
column
,
index
:
ctx
.
props
.
index
index
:
ctx
.
props
.
index
...
...
components/page/treeGrid/index.vue
View file @
d0c65d4d
This diff is collapsed.
Click to expand it.
pages/test/example/tree/index.vue
View file @
d0c65d4d
<
template
>
<
template
>
<div
class=
"tree"
>
<div
class=
"tree"
>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
>
<template
slot-scope=
"row"
slot=
"action"
>
<template
slot-scope=
"
{row,column,index}" slot="name">
<strong>
{{
row
.
id
}}
</strong>
<Icon
type=
"md-folder"
/>
{{
row
.
name
}}
</
template
>
<
template
slot-scope=
"{row,column,index}"
slot=
"action"
>
<strong>
{{
row
.
action
}}
</strong>
</
template
>
</
template
>
</TreeGrid>
</TreeGrid>
<!-- <Input v-model="data" type="textarea" rows="20" placeholder=""></Input> -->
<!-- <Input v-model="data" type="textarea" rows="20" placeholder=""></Input> -->
...
@@ -16,20 +19,28 @@ export default {
...
@@ -16,20 +19,28 @@ export default {
data
()
{
data
()
{
return
{
return
{
columns
:
[
columns
:
[
{
type
:
"selection"
,
width
:
50
,
align
:
"center"
},
{
{
key
:
"name"
,
key
:
"name"
,
title
:
"名称"
,
title
:
"名称"
,
tree
:
true
,
slot
:
"name"
},
},
{
{
key
:
"status"
,
key
:
"status"
,
title
:
"状态"
,
title
:
"状态"
,
width
:
"100"
,
width
:
"100"
},
},
{
{
key
:
"action"
,
key
:
"action"
,
title
:
"操作"
,
title
:
"操作"
,
width
:
"100"
,
width
:
"100"
,
solt
:
"action"
sortable
:
true
,
slot
:
"action"
},
},
],
],
treeData1
:
[],
treeData1
:
[],
...
@@ -56,6 +67,7 @@ export default {
...
@@ -56,6 +67,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
// this.init();
// this.init();
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
...
...
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