4.6.201906131426 • Published 5 years ago
@dfeidao/fd-m000010 v4.6.201906131426
See
https://dfeidao.gitee.io/widgets-mobile/
Installation
yarn add --dev @dfeidao/fd-m000010
fd-m000010 扫码
必须传入 无
import Scanner, { onResultType } from '@dfeidao/fd-m000010';
<Scanner
enable={d<boolean>('enable')}
onResult={a('a001') as unknown as onResultType}
/>
Installation
yarn add --dev @dfeidao/fd-m000010
Attributes
box_width?: number;
扫描框的宽
box_height?: number;
扫描框的高
style?: StyleProp;
样式
text?: string;
扫描框下面的文字
enable?: boolean;
是否启用
torch?: number;
闪光灯 0是关,1是开,2是自动
onResult?: (result: { format: number; content: string; } | null, error: { code: number, message: string } | null) => void;
扫码成功事件
完整使用示例
<Marquee
text={d<string>('text')}
width={Dimensions.get('window').width}
height={100}
direction={'left'}
bgContainerStyle={{ backgroundColor: '#FFFF00' }}
textStyle={{ fontSize: 16, color: '#FF0000' }}
onTextClick={a('a001') as unknown as (text: string) => void}
></Marquee>
4.6.201906131426
5 years ago