Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
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
JIRA
JIRA
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
黄瑜
VueElementTemplate
Commits
7ba18986
Commit
7ba18986
authored
Feb 14, 2018
by
高天阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
面板组件
parent
35ae3924
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
13 deletions
+72
-13
HmComplexPanel.vue
src/views/haomo/components/panel/HmComplexPanel.vue
+42
-10
index.vue
src/views/haomo/components/panel/index.vue
+30
-3
No files found.
src/views/haomo/components/panel/HmComplexPanel.vue
View file @
7ba18986
<
template
>
<el-row
type=
"flex"
>
<el-col
:span=
"
24"
class=
"detail-content"
style=
"margin:0 50px;
"
>
<el-col
:span=
"
hmCollapse"
class=
"detail-content"
style=
"margin:0 auto
"
>
<h2
class=
"title"
>
面板页面
</h2>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
这是面板Demo
</span>
<el-card
class=
"box-card"
:style=
"hmStyle"
>
<div
slot=
"header"
class=
"clearfix"
:class=
"hmTitleClass"
>
<span>
{{
hmTitle
}}
</span>
</div>
<div
style=
"height:100px;"
>
<el-form
:data=
"detail"
label-width=
"110px"
status-icon
style=
"width:80%;margin:0 auto"
>
<el-form-item
v-for=
"(column,index) in showColumns"
:key=
"index"
:label=
"column.name"
>
<div>
{{
detail
[
column
.
codeCamel
]
}}
</div>
</el-form-item>
</el-form>
<div
:style=
"hmPanelHeight"
:class=
"hmContentClass"
>
<span>
{{
hmContentText
}}
</span>
<!--
<el-form
:data=
"detail"
label-width=
"110px"
status-icon
style=
"width:80%;margin:0 auto"
>
-->
<!--
<el-form-item
v-for=
"(column,index) in showColumns"
:key=
"index"
:label=
"column.name"
>
-->
<!--
<div>
{{
detail
[
column
.
codeCamel
]
}}
</div>
-->
<!--
</el-form-item>
-->
<!--
</el-form>
-->
</div>
</el-card>
</el-col>
...
...
@@ -69,6 +70,34 @@
userId
:
{
type
:
null
,
required
:
true
},
hmTitle
:
{
type
:
null
,
required
:
false
},
hmTitleClass
:
{
type
:
null
,
required
:
false
},
hmContentClass
:
{
type
:
null
,
required
:
false
},
hmContentText
:
{
type
:
null
,
required
:
false
},
hmStyle
:
{
type
:
Object
,
required
:
false
},
hmPanelHeight
:
{
type
:
Object
,
required
:
false
},
hmCollapse
:
{
type
:
null
,
required
:
false
}
},
data
()
{
...
...
@@ -157,4 +186,7 @@
.title
{
text-align
:
center
;
}
.center
{
text-align
:
center
;
}
</
style
>
src/views/haomo/components/panel/index.vue
View file @
7ba18986
<
template
>
<div>
<hm-complex-panel
:schema=
"schema['HmUser']"
:userId=
"userId"
>
<hm-complex-panel
:schema=
"schema['HmUser']"
:userId=
"userId"
:hmTitle=
"hmTitle"
:hmTitleClass=
"hmTitleClass"
:hmContentText=
"hmContentText"
:hmStyle=
"hmStyle"
:hmPanelHeight=
"hmPanelHeight"
:hmCollapse=
"collapses"
>
</hm-complex-panel>
<hm-complex-panel
:schema=
"schema['HmUser']"
:userId=
"userId"
:columns=
"showUserColumns"
>
<hm-complex-panel
:schema=
"schema['HmUser']"
:userId=
"userId"
:hmTitle=
"titleBak"
:hmContentClass=
"hmContentClass"
:showFields=
"showFields"
:hmContentText=
"hmContentTextBak"
:hmStyle=
"styleBak"
:hmPanelHeight=
"panelHeightBak"
:hmCollapse=
"collapseBak"
>
</hm-complex-panel>
</div>
</
template
>
...
...
@@ -21,7 +23,7 @@
},
data
()
{
return
{
show
UserColumns
:
[
'mobile'
,
'loginid
'
]
show
Fields
:
[
'username'
,
'loginid'
,
'password'
,
'mobile'
,
'email
'
]
}
},
computed
:
{
...
...
@@ -31,6 +33,31 @@
created
()
{
this
.
schema
=
schema
this
.
userId
=
'0e26566e953449a7a7500c34be39fd26'
this
.
hmTitle
=
'面版名称'
this
.
hmTitleClass
=
'center'
this
.
hmContentClass
=
'center'
this
.
hmContentText
=
'面板文字'
this
.
hmStyle
=
{
width
:
'50%'
,
background
:
'#42b983'
,
margin
:
'0 auto'
}
this
.
hmPanelHeight
=
{
height
:
'100px'
}
this
.
collapses
=
12
this
.
showFields
=
[
'username'
,
'loginid'
,
'password'
,
'mobile'
,
'email'
]
this
.
titleBak
=
'测试面板'
this
.
hmContentTextBak
=
'我测试一下'
this
.
styleBak
=
{
width
:
'100%'
,
background
:
'#f56c6c'
,
marginBottom
:
'20px'
}
this
.
panelHeightBak
=
{
height
:
'200px'
}
this
.
collapseBak
=
22
},
methods
:
{}
}
...
...
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