1***@qq.com
1***@qq.com
  • 发布:2020-06-16 11:42
  • 更新:2021-10-13 14:49
  • 阅读:1891

Cannot read property 'getDataset' of null

分类:ASK社区

index.umd.min.js?1c31:1 [system] TypeError: Cannot read property 'getDataset' of null
at Object.touchend (index.wxs?8e36:70)
at touchend (uni-swipe-action-item.vue?2fef:36)
at invokeWithErrorHandling (vue.runtime.esm.js?e143:1865)
at HTMLElement.invoker (vue.runtime.esm.js?e143:2190)
at HTMLElement.original._wrapper (vue.runtime.esm.js?e143:7077)
eval @ index.umd.min.js?1c31:1
Array.isArray.e.onError.length.e.onError @ index.umd.min.js?1c31:1
invokeWithErrorHandling @ vue.runtime.esm.js?e143:1865
Vue.__call_hook @ vue.runtime.esm.js?e143:8615
e.config.errorHandler @ index.umd.min.js?1c31:1
globalHandleError @ vue.runtime.esm.js?e143:1881
handleError @ vue.runtime.esm.js?e143:1850
invokeWithErrorHandling @ vue.runtime.esm.js?e143:1873
invoker @ vue.runtime.esm.js?e143:2190
original._wrapper @ vue.runtime.esm.js?e143:7077

2020-06-16 11:42 负责人:无 分享
已邀请:
9***@qq.com

9***@qq.com

我遇到了getDataset 报错,排查是因为uniapp的uni-swipe-action动画未结束前我做了dom删除操作,该动画可能找不到节点报错,最后加了判断等动画结束再做删除操作就好了

  • 7***@qq.com

    请问,判断动画结束是怎么操作的?


    2021-06-29 15:20

  • 9***@qq.com

    回复 7***@qq.com: 看api一般一个动作结束后都会有状态值变化,我这个是左滑效果,随手写的比较冗余 (实在不行就加个延时判断就是了)


    //左右滑动触发


    swipeChange(e,index){


    //状态,当删除按钮关闭后 真实删除


    var _this = this


    if(e=='none'){


    _this.deleteItem = 1


    }else{


    _this.deleteItem = 0


    }


    },


    //循环判断状态是否改变


    var myVar = setInterval(function(){


    if(_this.deleteItem==1){


    }


    }


    2021-06-29 15:54

  • 7***@qq.com

    回复 9***@qq.com: ok,谢谢谢谢


    2021-06-29 16:53

w***@163.com

w***@163.com

遇到同样问题有解决吗

热心市民夏某某

热心市民夏某某

我也遇到了这个问题

w***@foxmail.com

w***@foxmail.com

我也遇到了,有人解决吗?

H欽H

H欽H

遇到相同的错误提示,具体操作是使用splice删除其中一条数据后出现的错误,请问有什么解决方法??

  • H欽H

    使用官网的方法,就没有出现错误提示了:

    if (content.text === '删除') {

    uni.showModal({

    title: '提示',

    content: '是否删除',

    success: res => {

    if (res.confirm) {

    this.swipeList.splice(index, 1);

    } else if (res.cancel) {

    console.log('用户点击取消');

    }

    }

    });

    }


    2021-10-13 15:10

该问题目前已经被锁定, 无法添加新回复