假设用户没有上传个人资料图像,这意味着图像的数据库字段将为空,并且我们的json不会解析任何数据。因此,如果图像==为空,我希望设置为默认的url字符串 以下是我尝试过的方法 //traversing through all the object//getting product object from json array
JSONObject
我需要知道如何为props设置一个默认值来反应Native。style={styles.introduction}>{{ '', ...props.introduction }}</Text>如果props.introduction为0,我想将其设置为空,如:'',或设置为其他值,如:'Not set