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
1b449bb5
Commit
1b449bb5
authored
Mar 29, 2018
by
王康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 115.28.80.125:softwarefactory/vueelementtemplate
parents
8e4a50d1
22cb0692
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
HmComplexTable.vue
src/views/haomo/components/tables/HmComplexTable.vue
+11
-5
index.vue
src/views/haomo/components/tables/index.vue
+3
-5
No files found.
src/views/haomo/components/tables/HmComplexTable.vue
View file @
1b449bb5
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
<el-button
@
click=
"openDialog('editData',scope.row)"
v-if=
"isShowEditDataButton"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"openDialog('editData',scope.row)"
v-if=
"isShowEditDataButton"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"deleteData(scope.row)"
type=
"text"
v-if=
"isShowDeleteButton"
size=
"small"
>
删除
</el-button>
<el-button
@
click=
"deleteData(scope.row)"
type=
"text"
v-if=
"isShowDeleteButton"
size=
"small"
>
删除
</el-button>
<el-button
@
click=
"openDialog('detail',scope.row)"
type=
"text"
v-if=
"isShowDetail"
size=
"small"
>
详情
</el-button>
<el-button
@
click=
"openDialog('detail',scope.row)"
type=
"text"
v-if=
"isShowDetail"
size=
"small"
>
详情
</el-button>
<el-button
@
click=
"ope
nDialog('detail',scope.row)"
type=
"text"
v-if=
"isShowDetail"
size=
"small"
>
</el-button>
<el-button
@
click=
"ope
ration.func(scope.row)"
type=
"text"
v-if=
"definedOperation.length"
size=
"small"
v-for=
"operation in definedOperation"
>
{{
operation
.
label
}}
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
<!-- 弹窗 -->
<!-- 弹窗 -->
<!-- @TODO 补充详情弹窗 -->
<!-- @TODO 补充详情弹窗 -->
<el-dialog
:title=
"dialogName"
:visible
.
sync=
"dialogFormVisible"
:close-on-click-modal=
"closeOnClickModal"
width=
"dialogWidth"
>
<el-dialog
:title=
"dialogName"
:visible
.
sync=
"dialogFormVisible"
:close-on-click-modal=
"closeOnClickModal"
width=
"dialogWidth"
v-if=
"dialogFormVisible"
>
<el-form
v-if=
"dialogName == '详情'"
>
<el-form
v-if=
"dialogName == '详情'"
>
<el-form-item
:label=
"dialog.name"
:label-width=
"formLabelWidth"
v-for=
"dialog in dialogForm"
>
<el-form-item
:label=
"dialog.name"
:label-width=
"formLabelWidth"
v-for=
"dialog in dialogForm"
>
<el-input
v-model=
"dialog.value"
disabled
auto-complete=
"off"
></el-input>
<el-input
v-model=
"dialog.value"
disabled
auto-complete=
"off"
></el-input>
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
:columns=
"showUserColumns"
:columns=
"showUserColumns"
:buttons=
"showUserButtons"
:buttons=
"showUserButtons"
:layout=
"layout"
:layout=
"layout"
:tableId=
"tableId"
v-if=
"dialogName != '详情'"
>
:tableId=
"tableId"
v-if=
"dialogName != '详情'"
ref=
"selectfood"
>
</hm-complex-form>
</hm-complex-form>
</el-dialog>
</el-dialog>
...
@@ -374,7 +374,8 @@
...
@@ -374,7 +374,8 @@
operationWidth
:
0
,
// 操作栏的宽度
operationWidth
:
0
,
// 操作栏的宽度
isShowDetail
:
false
,
// 是否显示详情按钮
isShowDetail
:
false
,
// 是否显示详情按钮
definedOperate
:
[]
// 自定义操作
definedOperate
:
[],
// 自定义操作
definedOperation
:
[]
}
}
},
},
computed
:
{
computed
:
{
...
@@ -494,6 +495,10 @@
...
@@ -494,6 +495,10 @@
if
(
self
.
userDefined
.
definedOperate
)
{
if
(
self
.
userDefined
.
definedOperate
)
{
self
.
definedOperate
=
self
.
userDefined
.
definedOperate
self
.
definedOperate
=
self
.
userDefined
.
definedOperate
}
}
if
(
self
.
userDefined
.
definedOperation
)
{
self
.
operationWidth
+=
50
*
self
.
userDefined
.
definedOperation
.
length
self
.
definedOperation
=
self
.
userDefined
.
definedOperation
}
},
},
// 排序
// 排序
sortChange
(
row
)
{
sortChange
(
row
)
{
...
@@ -597,10 +602,11 @@
...
@@ -597,10 +602,11 @@
self
.
userDefined
.
definedNew
(
true
)
self
.
userDefined
.
definedNew
(
true
)
return
false
return
false
}
}
if
(
type
===
'
newData
'
&&
self
.
userDefined
&&
self
.
userDefined
.
definedDetail
)
{
if
(
type
===
'
detail
'
&&
self
.
userDefined
&&
self
.
userDefined
.
definedDetail
)
{
self
.
userDefined
.
definedDetail
(
true
,
data
)
self
.
userDefined
.
definedDetail
(
true
,
data
)
return
false
return
false
}
}
self
.
tableId
=
''
if
(
type
===
'editData'
)
{
if
(
type
===
'editData'
)
{
self
.
dialogName
=
'编辑'
self
.
dialogName
=
'编辑'
self
.
showUserColumns
=
self
.
options
.
editData
.
showUserColumns
self
.
showUserColumns
=
self
.
options
.
editData
.
showUserColumns
...
...
src/views/haomo/components/tables/index.vue
View file @
1b449bb5
...
@@ -92,9 +92,7 @@
...
@@ -92,9 +92,7 @@
{
type
:
'input'
,
label
:
''
,
placeholder
:
'邮箱'
,
code
:
'email'
,
value
:
''
},
{
type
:
'input'
,
label
:
''
,
placeholder
:
'邮箱'
,
code
:
'email'
,
value
:
''
},
{
type
:
'datetime'
,
label
:
''
,
placeholder
:
'创建时间'
,
code
:
'createTime'
,
value
:
''
}
{
type
:
'datetime'
,
label
:
''
,
placeholder
:
'创建时间'
,
code
:
'createTime'
,
value
:
''
}
],
],
definedOperation
:
{
definedOperation
:
[{
label
:
'测试'
,
func
:
this
.
dropDown
}],
label
:
'测试'
},
definedEdit
()
{
definedEdit
()
{
},
},
...
@@ -111,8 +109,8 @@
...
@@ -111,8 +109,8 @@
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
console
.
log
(
'method1'
)
console
.
log
(
'method1'
)
},
},
dropDown
()
{
dropDown
(
value
)
{
console
.
log
(
'输出一些东西'
)
console
.
log
(
'输出一些东西'
,
value
)
}
}
}
}
}
}
...
...
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