From 27947385ee870daac3bc3442d0a1d90de357cf6f Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Thu, 10 Oct 2024 17:02:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0text=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/text/text-props.test.js | 6 ++++++ pages/component/text/text-props.uvue | 3 +++ 2 files changed, 9 insertions(+) diff --git a/pages/component/text/text-props.test.js b/pages/component/text/text-props.test.js index b98840ee..2ec93d6d 100644 --- a/pages/component/text/text-props.test.js +++ b/pages/component/text/text-props.test.js @@ -30,6 +30,12 @@ describe('text-props', () => { expect(width).toBe(0) expect(height).toBe(0) } + const element3 = await page.$('#empty-text3') + if (element3 != null) { + const { width, height } = await element3.size() + expect(width).toBe(0) + expect(height).toBe(0) + } await page.setData({ autoTest: false }) diff --git a/pages/component/text/text-props.uvue b/pages/component/text/text-props.uvue index e6ced5d3..9ff36baf 100644 --- a/pages/component/text/text-props.uvue +++ b/pages/component/text/text-props.uvue @@ -107,6 +107,9 @@ {{emptyText}} + + + {{emptyText}} 一级节点文本 二级节点文本 -- GitLab