From 0fa23028724eef5ca86f953c02343a815a6fc864 Mon Sep 17 00:00:00 2001 From: bqxbqx Date: Sun, 29 Sep 2024 18:31:23 +0800 Subject: [PATCH] fix: select & font bug --- packages/ui-react/lib/Select/Select.stories.tsx | 1 + packages/ui-react/lib/Select/Select.tsx | 4 +--- packages/ui-react/lib/global.scss | 2 +- packages/ui-react/package.json | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/ui-react/lib/Select/Select.stories.tsx b/packages/ui-react/lib/Select/Select.stories.tsx index f4036dc..decb15a 100644 --- a/packages/ui-react/lib/Select/Select.stories.tsx +++ b/packages/ui-react/lib/Select/Select.stories.tsx @@ -52,6 +52,7 @@ export const DefaultSelect: Story = { key: 5, }, ], + defaultSelectKey: 3, className: 'test', }, }; diff --git a/packages/ui-react/lib/Select/Select.tsx b/packages/ui-react/lib/Select/Select.tsx index 7965836..4f83ca1 100644 --- a/packages/ui-react/lib/Select/Select.tsx +++ b/packages/ui-react/lib/Select/Select.tsx @@ -86,9 +86,7 @@ export const Select = React.forwardRef( }; const selectItemStore = useRef(createSelectItemStore(defaultSelectItem ?? selectKey)).current; - const keySelectItemStore = useRef( - createKeySelectItemStore(defaultSelectItem ?? selectItem), - ).current; + const keySelectItemStore = useRef(createKeySelectItemStore()).current; const [visible, setVisible] = useState(false); const selectClass = classNames(styles['base'], styles[size], className); const closeOptions = () => { diff --git a/packages/ui-react/lib/global.scss b/packages/ui-react/lib/global.scss index e579562..aa58145 100644 --- a/packages/ui-react/lib/global.scss +++ b/packages/ui-react/lib/global.scss @@ -29,7 +29,7 @@ --border-white: #f1f1f1; --pale-white: #fcfcfc; // TODO: 开发时为了好看,先设置字体为当前,生产时删除,或者使用组件库时,可以用 !important 给覆盖掉 - font-family: 'open sans regular'; + // font-family: 'open sans regular'; } ::-webkit-scrollbar { diff --git a/packages/ui-react/package.json b/packages/ui-react/package.json index c337f7f..f46d6bf 100644 --- a/packages/ui-react/package.json +++ b/packages/ui-react/package.json @@ -1,6 +1,6 @@ { "name": "@ui-aurora/react", - "version": "0.0.18", + "version": "0.0.19", "description": "A React UI library built for SASTOJ", "author": "sast", "license": "MIT",