slot 传递

import Table from "iview/src/components/table";
export default {
  name: "my-table2"
  data() {
    return {
      editor: null
    };
  },
  methods: {
    init() {
      console.log("-------------------MyTable loaded!--------------------");
    }
  },
  watch: {},
  mounted() {
    this.init();
  },
  render(h) {
    return (
      <div>
        <div class="toolbar">wo shi gonjulan</div>
        <Table
          {...{ props: this.$attrson: this.$listeners }} scopedSlots={ this.$scopedSlots }
        ></Table>
      </div>
    );
  }, 
}; 


猜你喜欢

转载自www.cnblogs.com/top10/p/12169336.html