收藏
回答

在组件中调用wx.createSelectorQuery().为null

    onEditorReady() {

      const  that = this;

      wx.createSelectorQuery().select('#editor').context(function (res) {

        that.editorCtx = res.context;

        res.context.setContents({

          html: that.data.value

        })

      }).exec()


    },

    imageOnLoad: function(e) {

      var that = this;


      wx.createSelectorQuery().in(this).select(".classTaskDetail").boundingClientRect(function(e) {

        if (e) {

          that.setData({

            height: e.height.toFixed(0)

          });

        }

      }).exec();

    },

请问下怎么才能正确获取,


回答关注问题邀请回答
收藏

3 个回答

登录 后发表内容