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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { Prop, Component } from 'vue-property-decorator';
import { IPSAppDETabExplorerView } from "@ibiz/dynamic-model-api";
import { AppDefaultViewLayout } from "../app-default-view-layout/app-default-view-layout";
@Component({})
export class AppDefaultTabExpViewLayout extends AppDefaultViewLayout {
/**
* 实体分页导航视图模型对象
*
* @type {IPSAppDETabExplorerView}
* @memberof AppDefaultTabExpViewLayout
*/
@Prop() public declare viewInstance: IPSAppDETabExplorerView;
/**
* 引擎初始化
*
* @param {*} [opts={}]
* @memberof AppDefaultTabExpViewLayout
*/
public engineInit(opts: any = {}) {
let engineOpts = Object.assign({
view: this,
p2k: '0',
isLoadDefault: this.viewInstance?.loadDefault,
keyPSDEField: this.appDeCodeName.toLowerCase(),
majorPSDEField: this.appDeMajorFieldName.toLowerCase()
}, opts);
this.engine.init(engineOpts);
}
/**
* 绘制头部内容
*
* @memberof AppDefaultViewLayout
*/
public renderViewHeader(): any {
const offset ={
root: this.$parent,
gap: 8,
targetClass: 'ivu-tabs-bar',
}
return [
<div class="view-header__left">
{this.showCaption ? <div class="view-header__left__caption" v-tab-offset={offset}>{this.renderViewCaption()}</div> : null}
</div>,
this.viewIsshowToolbar && this.$slots.toolbar ? <div class="view-header__right">
<div class="view-header__right__toolbar">{this.$slots.toolbar}</div>
</div> : null
]
}
}