美文网首页
umy-ui表格错位,vue封装

umy-ui表格错位,vue封装

作者: 时间_7436 | 来源:发表于2022-07-11 17:45 被阅读0次
<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>

相关文章

网友评论

      本文标题:umy-ui表格错位,vue封装

      本文链接:https://www.haomeiwen.com/subject/dabnbrtx.html