app-menu-portlet.tsx 818 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
import { AppMenuPortletController } from '@ibiz-template/controller';
import { AppMenuPortletModel } from '@ibiz-template/model';
import { useNamespace } from '@ibiz-template/vue-util';
import { defineComponent } from 'vue';

export const AppMenuPortlet = defineComponent({
  name: 'AppMenuPortlet',
  props: {
    modelData: {
      type: AppMenuPortletModel,
      required: true,
    },
    controller: {
      type: AppMenuPortletController,
      required: true,
    },
  },
  setup() {
    const ns = useNamespace('app-menu-portlet');
    return { ns };
  },
  render() {
    const classArr: string[] = [
      this.ns.b(),
      this.ns.m(this.modelData.modelClass),
    ];
    return (
28 29 30
      <portlet-layout controller={this.controller} class={classArr}>
        菜单
      </portlet-layout>
31 32 33
    );
  },
});