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
78117acb
Commit
78117acb
authored
Mar 26, 2018
by
杨柠瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding
parent
bc5a9237
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
HmComplexTable.vue
src/views/haomo/components/tables/HmComplexTable.vue
+15
-6
No files found.
src/views/haomo/components/tables/HmComplexTable.vue
View file @
78117acb
...
...
@@ -293,9 +293,10 @@
* isShow: false, // 默认不显示详情
* showColumns: ['mobile', 'loginid', 'username', 'email']
* },
* dataProcessing(value){} // 对接口返回数据进行处理
* dataProcessing(value){} // 对接口返回数据进行处理
(必须有返回值,返回值需为 [{}] 的形式,支持放回Promise对象)
* "changeValue": { // 数据库字段转化显示,例如(0=否,1=是)
* username: {1: '是', 0: '否'}
* username: {1: '是', 0: '否'},
* type: { 1: 'Hm-isChecked', 0: 'Hm-noChecked' } // 以多选框的形式展示Hm-isChecked(选择状态)、Hm-noChecked(未选择状态)
* },
* "newData": { // 新建按钮的配置
* isShow: false, // 默认不显示新建按钮
...
...
@@ -567,8 +568,16 @@
// 数据处理
if
(
self
.
options
&&
self
.
options
.
dataProcessing
)
{
if
(
Object
.
prototype
.
toString
.
apply
(
self
.
options
.
dataProcessing
(
resp
.
data
))
===
'[object Promise]'
)
{
console
.
log
(
'IS-[object Promise]'
)
self
.
options
.
dataProcessing
(
resp
.
data
).
then
(
function
(
dataList
)
{
self
.
list
=
dataList
})
}
else
{
console
.
log
(
'NO-[object Promise]'
)
self
.
list
=
self
.
options
.
dataProcessing
(
resp
.
data
)
}
}
self
.
total
=
parseInt
(
resp
.
headers
.
total
)
self
.
listLoading
=
false
})
...
...
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