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
01d5922d
Commit
01d5922d
authored
7 years ago
by
杨柠瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding
parent
8c8caa4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
HmComplexTable.vue
src/views/haomo/components/tables/HmComplexTable.vue
+15
-4
index.vue
src/views/haomo/components/tables/index.vue
+3
-0
No files found.
src/views/haomo/components/tables/HmComplexTable.vue
View file @
01d5922d
...
...
@@ -327,7 +327,7 @@
required
:
false
},
/**
* 自定义表格选项,包括:definedParams、definedOperate、完整的示例为:
* 自定义表格选项,包括:definedParams、definedOperate、
definedOperation、definedEdit、definedNew、definedDetail、BatchRemove、pretreatment
完整的示例为:
* {
* definedParams(params, operate){return params} // 自定义查询数据时的Params
* definedOperate: [ // 自定义table顶部的操作,如果要根据下拉选择、输入框、时间选择器的值查询,需在自定义definedParams()方法中添加
...
...
@@ -336,6 +336,12 @@
* { type: 'datetime', label:'', placeholder: '', code:'', value:''}, // 自定义时间选择器
* { type: 'button', label:'', icon:'', func: this.dropDown}] // 自定义按钮
* }
* definedOperation: [] // 自定义操作
* definedEdit(){} // 自定义操作中编辑
* definedNew(){} // 自定义新建
* definedDetail(){} // 自定义操作中详情
* BatchRemove(){} // 自定义批量删除
* pretreatment(){} // table组件init()前操作
*/
userDefined
:
{
type
:
Object
,
...
...
@@ -425,9 +431,10 @@
// this.validate()
const
self
=
this
if
(
this
.
userDefined
&&
this
.
userDefined
.
pretreatment
)
{
self
.
userDefined
.
pretreatment
().
then
(
function
()
{})
self
.
init
()
self
.
getList
()
self
.
userDefined
.
pretreatment
().
then
(
function
()
{
self
.
init
()
self
.
getList
()
})
console
.
log
(
'IS-[object Promise]'
)
}
else
{
self
.
init
()
...
...
@@ -726,6 +733,10 @@
const
self
=
this
const
datas
=
{
ids
:
[]
}
if
(
!
self
.
multipleSelection
)
return
false
if
(
self
.
userDefined
.
BatchRemove
)
{
self
.
userDefined
.
BatchRemove
(
self
.
multipleSelection
)
return
false
}
_
.
each
(
self
.
multipleSelection
,
function
(
item
,
index
)
{
datas
.
ids
.
push
(
item
.
id
)
})
...
...
This diff is collapsed.
Click to expand it.
src/views/haomo/components/tables/index.vue
View file @
01d5922d
...
...
@@ -128,6 +128,9 @@
},
definedDetail
()
{
},
BatchRemove
()
{
console
.
log
(
'BatchRemove'
)
}
// pretreatment() {}
}
...
...
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