Vue3监听ElementUI的table的滚动事件

onMounted(() => {
      console.log(
        priceTable.value.layout.table,
        "priceTable.value.bodyWrapper"
      );
      let table = priceTable.value.layout.table.refs.bodyWrapper;
      table.addEventListener(
        "scroll",
        () => {
          methods.handleScroll();
        },
        true
      );
});

let methods = {
      handleScroll() {
        console.log(111);
      },
};

你可能感兴趣的:(javascript,elementui,vue.js,javascript)