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
1a22d103
Commit
1a22d103
authored
7 years ago
by
高天阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
面板文档
parent
d26ead50
master
storybook
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
469 additions
and
27 deletions
+469
-27
HmComplexPanel.md
src/views/haomo/components/panel/HmComplexPanel.md
+434
-0
HmComplexPanel.vue
src/views/haomo/components/panel/HmComplexPanel.vue
+28
-23
index.vue
src/views/haomo/components/panel/index.vue
+5
-3
styleguide.config.js
styleguide.config.js
+2
-1
No files found.
src/views/haomo/components/panel/HmComplexPanel.md
View file @
1a22d103
This diff is collapsed.
Click to expand it.
src/views/haomo/components/panel/HmComplexPanel.vue
View file @
1a22d103
...
...
@@ -8,8 +8,7 @@
</div>
<div
:style=
"hmPanelHeight"
:class=
"hmContentClass"
>
<span>
{{
hmContentText
}}
</span>
<hm-complex-detail
:schema=
"schema['HmUser']"
:tableId=
"userId"
:columns=
"showFields"
>
</hm-complex-detail>
<slot></slot>
</div>
</el-card>
</el-col>
...
...
@@ -17,19 +16,15 @@
</
template
>
<
script
>
import
HmComplexDetail
from
'../details/HmComplexDetail.vue'
import
schema
from
'../../schemas/hm_org_schema'
import
_
from
'lodash'
import
request
from
'@/utils/request'
export
default
{
name
:
'HmComplex
Detai
l'
,
name
:
'HmComplex
Pane
l'
,
// 继承其他组件
extends
:
{},
// 使用其它组件
components
:
{
'hm-complex-detail'
:
HmComplexDetail
},
components
:
{},
props
:
{
/**
* 组件所使用的表定义schema。表定义schema,请使用 model2codejs 从pdm文件生成schema。
...
...
@@ -65,39 +60,53 @@
return
true
}
},
/*
* 在详情页需要传入用户的id用来带出用户信息
* */
userId
:
{
type
:
String
,
required
:
true
},
/**
* 在面板页传入面板标题
*/
hmTitle
:
{
type
:
String
,
required
:
false
},
/**
* 在面板页传入标题类名
*/
hmTitleClass
:
{
type
:
String
,
required
:
false
},
/**
* 在面板页传入内容类名
*/
hmContentClass
:
{
type
:
String
,
required
:
false
},
/**
* 在面板页传入内容
*/
hmContentText
:
{
type
:
String
,
required
:
false
},
/**
* 在面板页传入面板样式
*/
hmStyle
:
{
type
:
Object
,
required
:
false
},
/**
* 在面板页传入面板内容高度
*/
hmPanelHeight
:
{
type
:
Object
,
required
:
false
},
/**
* 在面板页传入面板宽度
*/
hmCollapse
:
{
type
:
null
,
type
:
String
,
required
:
false
},
showFields
:
{
...
...
@@ -116,11 +125,7 @@
},
filters
:
{
},
created
()
{
this
.
schema
=
schema
this
.
getList
()
this
.
init
()
},
created
()
{},
methods
:
{
validate
()
{
const
self
=
this
...
...
@@ -189,8 +194,8 @@
}
</
script
>
<
style
scoped
>
.
title
{
text-align
:
center
;
.
weight
{
font-weight
:
700
;
}
.center
{
text-align
:
center
;
...
...
This diff is collapsed.
Click to expand it.
src/views/haomo/components/panel/index.vue
View file @
1a22d103
<
template
>
<div>
<hm-complex-panel
:schema=
"schema['HmUser']"
:
userId=
"userId"
:hmTitle=
"titleBak"
:hmContentClass=
"hmContentClass"
:showFields=
"showField
s"
<hm-complex-panel
:schema=
"schema['HmUser']"
:
hmTitle=
"titleBak"
:hmContentClass=
"hmContentClas
s"
:hmStyle=
"styleBak"
:hmPanelHeight=
"panelHeightBak"
:hmCollapse=
"collapseBak"
>
</hm-complex-panel>
<hm-complex-panel
:schema=
"schema['HmUser']"
:
userId=
"userId2"
:hmTitle=
"hmTitle"
:hmTitleClass=
"hmTitleClass"
:showFields=
"showFields2
"
<hm-complex-panel
:schema=
"schema['HmUser']"
:
hmTitle=
"hmTitle"
:hmTitleClass=
"hmTitleClass
"
:hmContentText=
"hmContentText"
:hmStyle=
"hmStyle"
:hmPanelHeight=
"hmPanelHeight"
:hmCollapse=
"collapses"
>
</hm-complex-panel>
</div>
...
...
@@ -12,6 +12,7 @@
<
script
>
import
HmComplexPanel
from
'./HmComplexPanel.vue'
import
schema
from
'../../schemas/hm_org_schema'
import
HmComplexDetail
from
'../details/HmComplexDetail.vue'
export
default
{
name
:
'HmComplexPanel'
,
...
...
@@ -19,7 +20,8 @@
extends
:
{},
// 使用其它组件
components
:
{
'hm-complex-panel'
:
HmComplexPanel
'hm-complex-panel'
:
HmComplexPanel
,
'hm-complex-detail'
:
HmComplexDetail
},
data
()
{
return
{
...
...
This diff is collapsed.
Click to expand it.
styleguide.config.js
View file @
1a22d103
...
...
@@ -28,7 +28,8 @@ const sections = [
return
[
'./src/views/haomo/components/tables/HmComplexTable.vue'
,
'./src/views/haomo/components/forms/HmComplexForm.vue'
,
'./src/views/haomo/components/details/HmComplexDetail.vue'
'./src/views/haomo/components/details/HmComplexDetail.vue'
,
'./src/views/haomo/components/panel/HmComplexPanel.vue'
]
}
},
...
...
This diff is collapsed.
Click to expand it.
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