From 5f9fc7858fc1035a5374b41b79880002945c14c6 Mon Sep 17 00:00:00 2001 From: alan Date: Tue, 4 Jun 2019 11:38:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=AD=A3=E4=B8=8D?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E7=9A=84=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.ts | 1 - src/app/status/link_status.ts | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/app.ts b/src/app/app.ts index 678d9be..d198418 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -39,7 +39,6 @@ const Widget = BI.inherit(BI.Widget, { }, { el: { type: linkStatus, - invisible: true, }, left: 10, top: 10, diff --git a/src/app/status/link_status.ts b/src/app/status/link_status.ts index 12b6503..bf50a07 100644 --- a/src/app/status/link_status.ts +++ b/src/app/status/link_status.ts @@ -1,4 +1,4 @@ -import {WidgetType, Htape, Vtape, Left, Label, VerticalAdapt} from '@ui'; +import {WidgetType, Htape, Vtape, Label, VerticalAdapt} from '@ui'; import linkStatusModel from './link_status.model'; import LeftList from './left/left'; import Right from './right/right'; @@ -14,12 +14,16 @@ const Widget: WidgetType = { }, watch: { tab(tab: string) { - this.setVisible(tab === TAB_LINK_POOL); + this.linkStatus.setVisible(tab === TAB_LINK_POOL); }, }, render() { return { type: Htape, + invisible: true, + ref: _ref => { + this.linkStatus = _ref; + }, items: [{ el: { type: Vtape,