import { PSSysViewPanelItem } from '@ibizstudio/api'; import { VueLifeCycleProcessing } from '@ibizstudio/dynamic-design'; import { Component, Prop } from 'vue-property-decorator'; import { Item } from '../../../../config/absolute-layout-material/item/item'; import { IPanelAbsoluteLayoutContext } from '../../../../interface/i-panel-absolute-layout-context'; import { AbsoluteLayoutMaterialPanelBase } from '../absolute-layout-material-panel-base'; import './absolute-layout-panel-item.less'; @Component @VueLifeCycleProcessing() export class AbsoluteLayoutPanelItem extends AbsoluteLayoutMaterialPanelBase { @Prop() ctx!: IPanelAbsoluteLayoutContext; /** * 获取可创建的项 * * @memberof AbsoluteLayoutPanelItem */ componentCreated(): void { for (const item in Item) { this.list.push({ text: Item[item].text, tooltip: Item[item].tooltip, iconcls: Item[item].iconcls, data: new PSSysViewPanelItem({ itemtype: item, srfmajortext: Item[item].text, }), }); } } /** * @description 组件销毁 * @memberof AbsoluteLayoutPanelItem */ componentDestroyed() { this.ctx.ctrl.destroy(); } }