主屏图标容器添加页面跳转功能
This commit is contained in:
parent
77dda47765
commit
c96a3ee1d7
|
@ -388,6 +388,17 @@ export class GaiaContainer extends StarBaseElement {
|
|||
this.resetView(type, this.pagination, callback)
|
||||
}
|
||||
|
||||
turnTo(pagination: number) {
|
||||
if (pagination < 0) {
|
||||
pagination = 0
|
||||
} else if (pagination >= this.pages.length) {
|
||||
pagination = this.pages.length - 1
|
||||
}
|
||||
|
||||
const page = this.pages[pagination]
|
||||
this.smoothSlide(page, 'panend')
|
||||
}
|
||||
|
||||
resetView(
|
||||
type: string,
|
||||
pagination = this.pagination,
|
||||
|
|
Loading…
Reference in New Issue