From 9dffe41e3fd95a85b64af7bffb1dd7e2ad7adc4c Mon Sep 17 00:00:00 2001
From: zhenyuWang <13641039885@163.com>
Date: Sat, 20 Apr 2024 11:42:30 +0800
Subject: [PATCH] refactor(component instance): nextTick
---
pages.json | 7 --
.../nextTick-function/child.uvue | 100 ------------------
.../nextTick-function.test.js | 39 -------
.../nextTick-function/nextTick-function.uvue | 98 -----------------
4 files changed, 244 deletions(-)
delete mode 100644 pages/component-instance/nextTick-function/child.uvue
delete mode 100644 pages/component-instance/nextTick-function/nextTick-function.test.js
delete mode 100644 pages/component-instance/nextTick-function/nextTick-function.uvue
diff --git a/pages.json b/pages.json
index d6b2ba5..b8fd449 100644
--- a/pages.json
+++ b/pages.json
@@ -377,13 +377,6 @@
"navigationBarTitleText": "nextTick"
}
},
-
- {
- "path": "pages/component-instance/nextTick-function/nextTick-function",
- "style": {
- "navigationBarTitleText": "$nextTick()"
- }
- },
{
"path": "pages/component-instance/methods/call-method-uni-element-options",
"style": {
diff --git a/pages/component-instance/nextTick-function/child.uvue b/pages/component-instance/nextTick-function/child.uvue
deleted file mode 100644
index 1867409..0000000
--- a/pages/component-instance/nextTick-function/child.uvue
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
- child component
-
-
- $nextTick Before Width:
- {{nextTickBeforeWidth}}
-
-
- $nextTick Before Height:
- {{nextTickBeforeHeight}}
-
-
- $nextTick After Width:
- {{nextTickAfterWidth}}
-
-
- $nextTick After Height:
- {{nextTickAfterHeight}}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/component-instance/nextTick-function/nextTick-function.test.js b/pages/component-instance/nextTick-function/nextTick-function.test.js
deleted file mode 100644
index 4316f67..0000000
--- a/pages/component-instance/nextTick-function/nextTick-function.test.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const PAGE_PATH = '/pages/component-instance/nextTick-function/nextTick-function'
-
-describe('$nextTick()', () => {
- let page
- beforeAll(async () => {
- page = await program.reLaunch(PAGE_PATH)
- await page.waitFor(500)
- })
-
- it('$nextTick() 回调方式', async () => {
- const data = await page.data()
-
- expect(data.nextTickBeforeWidth).toBe(100)
- expect(data.nextTickAfterWidth).toBe(200)
- });
-
- it('$nextTick() Promise方式', async () => {
- const data = await page.data()
-
- expect(data.nextTickBeforeHeight).toBe(100)
- expect(data.nextTickAfterHeight).toBe(200)
- });
-
- it('子组件 $nextTick() 回调方式', async () => {
- const comp = await page.$('.next-tick-child')
- const data = await comp.data()
-
- expect(data.nextTickBeforeWidth).toBe(100)
- expect(data.nextTickAfterWidth).toBe(200)
- });
-
- it('子组件 $nextTick() Promise方式', async () => {
- const comp = await page.$('.next-tick-child')
- const data = await comp.data()
-
- expect(data.nextTickBeforeHeight).toBe(100)
- expect(data.nextTickAfterHeight).toBe(200)
- });
-})
diff --git a/pages/component-instance/nextTick-function/nextTick-function.uvue b/pages/component-instance/nextTick-function/nextTick-function.uvue
deleted file mode 100644
index ce64699..0000000
--- a/pages/component-instance/nextTick-function/nextTick-function.uvue
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
-
-
-
-
-
- $nextTick Before Width:
- {{ nextTickBeforeWidth }}
-
-
- $nextTick Before Height:
- {{ nextTickBeforeHeight }}
-
-
- $nextTick After Width:
- {{ nextTickAfterWidth }}
-
-
- $nextTick After Height:
- {{ nextTickAfterHeight }}
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
--
GitLab