VTable icon indicating copy to clipboard operation
VTable copied to clipboard

如何设置全局主题和样式

Open liuhuan1011 opened this issue 1 year ago • 1 comments

如何在react脚手架全局设置主题和样式呢

liuhuan1011 avatar Jul 31 '24 01:07 liuhuan1011

image

Rui-Sun avatar Aug 08 '24 07:08 Rui-Sun

大佬你好,为啥我设置主题无效呢? @Rui-Sun

import { ListTableSimple } from '@visactor/react-vtable';
import { themes } from '@visactor/vtable';

...

<ListTableSimple
  theme={themes.DARK}
/>

也尝试过自己手动设置,均无效,是我的姿势不对吗?

<ListTableSimple
   theme={{
      headerStyle: {
        fontSize: 12,
      },
    }}
/>

tylerrrkd avatar Feb 24 '25 04:02 tylerrrkd

大佬你好,为啥我设置主题无效呢? @Rui-Sun

import { ListTableSimple } from '@visactor/react-vtable'; import { themes } from '@visactor/vtable';

...

<ListTableSimple theme={themes.DARK} /> 也尝试过自己手动设置,均无效,是我的姿势不对吗?

<ListTableSimple theme={{ headerStyle: { fontSize: 12, }, }} />

因为 传递了 option 时需要在 option 内声明 theme

tylerrrkd avatar Feb 28 '25 07:02 tylerrrkd