在做展示分类列表时 ,点击分类按钮 报错 ?

在做展示分类列表时 ,点击分类按钮 报错

VM60779:1 Do not have toggle handler in current page: pages/topics/index. Please make sure that toggle handler has been defined in pages/topics/index, or pages/topics/index has been added into app.json

代码

computed = {
      currentCategoryId () {
        return this.currentCategory.id || 0
      }
    }
    methods = {
      toggle () {
        console.log('toggle is running ....')
        this.categoryOpen = !this.categoryOpen
      },
      async changeCatgory (id = 0) {
        // 找到选中的分类
        this.currentCategory = id ? this.categories.find(category => category.id === id) : {}
        // 点击以后关闭下拉列表
        this.categoryOpen = false
        this.$apply()
        await this.getTopics(1, true)
      }
    }

我目前没有发现错误原因。。

@李山河
你看我吊吗啊
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
liyu001989
最佳答案

Please read error message

5年前 评论
讨论数量: 2
liyu001989

Please read error message

5年前 评论
你看我吊吗啊

@liyu001989 谢!昨五点多 找到原因了 ,是一个 结束标签 缺少了。。太隐蔽了

5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!