VIEW-BASE.vue.ftl 1.3 KB
Newer Older
ibizdev's avatar
ibizdev committed
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
<#--  视图独立定义的内容  -->
<#assign self_content>

    /**
     * 面板定于对象
     *
     * @type {Subject<ViewState>}
     * @memberof ${srfclassname('${view.name}')}Base
     */
    @Prop() public panelState ?:Subject<ViewState>;
</#assign>
<#--  附加生命周期内容  -->
<#assign created_block>
        if (this.panelState) {
            this.panelState.subscribe((res: any) => {
                if (Object.is(res.tag, 'meditviewpanel')) {
                    if (Object.is(res.action, 'save')) {
                        this.viewState.next({ tag: 'form', action: 'save', data: res.data });
                    }
                    if (Object.is(res.action, 'remove')) {
                        this.viewState.next({ tag: 'form', action: 'remove', data: res.data });
                    }
                }
            });
        }
</#assign>
<#assign destroyed_block>
        if (this.panelState) {
            this.panelState.unsubscribe();
        }
</#assign>
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>

<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>

<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>

<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>

<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>