From 998bbd75dce928f737087e04470aa89bc07cb259 Mon Sep 17 00:00:00 2001 From: Linzp Date: Tue, 16 Sep 2025 18:56:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9fontList=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/FontList.js | 80 +++++++++++++++++++++++-------------------------- 2 files changed, 39 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index d5b4b68..673defa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kne/modules-dev", - "version": "2.1.16", + "version": "2.1.17", "description": "用于辅助在项目内启动一个规范化组件开发的环境", "publishConfig": { "access": "public", diff --git a/src/FontList.js b/src/FontList.js index 31cf3e1..c11021a 100644 --- a/src/FontList.js +++ b/src/FontList.js @@ -7,54 +7,50 @@ const FontList = ({fonts}) => { return
调整大小:
- +
{value}px
{Object.keys(fonts).map(fontClassName => { - const { glyphs: list } = fonts[fontClassName]; + const {glyphs: list} = fonts[fontClassName]; const isColorful = /-colorful$/.test(fontClassName); - return ( - - {fontClassName} - - {list.map(({ font_class }) => { - return ( - - {isColorful ? ( - <> - - - - ' - }}> - {font_class} - - - ) : ( - <> - - - - ' - }}> - {font_class} - - - )} - - ); - })} - + return ( + {fontClassName} + + {list.map(({font_class}) => { + return ( + {isColorful ? (<> + + + + + ' + }}> + {font_class} + + + ) : (<> + + + + + ' + }}> + {font_class} + + + )} + ); + })} - ); + ); })} }; -export default FontList; \ No newline at end of file +export default FontList; \ No newline at end of file