Navigation

    GitHub中文社区
    • GitHub排行榜

    论坛

    • Login
    • Categories
    • Recent
    • Tags
    • Popular

    通过computed计算出来的值无法在页面显示

    技术交流
    3
    3
    159
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Hortincr
      Hortincr last edited by

      1.PNG
      2.PNG
      3.PNG

      文字描述:
      (1)数据以数组形式存放在根组件中,将数据传给子组件
      (2)子组件接收之后利用computed进行统计计算,通过模板语法插入使用
      (3)页面效果无。。。结构还存在

      1 Reply Last reply Reply Quote 0
      • coderhsx
        coderhsx last edited by

        https://www.runoob.com/jsref/jsref-reduce.html
        这是reduce的api。reduce方法记得返回上一次计算后的值

        1 Reply Last reply Reply Quote 1
        • loveme199
          loveme199 last edited by

          没有return

          1 Reply Last reply Reply Quote 0
          • First post
            Last post