提交 994f0f88 编写于 作者: H hdx

fix(getCurrentPage): 移除一些无效测试

上级 8e3d1150
...@@ -42,9 +42,7 @@ describe('getCurrentPages', () => { ...@@ -42,9 +42,7 @@ describe('getCurrentPages', () => {
await page.waitFor(200) await page.waitFor(200)
const data2 = await page.data() const data2 = await page.data()
const isEnablePullDownRefresh2 = data2.currentPageStyle.enablePullDownRefresh const isEnablePullDownRefresh2 = data2.currentPageStyle.enablePullDownRefresh
const currentPageStyleIsUTSJSONObject2 = data2.currentPageStyleIsUTSJSONObject
expect(isEnablePullDownRefresh2).toBe(false) expect(isEnablePullDownRefresh2).toBe(false)
expect(currentPageStyleIsUTSJSONObject2).toBe(true)
await page.callMethod('startPullDownRefresh') await page.callMethod('startPullDownRefresh')
await page.waitFor(500) await page.waitFor(500)
......
...@@ -55,10 +55,7 @@ ...@@ -55,10 +55,7 @@
checked: false, checked: false,
pages: [] as Page[], pages: [] as Page[],
PageStyleMap: PageStyleMap as Map<string, PageStyleItem>, PageStyleMap: PageStyleMap as Map<string, PageStyleItem>,
currentPageStyle: {} as UTSJSONObject, currentPageStyle: {} as UTSJSONObject,
currentPageStyleIsUTSJSONObject: true,
// TODO
enablePullDownRefreshStatus: true
} }
}, },
computed: { computed: {
...@@ -118,7 +115,6 @@ ...@@ -118,7 +115,6 @@
const pages = getCurrentPages(); const pages = getCurrentPages();
const currentPage = pages[pages.length - 1]; const currentPage = pages[pages.length - 1];
this.currentPageStyle = currentPage.$getPageStyle() this.currentPageStyle = currentPage.$getPageStyle()
this.currentPageStyleIsUTSJSONObject = this.currentPageStyle instanceof UTSJSONObject
return this.currentPageStyle; return this.currentPageStyle;
}, },
setPageStyle(style : UTSJSONObject) { setPageStyle(style : UTSJSONObject) {
...@@ -127,21 +123,6 @@ ...@@ -127,21 +123,6 @@
const currentPage = pages[pages.length - 1]; const currentPage = pages[pages.length - 1];
currentPage.$setPageStyle(style); currentPage.$setPageStyle(style);
}, },
// getPageStyle() {
// const pages = getCurrentPages();
// const currentPage = pages[pages.length - 1];
// this.currentPageStyle = currentPage.$getPageStyle();
// this.currentPageStyleIsUTSJSONObject = this.currentPageStyle instanceof UTSJSONObject
// },
// setPageStyle(enable : boolean) {
// // 目前仅支持 enablePullDownRefresh
// const pages = getCurrentPages();
// const currentPage = pages[pages.length - 1];
// currentPage.$setPageStyle({
// enablePullDownRefresh: enable
// });
// this.enablePullDownRefreshStatus = enable
// },
// getCurrentPage(): Page { // getCurrentPage(): Page {
// const pages = getCurrentPages(); // const pages = getCurrentPages();
// const currentPage = pages[pages.length - 1]; // const currentPage = pages[pages.length - 1];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册