@@ -31,35 +31,33 @@ const xml = `
3131
3232export interface DividerViewProps extends ComProps { }
3333
34- export default class DividerView extends React . Component < DividerViewProps > {
35- render ( ) {
36- const { route} = this . props ;
37- const description = route . params . description ;
38- const title = route . params . title ;
39- return (
40- < Container >
41- < Layout >
42- < Header title = { title } description = { description } />
43- < Body >
44- < Card title = "默认基础实例" >
45- < Empty />
46- </ Card >
47- < Card title = "自定义文字 label?: string" >
48- < Empty label = "冇得数据咯" />
49- </ Card >
50- < Card title = "替换默认图标 xml?: string;" >
51- < Empty label = "冇得数据咯" xml = { xml } />
52- </ Card >
53- < Card title = "自定义图标尺寸 size?: number" >
54- < Empty label = "冇得数据咯" size = { 120 } />
55- </ Card >
56- < Card title = "自定义文字样式 labelStyle?: TextProps['style']" >
57- < Empty label = "冇得数据咯" labelStyle = { { color : 'red' } } />
58- </ Card >
59- </ Body >
60- < Footer />
61- </ Layout >
62- </ Container >
63- ) ;
64- }
34+ export default function DividerView ( props : DividerViewProps ) {
35+ const { route} = props || { } ;
36+ const description = route . params . description ;
37+ const title = route . params . title ;
38+ return (
39+ < Container >
40+ < Layout >
41+ < Header title = { title } description = { description } />
42+ < Body >
43+ < Card title = "默认基础实例" >
44+ < Empty />
45+ </ Card >
46+ < Card title = "自定义文字 label?: string" >
47+ < Empty label = "冇得数据咯" />
48+ </ Card >
49+ < Card title = "替换默认图标 xml?: string;" >
50+ < Empty label = "冇得数据咯" xml = { xml } />
51+ </ Card >
52+ < Card title = "自定义图标尺寸 size?: number" >
53+ < Empty label = "冇得数据咯" size = { 120 } />
54+ </ Card >
55+ < Card title = "自定义文字样式 labelStyle?: TextProps['style']" >
56+ < Empty label = "冇得数据咯" labelStyle = { { color : 'red' } } />
57+ </ Card >
58+ </ Body >
59+ < Footer />
60+ </ Layout >
61+ </ Container >
62+ ) ;
6563}
0 commit comments