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

Revert "部件基类"

This reverts commit bacb3854.
上级 4ee7f697
......@@ -4,7 +4,6 @@ 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';
......@@ -22,7 +21,57 @@ import ${srfclassname('${ctrl.codeName}')}Service from '@/app-core/ctrl-service/
components: {
}
})
export default class ${srfclassname('${ctrl.codeName}')}Base extends ControlBase implements ControlInterface {
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;
/**
* 获取部件类型
......@@ -34,6 +83,14 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends ControlBase
return '${ctrl.getControlType()}'
}
/**
* 全局 ui 服务
*
* @type {GlobalUiService}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected globaluiservice: GlobalUiService = new GlobalUiService();
/**
* 建构部件服务对象
*
......@@ -96,3 +153,13 @@ ${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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册