提交 3307e0a0 编写于 作者: Mosher's avatar Mosher

update:更新列表导航

上级 95261f88
import ViewEngine from './view-engine';
import { ExpViewEngine } from './exp-view-engine';
/**
* 列表导航视图界面引擎
......@@ -7,24 +7,7 @@ import ViewEngine from './view-engine';
* @class ListExpViewEngine
* @extends {ViewEngine}
*/
export default class ListExpViewEngine extends ViewEngine {
/**
* 列表导航栏部件
*
* @type {*}
* @memberof ListExpViewEngine
*/
public listExpBar: any = null;
/**
* Creates an instance of ListExpViewEngine.
*
* @memberof ListExpViewEngine
*/
constructor() {
super();
}
export class ListExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
......@@ -33,77 +16,17 @@ export default class ListExpViewEngine extends ViewEngine {
* @memberof ListExpViewEngine
*/
public init(options: any): void {
this.listExpBar = options.listexpbar;
this.expBar = options.listexpbar;
super.init(options);
}
/**
* 引擎加载
*
* @description 视图销毁
* @memberof ListExpViewEngine
*/
public load(): void {
super.load();
if (this.getListExpBar() && this.isLoadDefault) {
const tag = this.getListExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
public destroyed() {
super.destroyed();
this.expBar = null;
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof ListExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'listexpbar')) {
this.listExpBarEvent(eventName, args);
}
}
/**
* 列表导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof ListExpViewEngine
*/
public listExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof ListExpViewEngine
*/
public getListExpBar(): any {
return this.listExpBar;
}
/**
* @description 销毁
* @memberof ListExpViewEngine
*/
public destroy() {
super.destroy();
this.listExpBar = null;
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册