Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bms-vue-obear
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
daywrite
bms-vue-obear
Commits
d60f2bfa
Commit
d60f2bfa
authored
Mar 21, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
留言模块增加分页
parent
4bf9354c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
3 deletions
+79
-3
leaveMessage.vue
src/components/common/leaveMessage.vue
+22
-2
leaveMessagePagenation.vue
src/components/common/leaveMessagePagenation.vue
+57
-0
scheduleHome.vue
src/components/schedule_list/scheduleHome.vue
+0
-1
No files found.
src/components/common/leaveMessage.vue
View file @
d60f2bfa
...
...
@@ -78,6 +78,11 @@
</div>
</li>
</ul>
<Pagenation
class=
"pull-right clearfix"
:pager
.
sync=
"result.pagenation"
:total=
"result.pagenation.totalcount"
>
</Pagenation>
</div>
</div>
</div>
...
...
@@ -91,7 +96,13 @@ import {
api
}
from
'@/lib/commonMixin'
import
{
setModule
}
from
'@/lib/viewHelper'
import
Pagenation
from
'./leaveMessagePagenation'
export
default
{
components
:
{
Pagenation
},
data
()
{
return
{
is
:
false
,
...
...
@@ -99,7 +110,14 @@ export default {
secondTextBool
:
{},
secondArrayText
:
{},
model
:
{},
result
:
{}
result
:
{
list
:
[],
pagenation
:
{
totalcount
:
1
,
thispage
:
1
,
pagesize
:
10
}
}
}
},
...
...
@@ -179,7 +197,9 @@ export default {
let
vm
=
this
let
params
=
{
object_type
:
this
.
type
,
object_id
:
this
.
model
.
id
object_id
:
this
.
model
.
id
,
thispage
:
1
,
pagesize
:
2
}
requestAPI
(
api
.
getCommentList
,
params
)
.
then
((
res
)
=>
{
...
...
src/components/common/leaveMessagePagenation.vue
0 → 100644
View file @
d60f2bfa
<
template
>
<section>
<el-pagination
v-if=
"total > 0"
class=
"mb20 mt20"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pager.thispage"
:page-sizes=
"[2, 10, 20, 40, 60, 80, 100]"
:page-size=
"pager.pagesize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</section>
</
template
>
<
script
>
export
default
{
props
:
{
total
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
pager
:
{
thispage
:
1
,
pagesize
:
10
,
totalcount
:
0
}
}
},
created
()
{
this
.
$emit
(
'update:pager'
,
this
.
pager
)
},
methods
:
{
handleSizeChange
(
val
)
{
this
.
pager
.
thispage
=
1
this
.
pager
.
pagesize
=
val
this
.
pager
.
totalcount
=
this
.
total
this
.
$emit
(
'update:pager'
,
this
.
pager
)
this
.
$parent
.
init
()
},
handleCurrentChange
(
val
)
{
this
.
pager
.
page
=
val
this
.
pager
.
totalcount
=
this
.
total
this
.
$emit
(
'update:pager'
,
this
.
pager
)
this
.
$parent
.
init
()
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/schedule_list/scheduleHome.vue
View file @
d60f2bfa
...
...
@@ -158,7 +158,6 @@ export default {
},
lmClose
()
{
console
.
log
(
1
)
this
.
$refs
.
leaveMessage
.
isClose
()
},
...
...
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