From 00556ad4b540f205ebb9beff60a3c7253fefa9ce Mon Sep 17 00:00:00 2001 From: alan Date: Mon, 3 Jun 2019 14:38:46 +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/connection/left/item/left_item.ts | 7 ++--- .../connection/left/item/left_item_delete.ts | 4 +-- .../connection/left/item/left_item_icon.ts | 4 +-- .../connection/more/item/more_link_item.ts | 2 +- src/app/connection/more/more_link.ts | 5 ++- .../right/right_title/right_title.ts | 1 - src/app/connection/select/select.ts | 1 - src/app/status/left/left_item.ts | 1 - src/app/status/right/right.ts | 31 ++++++++++--------- src/app/status/right/right_card.ts | 10 ------ 10 files changed, 25 insertions(+), 41 deletions(-) diff --git a/src/app/connection/left/item/left_item.ts b/src/app/connection/left/item/left_item.ts index e4b7335..4e88046 100644 --- a/src/app/connection/left/item/left_item.ts +++ b/src/app/connection/left/item/left_item.ts @@ -20,21 +20,18 @@ const Widget: WidgetType = { return { type: LeftRightVerticalAdapt, - height: 24, items: { left: [ { type: Icon, cls: 'dcm-link-font', - height: 24, - width: 26, + height: 25, + width: 25, text: BI.i18nText('Dec-Dcm_Connections'), title, }, { type: TextButton, - textHeight: 24, - textAlign: 'left', text: title, title, }, diff --git a/src/app/connection/left/item/left_item_delete.ts b/src/app/connection/left/item/left_item_delete.ts index c21f9f8..ad56b54 100644 --- a/src/app/connection/left/item/left_item_delete.ts +++ b/src/app/connection/left/item/left_item_delete.ts @@ -19,8 +19,8 @@ const Widget: WidgetType = { }, el: { type: Icon, - height: 24, - width: 26, + height: 25, + width: 25, title, }, popup: { diff --git a/src/app/connection/left/item/left_item_icon.ts b/src/app/connection/left/item/left_item_icon.ts index a597f02..d16ed76 100644 --- a/src/app/connection/left/item/left_item_icon.ts +++ b/src/app/connection/left/item/left_item_icon.ts @@ -11,8 +11,8 @@ const Widget: WidgetType = { return { type: IconButton, - height: 24, - width: 26, + height: 25, + width: 25, stopPropagation: true, title, handler: () => { diff --git a/src/app/connection/more/item/more_link_item.ts b/src/app/connection/more/item/more_link_item.ts index e2da222..23c5628 100644 --- a/src/app/connection/more/item/more_link_item.ts +++ b/src/app/connection/more/item/more_link_item.ts @@ -1,5 +1,5 @@ import './more_link_item.less'; -import {WidgetType, Vertical, Img, Label, Layout, Absolute, Vtape} from '@ui/index'; +import {WidgetType, Img, Label, Layout, Absolute, Vtape} from '@ui/index'; import ModelName from './more_link_litem.model'; const className = 'dec.dcm.component.linkSet.morelink.item'; diff --git a/src/app/connection/more/more_link.ts b/src/app/connection/more/more_link.ts index b2ce288..4d21a1a 100644 --- a/src/app/connection/more/more_link.ts +++ b/src/app/connection/more/more_link.ts @@ -1,4 +1,4 @@ -import {WidgetType, Vertical, SearchEditor, Left, Vtape} from '@ui/index'; +import {WidgetType, SearchEditor, Left, Vtape, VerticalAdapt} from '@ui/index'; import {DATA_BASE_TYPE_OTHER} from '@private/constants'; import MoreLinkItem from './item/more_link_item'; import ModelName from './more_link.model'; @@ -13,7 +13,7 @@ const Widget: WidgetType = { items: [ { el: { - type: Vertical, + type: VerticalAdapt, items: [{ type: SearchEditor, width: 300, @@ -25,7 +25,6 @@ const Widget: WidgetType = { { type: Left, scrolly: true, - width: 528, tgap: 2, rgap: 2, bgap: 2, diff --git a/src/app/connection/right/right_title/right_title.ts b/src/app/connection/right/right_title/right_title.ts index a75c6f9..f3995f3 100644 --- a/src/app/connection/right/right_title/right_title.ts +++ b/src/app/connection/right/right_title/right_title.ts @@ -25,7 +25,6 @@ const Widget: WidgetType = { type: Label, cls: 'bi-font-bold', hgap: 10, - textHeight: 40, text: `${BI.i18nText('Dec-Dcm_Data_Connections')}(${title ? title : BI.i18nText('Dec-Dcm_Default')})`, }, ], diff --git a/src/app/connection/select/select.ts b/src/app/connection/select/select.ts index 22854c7..10dd883 100644 --- a/src/app/connection/select/select.ts +++ b/src/app/connection/select/select.ts @@ -16,7 +16,6 @@ const Widget: WidgetType = { el: { type: 'bi.button', text: BI.i18nText('Dec-Dcm_Connection_New'), - height: 24, }, popup: { el: { diff --git a/src/app/status/left/left_item.ts b/src/app/status/left/left_item.ts index 6ee3a49..0a4ee89 100644 --- a/src/app/status/left/left_item.ts +++ b/src/app/status/left/left_item.ts @@ -22,7 +22,6 @@ const Widget: WidgetType = { { type: TextButton, cls: 'link-title', - textHeight: 30, lgap: 10, textAlign: 'left', text: title, diff --git a/src/app/status/right/right.ts b/src/app/status/right/right.ts index 4c3d3ab..71c1cd9 100644 --- a/src/app/status/right/right.ts +++ b/src/app/status/right/right.ts @@ -1,4 +1,4 @@ -import {WidgetType, Vertical, Left, Label, ListView, VerticalAdapt} from '@ui/index'; +import {WidgetType, Label, ListView, VerticalAdapt, Vtape} from '@ui/index'; import Model from './right.model'; import {info} from '@shared/crud/crud.request'; import RightCard from './right_card'; @@ -32,24 +32,25 @@ const Widget: WidgetType = { }, render() { return { - type: Vertical, + type: Vtape, items: [ { - type: VerticalAdapt, - cls: 'bi-border-bottom', - height: 40, - items: [ - { - type: Label, - cls: 'bi-font-bold', - textHeight: 40, - lgap: 10, - text: BI.i18nText('Dec-Dcm_Data_Connections'), + el: { + type: VerticalAdapt, + cls: 'bi-border-bottom', + items: [ + { + type: Label, + cls: 'bi-font-bold', + lgap: 10, + text: BI.i18nText('Dec-Dcm_Data_Connections'), + }, + ], + ref: _ref => { + this.statusTitle = _ref; }, - ], - ref: _ref => { - this.statusTitle = _ref; }, + height: 40, }, { type: ListView, cls: 'right-status-body', diff --git a/src/app/status/right/right_card.ts b/src/app/status/right/right_card.ts index 1cdb719..3894c95 100644 --- a/src/app/status/right/right_card.ts +++ b/src/app/status/right/right_card.ts @@ -16,7 +16,6 @@ const Widget: WidgetType = { { type: Vertical, cls: 'bi-background', - height: 150, items: [ { type: CenterAdapt, @@ -29,17 +28,14 @@ const Widget: WidgetType = { { type: Label, cls: 'bi-high-light card-font-success', - textHeight: 40, text: numActive, }, { type: Label, - textHeight: 40, text: '/', }, { type: Label, - textHeight: 40, text: maxActive, }, ], @@ -48,7 +44,6 @@ const Widget: WidgetType = { }, { type: Label, - height: 20, text: BI.i18nText('Dec-Dcm_Active_Connections_Number'), }, ], @@ -56,7 +51,6 @@ const Widget: WidgetType = { { type: Vertical, cls: 'bi-background', - height: 150, items: [ { type: CenterAdapt, @@ -69,17 +63,14 @@ const Widget: WidgetType = { { type: Label, cls: 'bi-high-light card-font-heighlight', - textHeight: 40, text: numIdle, }, { type: Label, - textHeight: 40, text: '/', }, { type: Label, - textHeight: 40, text: maxIdle, }, ], @@ -88,7 +79,6 @@ const Widget: WidgetType = { }, { type: Label, - height: 20, text: BI.i18nText('Dec-Dcm_Leisure_Connections_Number'), }, ],