导航

    Taro 社区

    Taro

    • 注册
    • 登录
    • 搜索
    • 版块
    • 最新
    • 话题
    • 热门
    • 群组
    1. 主页
    2. jd_61118b9c9b0c0
    J
    • 资料
    • 关注
    • 粉丝
    • 主题
    • 帖子
    • 最佳
    • 群组

    jd_61118b9c9b0c0

    @jd_61118b9c9b0c0

    0
    声望
    9
    帖子
    2013
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 最后登录

    jd_61118b9c9b0c0 关注

    jd_61118b9c9b0c0 发布的帖子

    • RE: 编译运行一步一个坑,你们的破文档能改改吗?

      @13691505478_p大佬,rn项目跑不起来,可以请教一下怎么跑起来吗

      1. 项目npm run dev:rn
        2.将编译好的rn_temp,拖到taro-native-shell根目录,再执行npm install
        5d731475-4c18-45ca-8580-5eb1e339532a-image.png
        3.react-native run-android
        0648f951-f45e-49af-a461-94060ea44b4f-image.png
        81e3629e-5c88-481f-957e-b4d7f40396a1-image.png
        The development server returned response error code: 500

      URL: http://10.0.2.2:8081/rn_temp/index.delta?platform=android&dev=true&minify=false

      Body:
      {"originModulePath":"E:\taro-native-shell-master\rn_temp\app.js","targetModuleName":"@tarojs/components-rn","message":"Unable to resolve module @tarojs/components-rn from E:\\taro-native-shell-master\\rn_temp\\app.js: Module @tarojs/components-rn does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all.\n 2. Delete the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache. 4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*.","errors":[{"description":"Unable to resolve module @tarojs/components-rn from E:\\taro-native-shell-master\\rn_temp\\app.js: Module @tarojs/components-rn does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all.\n 2. Delete the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache. 4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*."}],"name":"Error","stack":"Error: Unable to resolve module @tarojs/components-rn from E:\\taro-native-shell-master\\rn_temp\\app.js: Module @tarojs/components-rn does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all.\n 2. Delete the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache. 4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*.\n at ModuleResolver.resolveDependency (E:\taro-native-shell-master\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:161:1460)\n at ResolutionRequest.resolveDependency (E:\taro-native-shell-master\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:91:16)\n at DependencyGraph.resolveDependency (E:\taro-native-shell-master\node_modules\metro\src\node-haste\DependencyGraph.js:272:4579)\n at dependencies.map.relativePath (E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:376:19)\n at Array.map (<anonymous>)\n at resolveDependencies (E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:374:16)\n at E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:212:33\n at Generator.next (<anonymous>)\n at step (E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:297:313)\n at E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:297:473"}
      processBundleResult
      BundleDownloader.java:266
      access$200
      BundleDownloader.java:35
      onResponse
      BundleDownloader.java:153
      execute
      RealCall.java:153
      run
      NamedRunnable.java:32
      runWorker
      ThreadPoolExecutor.java:1167
      run
      ThreadPoolExecutor.java:641
      run
      Thread.java:919

      发布在 React Native
      J
      jd_61118b9c9b0c0
    • RE: taro怎么做国际化

      @TARO 小助手 - HONLY

      发布在 Taro
      J
      jd_61118b9c9b0c0
    • taro怎么做国际化

      taro怎么做国际化 ,支持多语言切换

      发布在 Taro
      J
      jd_61118b9c9b0c0
    • taro-h5怎么做路由守卫

      taro-h5怎么做路由守卫

      发布在 H5
      J
      jd_61118b9c9b0c0
    • RE: H5打包后浏览报错。。。。

      @zhanyeweb
      h5: {
          publicPath: '/'
      }
      路径有没有改

      发布在 H5
      J
      jd_61118b9c9b0c0
    • RE: taro H5 设置setTabBarItem Uncaught (in promise) {errMsg: "setTabBarItem:fail tabbar item not found"}

      (taro@1.3.24 / react@16.3.1)
      (h5)我这边调用setTabBarItem,浏览器和启动窗口都没有报错
      调用这个方法页面:A页面(tab页)

      情况一:从B页面(tab页)跳转到A页面:

      1. url哈希值改变
      2. A页面相应的tabBar高亮显示,显示的文文字/图片为默认设置的
      3. 页面不能操作卡住了,显示的是B页面
      4. 最后页面白屏,浏览器和启动窗口始终不报错
      5. A页面关闭不了,其它的网站的页面可以正常关闭(即使启动窗口停止任务)

      情况二:页面输入A页面的url,直接打开调用这个方法页面B

      1. 页面正常打开
      2. setTabBarItem设置的文字起作用,图片显示处没有图片(空白)
      3. 打开控制台,查看元素,该位置的图片链接为我setTabBarItem中直接设置的图片url

      c675598d-fdbb-4453-bdad-d8886751b79f-image.png

      发布在 H5
      J
      jd_61118b9c9b0c0
    • RE: Swiper循环播放属性是哪个?

      循环播放属性:autoplay
      (理论上):设置为true时,可以实现循环播放
      (实际上):播放到最后一张就不会循环

      在文件\node_modules\@tarojs\components\src\components\swiper\index.js中,将stopOnLastSlide设置为false,可以实现循环播放。
      9e1109ea-8234-4741-b5d8-5734bcb5c335-image.png

      发布在 Taro 实践 + 案例
      J
      jd_61118b9c9b0c0
    • RE: Image图片的引入
      state = {
          list :[
          
              { image:'.banner01.jpg' },
          
              { image:'banner02.jpg' }
          
          ]
      }
       /******************/
      {
        let { list  } = this.state
        list.map((item,i)=><Image src=`../../images/banner/${list.image}` key={i}></Image>)
      }
      
      
      发布在 H5
      J
      jd_61118b9c9b0c0
    • Image图片的引入

      state = {url: '../../image/xx.png'}

      1. <Image src={require(this.state.url)}></Image>//有问题,报错
      2. <Image src={require('../../image/xx.png')}></Image>// 正常显示
      3. <Image src='../../image/xx.png'></Image>//图片加载了,不显示不报错

      需求:遍历数组(包含图片的url),渲染一个列表
      [
      { image:'../../images/banner/banner01.jpg' },
      { image:'../../images/banner/banner02.jpg' }
      ]

      发布在 H5
      J
      jd_61118b9c9b0c0