我的反应式条形码仅显示黑色全黑条。
我已经完成了npm install react-native-svg --save && react-native link react-native-svg
以下是我的代码
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import Barcode from 'react-native-barcode-builder';
export default class Example extends Component {
render() {
return (
<View>
<Text>
React Native Barcode Builder
</Text>
<Barcode value="Hello World" />
</View>
);
}
}
我希望我可以得到普通的条形码,而不是全黑
将背景颜色设置为白色:
<Barcode value="Hello World" background="#ffffff" format="CODE128" />