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
HireTest
VueElementTemplate
Commits
22cb0692
Commit
22cb0692
authored
7 years ago
by
杨柠瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codign
parent
44c06920
Changes
2
Show 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 @
22cb0692
...
...
@@ -116,7 +116,7 @@
<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=
"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
>
</el-table-column>
</el-table>
...
...
@@ -133,7 +133,7 @@
<!-- 弹窗 -->
<!-- @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-item
:label=
"dialog.name"
:label-width=
"formLabelWidth"
v-for=
"dialog in dialogForm"
>
<el-input
v-model=
"dialog.value"
disabled
auto-complete=
"off"
></el-input>
...
...
@@ -143,7 +143,7 @@
:columns=
"showUserColumns"
:buttons=
"showUserButtons"
:layout=
"layout"
:tableId=
"tableId"
v-if=
"dialogName != '详情'"
>
:tableId=
"tableId"
v-if=
"dialogName != '详情'"
ref=
"selectfood"
>
</hm-complex-form>
</el-dialog>
...
...
@@ -374,7 +374,8 @@
operationWidth
:
0
,
// 操作栏的宽度
isShowDetail
:
false
,
// 是否显示详情按钮
definedOperate
:
[]
// 自定义操作
definedOperate
:
[],
// 自定义操作
definedOperation
:
[]
}
},
computed
:
{
...
...
@@ -494,6 +495,10 @@
if
(
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
)
{
...
...
@@ -597,10 +602,11 @@
self
.
userDefined
.
definedNew
(
true
)
return
false
}
if
(
type
===
'
newData
'
&&
self
.
userDefined
&&
self
.
userDefined
.
definedDetail
)
{
if
(
type
===
'
detail
'
&&
self
.
userDefined
&&
self
.
userDefined
.
definedDetail
)
{
self
.
userDefined
.
definedDetail
(
true
,
data
)
return
false
}
self
.
tableId
=
''
if
(
type
===
'editData'
)
{
self
.
dialogName
=
'编辑'
self
.
showUserColumns
=
self
.
options
.
editData
.
showUserColumns
...
...
This diff is collapsed.
Click to expand it.
src/views/haomo/components/tables/index.vue
View file @
22cb0692
...
...
@@ -92,9 +92,7 @@
{
type
:
'input'
,
label
:
''
,
placeholder
:
'邮箱'
,
code
:
'email'
,
value
:
''
},
{
type
:
'datetime'
,
label
:
''
,
placeholder
:
'创建时间'
,
code
:
'createTime'
,
value
:
''
}
],
definedOperation
:
{
label
:
'测试'
},
definedOperation
:
[{
label
:
'测试'
,
func
:
this
.
dropDown
}],
definedEdit
()
{
},
...
...
@@ -111,8 +109,8 @@
this
.
dialogFormVisible
=
false
console
.
log
(
'method1'
)
},
dropDown
()
{
console
.
log
(
'输出一些东西'
)
dropDown
(
value
)
{
console
.
log
(
'输出一些东西'
,
value
)
}
}
}
...
...
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