导航

    Taro 社区

    Taro

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

    iNiL0119

    @iNiL0119

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

    iNiL0119 关注

    iNiL0119 发布的帖子

    • RE: React Taro多行文本省略无效

      @jd_5257de320dc47 因为只做了小程序的没有做h5的,可能是存在兼容问题

      发布在 H5
      I
      iNiL0119
    • taro中可以使用less.modifyVars修改less样式吗

      taro中可以使用less.modifyVars修改less样式吗

      发布在 Taro
      I
      iNiL0119
    • RE: Hooks报错TypeError: Object(...) is not a function

      版本:
      taro:3.0.18
      react:^16.10.0

      发布在 Taro 实践 + 案例
      I
      iNiL0119
    • RE: 手机预览,项目构建代码包大小问题

      @jd_4170b49c623b5 全局引用导致项目代码包大小超过2MB,按需引用就可以了。其他暂时还没遇到

      发布在 微信小程序
      I
      iNiL0119
    • RE: React Taro多行文本省略无效
      <View className='lines'>React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效,React Taro多行文本省略无效。</View>
      
      .lines {
        overflow:hidden; 
        text-overflow:ellipsis;
        display:-webkit-box; 
        -webkit-box-orient:vertical;
        -webkit-line-clamp:2; 
      }
      

      这不就可以了吗

      发布在 H5
      I
      iNiL0119
    • Hooks报错TypeError: Object(...) is not a function
      import Taro, { useState } from '@tarojs/taro'
      
      setHooksTest = () => {
          const [style, setStyle] = useState({
            background:'red',
            color:'blue'
          })
          return <View 
                  style={{background: style.background, color: style.color}}
                  onClick={()=>{setStyle({background:'green', color:'#ccc'})}}
                  >
                  测试
                </View>
        }
      

      render之后一直报错TypeError: Object(...) is not a function

      TypeError: Object(...) is not a function
          at Goods.setHooksTest (index.jsx:160)
          at Goods.render (index.jsx:58)
          at ye (react-reconciler.production.min.js:90)
          at xe (react-reconciler.production.min.js:89)
          at ig (react-reconciler.production.min.js:162)
          at hg (react-reconciler.production.min.js:139)
          at bg (react-reconciler.production.min.js:138)
          at Of (react-reconciler.production.min.js:132)
          at react-reconciler.production.min.js:30
          at push../node_modules/scheduler/cjs/scheduler.production.min.js.exports.unstable_runWithPriority (scheduler.production.min.js:18)
      

      有谁知道是什么原因吗?

      发布在 Taro 实践 + 案例
      I
      iNiL0119