From 13267dace35869942f4705fb141f54b8a976e987 Mon Sep 17 00:00:00 2001 From: 15871369330 <@Gitee31415926535> Date: Wed, 4 Sep 2024 11:03:43 +0800 Subject: [PATCH] =?UTF-8?q?Web=E7=BB=84=E4=BB=B6=E9=A2=84=E8=A7=88PDF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20=E4=B8=AD=E8=8B=B1=E6=96=87=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Index.ets | 17 +++++++++++++++-- .../main/resources/base/element/integer.json | 12 ++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 2550558..9cc3b61 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -64,8 +64,15 @@ struct Index { } .width(CommonConstants.FULL_PERCENT) .backgroundColor(Color.White) - .tabBar(SubTabBarStyle.of($r('app.string.tab_index_one_title')) - .indicator({ color: $r('app.color.ohos_id_color_emphasize') }) + .tabBar( + SubTabBarStyle.of($r('app.string.tab_index_one_title')) + .indicator({ color: $r('app.color.ohos_id_color_emphasize') }) + .labelStyle({ + overflow: TextOverflow.Clip, + minFontSize: $r('app.integer.min_font_size'), + maxFontSize: $r('app.integer.max_font_size'), + font: { size: $r('app.integer.font_size') } + }) ) // Preview network PDF files. @@ -103,6 +110,12 @@ struct Index { .tabBar( SubTabBarStyle.of($r('app.string.tab_index_two_title')) .indicator({ color: $r('app.color.ohos_id_color_emphasize') }) + .labelStyle({ + overflow: TextOverflow.Clip, + minFontSize: $r('app.integer.min_font_size'), + maxFontSize: $r('app.integer.max_font_size'), + font: { size: $r('app.integer.font_size') } + }) ) } .barBackgroundColor(Color.White) diff --git a/entry/src/main/resources/base/element/integer.json b/entry/src/main/resources/base/element/integer.json index 29d1954..4b52f79 100644 --- a/entry/src/main/resources/base/element/integer.json +++ b/entry/src/main/resources/base/element/integer.json @@ -7,6 +7,18 @@ { "name": "home_margin_top", "value": 15 + }, + { + "name": "min_font_size", + "value": 12 + }, + { + "name": "max_font_size", + "value": 16 + }, + { + "name": "font_size", + "value": 16 } ] } \ No newline at end of file -- Gitee