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
fed1e7bb
Commit
fed1e7bb
authored
Oct 16, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
e09caa9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
1 deletion
+81
-1
api.js
pages/test/api.js
+6
-1
index.vue
pages/test/example/tree/index.vue
+75
-0
No files found.
pages/test/api.js
View file @
fed1e7bb
...
...
@@ -13,10 +13,15 @@ export const exampleRouter = [
},
{
route
:
'/test/example/table'
,
title
:
'
treeGrid组件
'
,
title
:
'
表格
'
,
name
:
'components-table'
,
icon
:
'md-aperture'
},
{
route
:
'/test/example/tree'
,
title
:
'树'
,
icon
:
'md-aperture'
},
{
route
:
'/test/example/select'
,
title
:
'select组件'
,
...
...
pages/test/example/tree/index.vue
0 → 100644
View file @
fed1e7bb
<
template
>
<div
class=
"tree"
>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
></TreeGrid>
<Input
v-model=
"data"
type=
"textarea"
rows=
"20"
placeholder=
""
></Input>
</div>
</
template
>
<
script
>
import
Mock
from
"mockjs"
;
export
default
{
name
:
""
,
data
()
{
return
{
columns
:
[
{
key
:
"name"
,
title
:
"名称"
,
},
{
key
:
"status"
,
title
:
"状态"
,
width
:
"100"
,
},
{
key
:
"action"
,
title
:
"操作"
,
width
:
"100"
,
},
],
treeData1
:
[],
treeData
:
[
{
action
:
"510000202006085435"
,
name
:
"书加部保处"
,
status
:
0
,
children
:
[
{
action
:
"430000200008054924"
,
name
:
"越组大过越"
,
status
:
0
},
{
action
:
"350000200106195747"
,
name
:
"反走和报山"
,
status
:
1
},
{
action
:
"46000019920810827X"
,
name
:
"强级法量少务持"
,
status
:
1
},
{
action
:
"620000198005286979"
,
name
:
"况题米"
,
status
:
1
},
{
action
:
"440000200901093872"
,
name
:
"又多为"
,
status
:
0
},
],
},
{
action
:
"510000199304272074"
,
name
:
"参什叫"
,
status
:
1
},
{
action
:
"710000199110144186"
,
name
:
"情克应个该农"
,
status
:
1
},
{
action
:
"140000201204175550"
,
name
:
"阶研其交式"
,
status
:
1
},
{
action
:
"500000198710051748"
,
name
:
"议开你集"
,
status
:
1
},
],
data
:
""
,
};
},
mounted
()
{
// this.init();
},
methods
:
{
init
()
{
var
data
=
Mock
.
mock
({
"data|5"
:
[
{
action
:
"@id"
,
name
:
"@ctitle"
,
"status|1"
:
[
0
,
1
],
},
],
});
console
.
warn
(
data
);
this
.
data
=
JSON
.
stringify
(
data
.
data
);
this
.
treeData
=
data
.
data
;
},
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
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