提交 bacb3854 编写于 作者: KK's avatar KK

部件基类

上级 8fbf550a
......@@ -4,6 +4,7 @@ import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import GlobalUiService from '@/global-ui-service/global-ui-service';
import { ControlBase } from '@ibiz-core'
<#if appde??>
import ${srfclassname('${appde.getCodeName()}')}Service from '@/app-core/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service';
import ${srfclassname('${ctrl.codeName}')}Service from '@/app-core/ctrl-service/${srffilepath2(appde.getCodeName())}/${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-service';
......@@ -21,57 +22,7 @@ import ${srfclassname('${ctrl.codeName}')}Service from '@/app-core/ctrl-service/
components: {
}
})
export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected name?: string;
/**
* 视图名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected viewName!: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: {} }) protected context?: any;
/**
* 视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: {} }) protected viewparams?: any;
/**
* 视图状态事件
*
* @protected
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected viewStateEvent: Subscription | undefined;
export default class ${srfclassname('${ctrl.codeName}')}Base extends ControlBase implements ControlInterface {
/**
* 获取部件类型
......@@ -83,14 +34,6 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
return '${ctrl.getControlType()}'
}
/**
* 全局 ui 服务
*
* @type {GlobalUiService}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected globaluiservice: GlobalUiService = new GlobalUiService();
/**
* 建构部件服务对象
*
......@@ -153,13 +96,3 @@ ${P.getLogicCode(logic, "LOGIC.vue").code}
</#list>
</#if>
/**
* 关闭视图
*
* @param {any[]} args
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected closeView(args: any[]): void {
let _this: any = this;
_this.$emit('closeview', args);
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册