Browse Source

refactor: 修正不规范的写法

qufenxi
alan 6 years ago
parent
commit
5f9fc7858f
  1. 1
      src/app/app.ts
  2. 8
      src/app/status/link_status.ts

1
src/app/app.ts

@ -39,7 +39,6 @@ const Widget = BI.inherit(BI.Widget, {
}, { }, {
el: { el: {
type: linkStatus, type: linkStatus,
invisible: true,
}, },
left: 10, left: 10,
top: 10, top: 10,

8
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 linkStatusModel from './link_status.model';
import LeftList from './left/left'; import LeftList from './left/left';
import Right from './right/right'; import Right from './right/right';
@ -14,12 +14,16 @@ const Widget: WidgetType = {
}, },
watch: { watch: {
tab(tab: string) { tab(tab: string) {
this.setVisible(tab === TAB_LINK_POOL); this.linkStatus.setVisible(tab === TAB_LINK_POOL);
}, },
}, },
render() { render() {
return { return {
type: Htape, type: Htape,
invisible: true,
ref: _ref => {
this.linkStatus = _ref;
},
items: [{ items: [{
el: { el: {
type: Vtape, type: Vtape,

Loading…
Cancel
Save