Ver Fonte

docs: fix localeProvider docs demo error

pointhalo há 3 anos atrás
pai
commit
3e741de605
2 ficheiros alterados com 7 adições e 2 exclusões
  1. 4 1
      content/other/locale/index-en-US.md
  2. 3 1
      content/other/locale/index.md

+ 4 - 1
content/other/locale/index-en-US.md

@@ -97,7 +97,7 @@ class I18nDemo extends React.Component {
 
 ### Custom Internationalization Component
 
-```jsx live=true dir="column" hideInDSM
+```jsx live=true dir="column" noInline=true
 import React from 'react';
 import zh_CN from '@douyinfe/semi-ui/lib/es/locale/source/zh_CN';
 import en_GB from '@douyinfe/semi-ui/lib/es/locale/source/en_GB';
@@ -140,6 +140,9 @@ class CustomComponent extends React.Component {
         </LocaleConsumer>;
     }
 }
+
+render(CustomComponent);
+
 ```
 
 ### Components that support multilingualism

+ 3 - 1
content/other/locale/index.md

@@ -96,7 +96,7 @@ class I18nDemo extends React.Component {
 
 ### 自定义国际化组件
 
-```jsx live=true dir="column" hideInDSM
+```jsx live=true dir="column" noInline=true
 import React from 'react';
 import zh_CN from '@douyinfe/semi-ui/lib/es/locale/source/zh_CN';
 import en_GB from '@douyinfe/semi-ui/lib/es/locale/source/en_GB';
@@ -139,6 +139,8 @@ class CustomComponent extends React.Component {
         </LocaleConsumer>;
     }
 }
+
+render(CustomComponent);
 ```
 
 ### 支持多语言的组件