diff --git a/example/examples/src/routes.tsx b/example/examples/src/routes.tsx index c73f15479..49bf832c3 100644 --- a/example/examples/src/routes.tsx +++ b/example/examples/src/routes.tsx @@ -490,4 +490,12 @@ export const stackPageData: Routes[] = [ description: '底部操作栏', }, }, + { + name: 'ImageViewer', + component: require('./routes/ImageViewer').default, + params: { + title: 'ImageViewer 图片查看', + description: '图片查看', + }, + }, ]; diff --git a/example/examples/src/routes/ImageViewer/index.tsx b/example/examples/src/routes/ImageViewer/index.tsx new file mode 100644 index 000000000..f77229b77 --- /dev/null +++ b/example/examples/src/routes/ImageViewer/index.tsx @@ -0,0 +1,37 @@ +import React, {Component} from 'react'; +import {View, Text} from 'react-native'; +import Layout, {Container} from '../../Layout'; +import {ImageViewer} from '@uiw/react-native'; +import {ComProps} from '../../routes'; + +const {Header, Body, Card, Footer} = Layout; + +export interface IndexProps extends ComProps {} + +export default class Index extends Component { + render() { + const {route} = this.props; + const description = route.params.description; + const title = route.params.title; + return ( + + +
+ + + + + + + + +