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
d110184e
Commit
d110184e
authored
Feb 07, 2018
by
胡小根
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成table组件的翻页功能
parent
c4500330
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
prod.env.js
config/prod.env.js
+1
-1
HmComplexTable.vue
src/views/haomo/components/tables/HmComplexTable.vue
+9
-7
No files found.
config/prod.env.js
View file @
d110184e
module
.
exports
=
{
NODE_ENV
:
'"production"'
,
ENV_CONFIG
:
'"prod"'
,
BASE_API
:
'"
http://haomo-studio.com:28086/org
"'
BASE_API
:
'"
/org/api
"'
}
src/views/haomo/components/tables/HmComplexTable.vue
View file @
d110184e
...
...
@@ -20,8 +20,8 @@
<!-- 翻页 -->
<div
class=
"pagination-container"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"listQuery.page"
:page-sizes=
"[10,20,50]"
:page-size=
"listQuery.
limit
"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"listQuery.page
_no
"
:page-sizes=
"[10,20,50]"
:page-size=
"listQuery.
page_size
"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</div>
<!-- end翻页 -->
...
...
@@ -116,7 +116,7 @@
},
downloadLoading
:
false
,
showColumns
:
[]
showColumns
:
[]
// 要显示的列数据
}
},
created
()
{
...
...
@@ -128,7 +128,7 @@
init
()
{
const
self
=
this
if
(
!
self
.
columns
||
!
self
.
columns
.
length
)
{
_
.
each
(
self
.
schema
[
'columns'
],
function
(
column
){
_
.
each
(
self
.
schema
[
'columns'
],
function
(
column
)
{
const
tmp
=
JSON
.
parse
(
JSON
.
stringify
(
column
))
self
.
$set
(
tmp
,
'code'
,
tmp
.
code
.
toLowerCase
())
self
.
showColumns
.
push
(
tmp
)
...
...
@@ -140,7 +140,9 @@
getList
()
{
const
self
=
this
self
.
listLoading
=
true
request
(
self
.
schema
.
modelUnderscorePlural
).
then
(
resp
=>
{
request
(
self
.
schema
.
modelUnderscorePlural
,
{
params
:
self
.
listQuery
}).
then
(
resp
=>
{
console
.
log
(
resp
)
self
.
list
=
resp
.
data
self
.
total
=
parseInt
(
resp
.
headers
.
total
)
...
...
@@ -148,7 +150,7 @@
})
},
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
listQuery
.
page
_no
=
1
this
.
getList
()
},
handleSizeChange
(
val
)
{
...
...
@@ -156,7 +158,7 @@
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
this
.
listQuery
.
page
_no
=
val
this
.
getList
()
},
handleDelete
(
row
)
{
...
...
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