umy-ui表格错位,vue封装

2022-07-11  本文已影响0人  时间_7436
<script>
import { UTable as umyuiTable } from 'umy-ui';
export default {
  methods: {
    ...umyuiTable.methods
  },
  mixins: umyuiTable.mixins,
  watch: {
    "data" (val) {
      this.$nextTick(() => {//修复表格错位
        this.$refs.singleTable && this.$refs.singleTable.doLayout()
      })
    }
  },
  render (h) {
    let { data, $attrs: attrs, $props: props, $listeners: on, $scopedSlots: scopedSlots, } = this
    return h(umyuiTable, { attrs, props, on, ref: 'singleTable' }, [this.$slots.default])
},
 };
</script>
上一篇 下一篇

猜你喜欢

热点阅读