UNPKG

782 BJavaScriptView Raw
1/**
2 *
3 * @title 多语组件设置组件的语言
4 * @description 按照固定的格式传入语言对象,会自动改变组件内默认文字的语言。
5 *
6 */
7
8import React, {Component} from 'react';
9import Locale from '../../src'
10import Popconfirm from 'bee-popconfirm';
11import Button from 'bee-button';
12import En from '../../src/en_US';
13
14class Demo1 extends Component {
15 render() {
16 let content = 'Do yon like me?';
17 return (
18 <Locale locale={En}>
19 <Popconfirm
20 trigger="click"
21 placement="right"
22 content={content}>
23 <Button colors="primary">see right!</Button>
24 </Popconfirm>
25 </Locale>
26 )
27 }
28}
29
30export default Demo1;
\No newline at end of file