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
fc14e32c
Commit
fc14e32c
authored
Oct 16, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
fed1e7bb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
10 deletions
+62
-10
columnSolt.js
components/page/treeGrid/columnSolt.js
+19
-0
index.vue
components/page/treeGrid/index.vue
+9
-2
index.vue
components/treeGrid/index.vue
+0
-0
slot.js
components/treeGrid/slot.js
+20
-0
test.vue
pages/test.vue
+6
-6
api.js
pages/test/api.js
+1
-0
index.vue
pages/test/example/tree/index.vue
+7
-2
No files found.
components/page/treeGrid/columnSolt.js
0 → 100644
View file @
fc14e32c
export
default
{
name
:
'ColumnSlot'
,
functional
:
true
,
props
:
{
row
:
Object
,
index
:
Number
,
column
:
{
type
:
Object
,
default
:
null
}
},
render
:
(
h
,
ctx
)
=>
{
return
h
(
'div'
,
ctx
.
injections
.
$scopedSlots
[
ctx
.
props
.
column
.
slot
]({
row
:
ctx
.
props
.
row
,
column
:
ctx
.
props
.
column
,
index
:
ctx
.
props
.
index
}));
}
};
\ No newline at end of file
components/page/treeGrid/index.vue
View file @
fc14e32c
...
...
@@ -122,12 +122,18 @@
{{
renderBody
(
item
,
column
)
}}
</label>
<table-expand
v-if=
"column.render&&!column.type"
v-if=
"column.render&&!column.type
&&!column.solt
"
:row=
"item"
:column=
"column"
:index=
"snum"
:render=
"column.render"
></table-expand>
<!--
<column-slot
v-if=
"column.slot"
:row=
"item"
:column=
"column"
:index=
"snum"
></column-slot>
-->
{{
column
.
solt
}}
<slot
v-if=
"column.solt"
v-bind:=
"item"
>
fsafd
</slot>
</td>
</tr>
</tbody>
...
...
@@ -136,9 +142,10 @@
</
template
>
<
script
>
import
TableExpand
from
"./expand"
;
import
ColumnSlot
from
"./columnSolt"
export
default
{
name
:
"treeGrid"
,
components
:
{
TableExpand
},
components
:
{
TableExpand
,
ColumnSlot
},
props
:
{
columns
:
Array
,
items
:
{
...
...
components/treeGrid.vue
→
components/treeGrid
/index
.vue
View file @
fc14e32c
File moved
components/treeGrid/slot.js
0 → 100644
View file @
fc14e32c
export
default
{
name
:
'TableSlot'
,
functional
:
true
,
inject
:
[
'tableRoot'
],
props
:
{
row
:
Object
,
index
:
Number
,
column
:
{
type
:
Object
,
default
:
null
}
},
render
:
(
h
,
ctx
)
=>
{
return
h
(
'div'
,
ctx
.
injections
.
tableRoot
.
$scopedSlots
[
ctx
.
props
.
column
.
slot
]({
row
:
ctx
.
props
.
row
,
column
:
ctx
.
props
.
column
,
index
:
ctx
.
props
.
index
}));
}
};
\ No newline at end of file
pages/test.vue
View file @
fc14e32c
...
...
@@ -17,13 +17,13 @@
<
template
>
<div
class=
"flex fd test_layout"
>
<div>
<Menu
mode=
"horizontal"
theme=
"light"
active-name=
"0"
>
<Menu
mode=
"horizontal"
theme=
"light"
active-name=
"
a
0"
>
<div
class=
"layout-assistant"
>
<MenuItem
name=
"0"
to=
"/test/example"
>
基础组件
</MenuItem>
<MenuItem
name=
"1"
to=
"/test/user"
>
人员选择
</MenuItem>
<MenuItem
name=
"2"
to=
"/test/com"
>
异步组件
</MenuItem>
<MenuItem
name=
"4"
to=
"/test/resource"
>
资源选择
</MenuItem>
<MenuItem
name=
"3"
to=
"/test/view"
>
详情拖拽排版
</MenuItem>
<MenuItem
name=
"
a
0"
to=
"/test/example"
>
基础组件
</MenuItem>
<MenuItem
name=
"
a
1"
to=
"/test/user"
>
人员选择
</MenuItem>
<MenuItem
name=
"
a
2"
to=
"/test/com"
>
异步组件
</MenuItem>
<MenuItem
name=
"
a
4"
to=
"/test/resource"
>
资源选择
</MenuItem>
<MenuItem
name=
"
a
3"
to=
"/test/view"
>
详情拖拽排版
</MenuItem>
</div>
</Menu>
</div>
...
...
pages/test/api.js
View file @
fc14e32c
...
...
@@ -20,6 +20,7 @@ export const exampleRouter = [
{
route
:
'/test/example/tree'
,
title
:
'树'
,
name
:
'tree'
,
icon
:
'md-aperture'
},
{
...
...
pages/test/example/tree/index.vue
View file @
fc14e32c
<
template
>
<div
class=
"tree"
>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
></TreeGrid>
<Input
v-model=
"data"
type=
"textarea"
rows=
"20"
placeholder=
""
></Input>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
>
<template
slot-scope=
"row"
slot=
"action"
>
<strong>
{{
row
.
id
}}
</strong>
</
template
>
</TreeGrid>
<!-- <Input v-model="data" type="textarea" rows="20" placeholder=""></Input> -->
</div>
</template>
...
...
@@ -25,6 +29,7 @@ export default {
key
:
"action"
,
title
:
"操作"
,
width
:
"100"
,
solt
:
"action"
},
],
treeData1
:
[],
...
...
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