Browse Source

refactor: 修正不规范的写法

qufenxi
alan 6 years ago
parent
commit
00556ad4b5
  1. 7
      src/app/connection/left/item/left_item.ts
  2. 4
      src/app/connection/left/item/left_item_delete.ts
  3. 4
      src/app/connection/left/item/left_item_icon.ts
  4. 2
      src/app/connection/more/item/more_link_item.ts
  5. 5
      src/app/connection/more/more_link.ts
  6. 1
      src/app/connection/right/right_title/right_title.ts
  7. 1
      src/app/connection/select/select.ts
  8. 1
      src/app/status/left/left_item.ts
  9. 31
      src/app/status/right/right.ts
  10. 10
      src/app/status/right/right_card.ts

7
src/app/connection/left/item/left_item.ts

@ -20,21 +20,18 @@ const Widget: WidgetType = {
return { return {
type: LeftRightVerticalAdapt, type: LeftRightVerticalAdapt,
height: 24,
items: { items: {
left: [ left: [
{ {
type: Icon, type: Icon,
cls: 'dcm-link-font', cls: 'dcm-link-font',
height: 24, height: 25,
width: 26, width: 25,
text: BI.i18nText('Dec-Dcm_Connections'), text: BI.i18nText('Dec-Dcm_Connections'),
title, title,
}, },
{ {
type: TextButton, type: TextButton,
textHeight: 24,
textAlign: 'left',
text: title, text: title,
title, title,
}, },

4
src/app/connection/left/item/left_item_delete.ts

@ -19,8 +19,8 @@ const Widget: WidgetType = {
}, },
el: { el: {
type: Icon, type: Icon,
height: 24, height: 25,
width: 26, width: 25,
title, title,
}, },
popup: { popup: {

4
src/app/connection/left/item/left_item_icon.ts

@ -11,8 +11,8 @@ const Widget: WidgetType = {
return { return {
type: IconButton, type: IconButton,
height: 24, height: 25,
width: 26, width: 25,
stopPropagation: true, stopPropagation: true,
title, title,
handler: () => { handler: () => {

2
src/app/connection/more/item/more_link_item.ts

@ -1,5 +1,5 @@
import './more_link_item.less'; 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'; import ModelName from './more_link_litem.model';
const className = 'dec.dcm.component.linkSet.morelink.item'; const className = 'dec.dcm.component.linkSet.morelink.item';

5
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 {DATA_BASE_TYPE_OTHER} from '@private/constants';
import MoreLinkItem from './item/more_link_item'; import MoreLinkItem from './item/more_link_item';
import ModelName from './more_link.model'; import ModelName from './more_link.model';
@ -13,7 +13,7 @@ const Widget: WidgetType = {
items: [ items: [
{ {
el: { el: {
type: Vertical, type: VerticalAdapt,
items: [{ items: [{
type: SearchEditor, type: SearchEditor,
width: 300, width: 300,
@ -25,7 +25,6 @@ const Widget: WidgetType = {
{ {
type: Left, type: Left,
scrolly: true, scrolly: true,
width: 528,
tgap: 2, tgap: 2,
rgap: 2, rgap: 2,
bgap: 2, bgap: 2,

1
src/app/connection/right/right_title/right_title.ts

@ -25,7 +25,6 @@ const Widget: WidgetType = {
type: Label, type: Label,
cls: 'bi-font-bold', cls: 'bi-font-bold',
hgap: 10, hgap: 10,
textHeight: 40,
text: `${BI.i18nText('Dec-Dcm_Data_Connections')}(${title ? title : BI.i18nText('Dec-Dcm_Default')})`, text: `${BI.i18nText('Dec-Dcm_Data_Connections')}(${title ? title : BI.i18nText('Dec-Dcm_Default')})`,
}, },
], ],

1
src/app/connection/select/select.ts

@ -16,7 +16,6 @@ const Widget: WidgetType = {
el: { el: {
type: 'bi.button', type: 'bi.button',
text: BI.i18nText('Dec-Dcm_Connection_New'), text: BI.i18nText('Dec-Dcm_Connection_New'),
height: 24,
}, },
popup: { popup: {
el: { el: {

1
src/app/status/left/left_item.ts

@ -22,7 +22,6 @@ const Widget: WidgetType = {
{ {
type: TextButton, type: TextButton,
cls: 'link-title', cls: 'link-title',
textHeight: 30,
lgap: 10, lgap: 10,
textAlign: 'left', textAlign: 'left',
text: title, text: title,

31
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 Model from './right.model';
import {info} from '@shared/crud/crud.request'; import {info} from '@shared/crud/crud.request';
import RightCard from './right_card'; import RightCard from './right_card';
@ -32,24 +32,25 @@ const Widget: WidgetType = {
}, },
render() { render() {
return { return {
type: Vertical, type: Vtape,
items: [ items: [
{ {
type: VerticalAdapt, el: {
cls: 'bi-border-bottom', type: VerticalAdapt,
height: 40, cls: 'bi-border-bottom',
items: [ items: [
{ {
type: Label, type: Label,
cls: 'bi-font-bold', cls: 'bi-font-bold',
textHeight: 40, lgap: 10,
lgap: 10, text: BI.i18nText('Dec-Dcm_Data_Connections'),
text: BI.i18nText('Dec-Dcm_Data_Connections'), },
],
ref: _ref => {
this.statusTitle = _ref;
}, },
],
ref: _ref => {
this.statusTitle = _ref;
}, },
height: 40,
}, { }, {
type: ListView, type: ListView,
cls: 'right-status-body', cls: 'right-status-body',

10
src/app/status/right/right_card.ts

@ -16,7 +16,6 @@ const Widget: WidgetType = {
{ {
type: Vertical, type: Vertical,
cls: 'bi-background', cls: 'bi-background',
height: 150,
items: [ items: [
{ {
type: CenterAdapt, type: CenterAdapt,
@ -29,17 +28,14 @@ const Widget: WidgetType = {
{ {
type: Label, type: Label,
cls: 'bi-high-light card-font-success', cls: 'bi-high-light card-font-success',
textHeight: 40,
text: numActive, text: numActive,
}, },
{ {
type: Label, type: Label,
textHeight: 40,
text: '/', text: '/',
}, },
{ {
type: Label, type: Label,
textHeight: 40,
text: maxActive, text: maxActive,
}, },
], ],
@ -48,7 +44,6 @@ const Widget: WidgetType = {
}, },
{ {
type: Label, type: Label,
height: 20,
text: BI.i18nText('Dec-Dcm_Active_Connections_Number'), text: BI.i18nText('Dec-Dcm_Active_Connections_Number'),
}, },
], ],
@ -56,7 +51,6 @@ const Widget: WidgetType = {
{ {
type: Vertical, type: Vertical,
cls: 'bi-background', cls: 'bi-background',
height: 150,
items: [ items: [
{ {
type: CenterAdapt, type: CenterAdapt,
@ -69,17 +63,14 @@ const Widget: WidgetType = {
{ {
type: Label, type: Label,
cls: 'bi-high-light card-font-heighlight', cls: 'bi-high-light card-font-heighlight',
textHeight: 40,
text: numIdle, text: numIdle,
}, },
{ {
type: Label, type: Label,
textHeight: 40,
text: '/', text: '/',
}, },
{ {
type: Label, type: Label,
textHeight: 40,
text: maxIdle, text: maxIdle,
}, },
], ],
@ -88,7 +79,6 @@ const Widget: WidgetType = {
}, },
{ {
type: Label, type: Label,
height: 20,
text: BI.i18nText('Dec-Dcm_Leisure_Connections_Number'), text: BI.i18nText('Dec-Dcm_Leisure_Connections_Number'),
}, },
], ],

Loading…
Cancel
Save