Browse Source

refactor: 去掉 extraCls

qufenxi
alan 6 years ago
parent
commit
976895cbd8
  1. 5
      src/app/connection/left/item/left_item.ts
  2. 3
      src/app/connection/left/item/left_item_icon.ts
  3. 2
      src/app/status/left/left.ts
  4. 5
      src/app/status/left/left_item.ts
  5. 1
      src/demo/plugin.tedis.pool.ts

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

@ -13,13 +13,12 @@ const Widget: WidgetType = {
return BI.Models.getModel(Model); return BI.Models.getModel(Model);
}, },
render() { render() {
const {title, extraCls, creator, text, id} = this.options; const {title, cls, creator, text, id} = this.options;
return { return {
type: LeftRightVerticalAdapt, type: LeftRightVerticalAdapt,
cls: 'link-item cursor-pointer', cls: `link-item cursor-pointer ${cls}`,
height: 24, height: 24,
extraCls,
items: { items: {
left: [ left: [
{ {

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

@ -63,8 +63,7 @@ const Widget: WidgetType = {
return { return {
type: IconButton, type: IconButton,
cls, cls: `action-icon ${cls}`,
extraCls: 'action-icon',
height: 24, height: 24,
width: 26, width: 26,
title, title,

2
src/app/status/left/left.ts

@ -32,7 +32,7 @@ const Widget: WidgetType = {
return BI.map(linkList, (index: number, item: LinkType) => { return BI.map(linkList, (index: number, item: LinkType) => {
return { return {
type: LeftItem, type: LeftItem,
extraCls: item.connectionName === selectTitle ? 'left-item-selected' : '', cls: item.connectionName === selectTitle ? 'left-item-selected' : '',
title: item.connectionName, title: item.connectionName,
id: item.connectionId, id: item.connectionId,
creator: item.creator, creator: item.creator,

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

@ -11,13 +11,12 @@ const Widget: WidgetType = {
return BI.Models.getModel(Model); return BI.Models.getModel(Model);
}, },
render() { render() {
const {title, extraCls} = this.options; const {title, cls} = this.options;
return { return {
type: Left, type: Left,
cls: 'left-item cursor-pointer', cls: `left-item cursor-pointer ${cls}`,
height: 30, height: 30,
extraCls,
items: [ items: [
{ {
type: TextButton, type: TextButton,

1
src/demo/plugin.tedis.pool.ts

@ -22,7 +22,6 @@ const WidgetPool = BI.inherit(BI.Widget, {
{ {
type: 'bi.label', type: 'bi.label',
cls: 'right-status-text', cls: 'right-status-text',
extraCls: 'card-font1',
text: numActive, text: numActive,
}, },
{ {

Loading…
Cancel
Save