小编Mad*_*hur的帖子

如何通过Text in react native添加删除?

嘿我想以10美元的金额添加Strike Through以显示削减金额.请检查以下内容:

<View style={styles.row}>
    <View style={styles.inputWrapstotal}>
        <Text style={styles.labelcolor}>16.7% Off</Text>
    </View>
    <View style={styles.inputWrapstotal}>
        <Text style={styles.labelamount}>Rs $10</Text>
        <Text style={styles.labelamountchange}> 12 </Text>
    </View>
</View>
Run Code Online (Sandbox Code Playgroud)

请添加css,以便我可以在两行文本中对齐,在此先感谢.

请检查图像 在此输入图像描述

css android reactjs react-native

18
推荐指数
4
解决办法
1万
查看次数

如何在React Native中启用Android监视器来检查日志?

我是新的反应本地人.我想看看我的反应文件的日志.我正在使用android studio使用 反应原生项目和genny运动作为模拟器.你能指导我,我怎么能在android studio中看到日志或启用android监视器.

即使我已经从facebook安装了反应开发工具来调试代码:https://facebook.github.io/react-native/docs/debugging.html

但无法获得特定的解决方案

已经访问过:你如何调试本机反应?

如何登录React Native? 我已经检查了这么多解决方案,但它并没有在andoird 6.0版本中工作

但不工作请指导我,在此先感谢

javascript facebook node.js reactjs react-native

11
推荐指数
1
解决办法
1095
查看次数

如何在react native中设置同一行的两个输入?

嘿我想在同一行设置两个textInputs,在android模拟器中命名为Expiration date和CVV.

<View style={{flex: 1, flexDirection: 'row'}}>
<Text style={styles.label}style= {{width : 100}}>Expiration date</Text>
    <View style={styles.inputWrap}>
        <TextInput style={styles.inputdate} />  
    </View>

      <Text style={styles.label}>CVV</Text>
   <View style={styles.inputWrap}>
      <TextInput  style={styles.inputcvv } maxLength={17} />
  </View>
Run Code Online (Sandbox Code Playgroud)

这里包括两个textInputs的CSS

inputWrap: {
             borderColor: '#cccccc',
             borderBottomWidth: 1,
             marginBottom: 10,
   },
     inputdate: {
        fontSize: 14,
        marginBottom : -12,
        color: '#6a4595',
      },
      inputcvv: {
        fontSize: 14,
        marginBottom : -12,
        color: '#6a4595',
      },
Run Code Online (Sandbox Code Playgroud)

请让我知道如何在同一行设置此... ..提前感谢

javascript android reactjs react-native react-universal

3
推荐指数
1
解决办法
9973
查看次数

从 React Native App 打开外部应用程序(按钮单击)

我想通过单击我使用过的按钮来打开 New React Native App

在 React Native 中链接概念

React native Code:Test 是其他应用程序的名称

Linking.openURL('Test://app');
Run Code Online (Sandbox Code Playgroud)

还遵循在 android.manifest.xml 文件中添加 Intent 的 URL Andriod Intent

代码:Android.manifestfile.xml

  <activity
        android:name=".MainActivity"
        android:launchMode="singleTask"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
          <intent-filter>
              <action android:name="android.intent.action.VIEW" />
              <category android:name="com.Test" />
              <category android:name="android.intent.category.BROWSABLE" />
              <data android:scheme="Test" android:host="app" />
          </intent-filter>
      </activity>
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

javascript android reactjs react-native

3
推荐指数
1
解决办法
5444
查看次数

configuration.output.path:提供的值"./"不是绝对路径

我有一个错误:配置对象无效.Webpack已使用与API架构不匹配的配置对象进行初始化. - configuration.output.path:提供的值"./"不是绝对路径!

安装reactjs我的package.json文件在下面

{
  "name": "reactset",
  "version": "1.0.0",
  "description": "react",
  "main": "index.js",
  "scripts": {
    "start": "webpack-dev-server --hot"
  },
  "keywords": [
    "test"
  ],
  "author": "test",
  "license": "ISC",
  "dependencies": {
    "babel-core": "^6.25.0",
    "babel-loader": "^7.1.1",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "react": "^15.6.1",
    "react-dom": "^15.6.1",
    "webpack": "^3.0.0",
    "webpack-dev-server": "^2.5.0"
  }
}
using upgraded node version 4.0 and npm 5.0 
Error : 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactset@1.0.0 start: `webpack-dev-server --hot`
npm ERR! Exit status 1
npm ERR! 
npm ERR! …
Run Code Online (Sandbox Code Playgroud)

node.js npm reactjs react-native

2
推荐指数
1
解决办法
3742
查看次数

未设置素材资源目标文件夹跳过本机响应(图片未加载到APK中)

我正在使用此命令:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
Run Code Online (Sandbox Code Playgroud)

输出
Scanning folders for symlinks in C:\Users\mgaba\Desktop\InfraGBU\node_modules (86ms) Scanning folders for symlinks in C:\Users\mgaba\Desktop\InfraGBU\node_modules (94ms) Loading dependency graph, done. bundle: Writing bundle output to: android/app/src/main/assets/index.android.bundle bundle: Done writing bundle output **Assets destination folder is not set, skipping...**

因此,我将无法在apk中看到图像。图片未与此相关,请帮助消除此错误。

javascript reactjs react-native react-native-android

2
推荐指数
1
解决办法
1468
查看次数

从 json 数组元素中删除 Json 对象

var jsonArray = ["test", "test1", "test2"];
var matchedValue = "test1";
Run Code Online (Sandbox Code Playgroud)

我想从 JsonArray 中删除remove和(matchedValue)。我如何删除并返回字符串的其余部分

Expected output : ["test", "test2"];
Run Code Online (Sandbox Code Playgroud)

我在做什么 :

var setValue = JSON.parse(fetchMethodJsonArray);
dataRemoved = setValue.filter(function(el) {
              return el != fetchValue;
          });
Run Code Online (Sandbox Code Playgroud)

它不工作

请告诉我解决方案 提前致谢。

javascript jquery

0
推荐指数
1
解决办法
2万
查看次数