提交 faa58d84 编写于 作者: shutao-dc's avatar shutao-dc

update set-page-style-disable-pull-down-refresh.uvue onLoad获取PageStyle校验数据

上级 c0655c01
...@@ -13,8 +13,7 @@ describe('getCurrentPages', () => { ...@@ -13,8 +13,7 @@ describe('getCurrentPages', () => {
let page let page
it('page-style', async () => { it('page-style', async () => {
page = await program.navigateTo(PAGE_PATH) page = await program.navigateTo(PAGE_PATH)
//onLoad会对currentPageStyle赋值
await page.callMethod('getPageStyle')
await page.waitFor(200) await page.waitFor(200)
const currentPageStyle = (await page.data()).currentPageStyle const currentPageStyle = (await page.data()).currentPageStyle
const isEnablePullDownRefresh1 = currentPageStyle.enablePullDownRefresh const isEnablePullDownRefresh1 = currentPageStyle.enablePullDownRefresh
......
...@@ -35,6 +35,12 @@ ...@@ -35,6 +35,12 @@
return JSON.stringify(this.currentPageStyle) return JSON.stringify(this.currentPageStyle)
} }
}, },
onLoad() {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
this.currentPageStyle = currentPage.getPageStyle();
this.enablePullDownRefreshStatus = this.currentPageStyle["enablePullDownRefresh"] as boolean
},
onPullDownRefresh() { onPullDownRefresh() {
setTimeout(() => { setTimeout(() => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册