Skip to content

Commit 4fcc1f3

Browse files
committed
fix: configprovider docs
1 parent d4dfbc4 commit 4fcc1f3

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

src/packages/configprovider/demo.taro.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,30 @@ import Demo3 from './demos/taro/demo3'
88
import Demo4 from './demos/taro/demo4'
99
import Demo5 from './demos/taro/demo5'
1010
import { useTranslate } from '@/sites/assets/locale/taro'
11+
import { harmony } from '@/utils/platform-taro'
1112

1213
const ConfigProviderDemo = () => {
1314
const [translated] = useTranslate({
1415
'zh-CN': {
15-
title1: 'Textarea 默认',
16-
title2: 'Textarea 英文',
16+
title1: 'Textarea 默认-禁用',
17+
title2: 'Textarea 英文-禁用',
1718
defaultTheme: '默认主题',
18-
customTheme: '定制主题',
19+
customTheme: `定制主题${harmony() ? '【暂不支持】' : ''}`,
20+
RTL: harmony() ? 'RTL【暂不支持】' : 'RTL',
1921
},
2022
'zh-TW': {
21-
title1: '默認用法',
22-
title2: 'Textarea 英文',
23+
title1: 'Textarea 默認用法-禁用',
24+
title2: 'Textarea 英文-禁用',
2325
defaultTheme: '默認主題',
24-
customTheme: '定制主題',
26+
customTheme: `定制主題${harmony() ? '【暂不支持】' : ''}`,
27+
RTL: harmony() ? 'RTL【暂不支持】' : 'RTL',
2528
},
2629
'en-US': {
27-
title1: 'Textarea default',
28-
title2: 'Textarea en-US',
30+
title1: 'Textarea default + disabled',
31+
title2: 'Textarea en-US + disabled',
2932
customTheme: 'Custom Theme',
30-
defaultTheme: 'Default Theme',
33+
defaultTheme: `Default Theme ${harmony() ? '[Pendding]' : ''}`,
34+
RTL: harmony() ? 'RTL[Pendding]' : 'RTL',
3135
},
3236
})
3337
return (
@@ -42,7 +46,7 @@ const ConfigProviderDemo = () => {
4246
<Demo3 />
4347
<View className="h2">{translated.title2}</View>
4448
<Demo4 />
45-
<View className="h2">RTL</View>
49+
<View className="h2">{translated.RTL}</View>
4650
<Demo5 />
4751
</ScrollView>
4852
</>

src/packages/configprovider/doc.taro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ NutUI-React 可以通过 [CSS 变量](https://developer.mozilla.org/zh-CN/docs/W
2929
}
3030
```
3131

32-
> @nutui/nutui-react 中带了两个主题文件 默认主题:@nutui/nutui-react/dist/styles/themes/default.css; 暗黑主题:@nutui/nutui-react/dist/styles/themes/dark.css; 如果想使用暗黑主题,可以在项目中导入暗黑主题文件。
32+
> @nutui/nutui-react-taro 中带了两个主题文件 默认主题:@nutui/nutui-react-taro/dist/styles/themes/default.css; 暗黑主题:@nutui/nutui-react-taro/dist/styles/themes/dark.css; 如果想使用暗黑主题,可以在项目中导入暗黑主题文件。
3333
3434
#### 通过 ConfigProvider 覆盖
3535

0 commit comments

Comments
 (0)