From bca57a74adac6d51eed2feddef4f45cffc069f34 Mon Sep 17 00:00:00 2001 From: hdx Date: Mon, 18 Mar 2024 17:33:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(nodes-info):=20=E8=A1=A5=E5=85=85=E5=AD=90?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=20mounted=20=E7=94=9F=E5=91=BD?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/nodes-info/nodes-info-child.uvue | 29 ++ pages/API/nodes-info/nodes-info.test.js | 5 + pages/API/nodes-info/nodes-info.uvue | 354 +++++++++++---------- 3 files changed, 214 insertions(+), 174 deletions(-) create mode 100755 pages/API/nodes-info/nodes-info-child.uvue diff --git a/pages/API/nodes-info/nodes-info-child.uvue b/pages/API/nodes-info/nodes-info-child.uvue new file mode 100755 index 00000000..fad48b47 --- /dev/null +++ b/pages/API/nodes-info/nodes-info-child.uvue @@ -0,0 +1,29 @@ + + + + + diff --git a/pages/API/nodes-info/nodes-info.test.js b/pages/API/nodes-info/nodes-info.test.js index d219bfe0..e2c61f69 100644 --- a/pages/API/nodes-info/nodes-info.test.js +++ b/pages/API/nodes-info/nodes-info.test.js @@ -53,6 +53,11 @@ describe('nodes-info', () => { expect(nodeInfo2.top > 220).toBe(true) expect(Math.round(nodeInfo2.width)).toBe(RECT_WIDTH) expect(Math.round(nodeInfo2.height)).toBe(RECT_HEIGHT) + }) + it('get-node-info-child', async () => { + const child = await page.$('.node-child') + const childData = await child.data() + expect(childData.top > 100).toBe(true) }) // #ifdef APP diff --git a/pages/API/nodes-info/nodes-info.uvue b/pages/API/nodes-info/nodes-info.uvue index 47349d25..fef2a62b 100644 --- a/pages/API/nodes-info/nodes-info.uvue +++ b/pages/API/nodes-info/nodes-info.uvue @@ -1,176 +1,182 @@ -