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

Revert "编辑视图部件视图订阅销毁"

This reverts commit 34f7c6af.
上级 34f7c6af
...@@ -2,25 +2,17 @@ ...@@ -2,25 +2,17 @@
<#assign self_content> <#assign self_content>
/** /**
* 面板通知对象 * 面板定于对象
* *
* @type {Subject<ViewState>} * @type {Subject<ViewState>}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
@Prop() public panelState ?:Subject<ViewState>; @Prop() public panelState ?:Subject<ViewState>;
/**
* 面板订阅对象
*
* @type {Subject<ViewState>}
* @memberof ${srfclassname('${view.name}')}Base
*/
public panelStateEvent: Subscription | undefined;
</#assign> </#assign>
<#-- 附加生命周期内容 --> <#-- 附加生命周期内容 -->
<#assign created_block> <#assign created_block>
if (this.panelState) { if (this.panelState) {
this.panelStateEvent.subscribe((res: any) => { this.panelState.subscribe((res: any) => {
if (Object.is(res.tag, 'meditviewpanel')) { if (Object.is(res.tag, 'meditviewpanel')) {
if (Object.is(res.action, 'save')) { if (Object.is(res.action, 'save')) {
this.viewState.next({ tag: 'form', action: 'save', data: res.data }); this.viewState.next({ tag: 'form', action: 'save', data: res.data });
...@@ -33,8 +25,8 @@ ...@@ -33,8 +25,8 @@
} }
</#assign> </#assign>
<#assign destroyed_block> <#assign destroyed_block>
if (this.panelStateEvent) { if (this.panelState) {
this.panelStateEvent.unsubscribe(); this.panelState.unsubscribe();
} }
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册