diff --git a/bi/base.css b/bi/base.css index f423941b2..8a57a0a64 100644 --- a/bi/base.css +++ b/bi/base.css @@ -678,8 +678,13 @@ li.CodeMirror-hint-active { overflow: hidden; overflow-x: hidden; overflow-y: hidden; + background: #ffffff; + border-right: 1px solid #d4dadd; + border-top: 1px solid #d4dadd; + border-bottom: 1px solid #d4dadd; } .bi-segment > .first-element { + border-left: 1px solid #d4dadd; -webkit-border-radius: 6px 0px 0px 6px; -moz-border-radius: 6px 0px 0px 6px; border-radius: 6px 0px 0px 6px; @@ -689,6 +694,18 @@ li.CodeMirror-hint-active { -moz-border-radius: 0px 6px 6px 0px; border-radius: 0px 6px 6px 0px; } +.bi-theme-dark .bi-segment > .center-element { + overflow: hidden; + overflow-x: hidden; + overflow-y: hidden; + background: #242640; + border-right: 1px solid #525466; + border-top: 1px solid #525466; + border-bottom: 1px solid #525466; +} +.bi-theme-dark .bi-segment > .first-element { + border-left: 1px solid #242640; +} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/bi/case.js b/bi/case.js index 41a27538c..d5d9092aa 100644 --- a/bi/case.js +++ b/bi/case.js @@ -8804,15 +8804,10 @@ BI.Segment = BI.inherit(BI.Widget, { this.buttonGroup = BI.createWidget({ element: this, type: "bi.button_group", - items: BI.map(o.items, function (i, item) { - return BI.extend({ - type: "bi.segment_button", - height: o.height - 2, - whiteSpace: o.whiteSpace - }, item, { - cls: (i === 0 ? "bi-border-left " : "") - + (item.cls || "") + " bi-border-top bi-border-right bi-border-bottom" - }); + items: BI.createItems(o.items, { + type: "bi.segment_button", + height: o.height - 2, + whiteSpace: o.whiteSpace }), layout: [ { diff --git a/bi/core.js b/bi/core.js index db3206894..da9046cb6 100644 --- a/bi/core.js +++ b/bi/core.js @@ -6169,19 +6169,19 @@ Date._DN = [BI.i18nText("BI-Basic_Sunday"), BI.i18nText("BI-Basic_Sunday")]; // short day names -Date._SDN = [BI.i18nText("BI-Day_Ri"), +Date._SDN = [BI.i18nText("BI-Date_Day"), BI.i18nText("BI-Basic_One"), BI.i18nText("BI-Basic_Two"), BI.i18nText("BI-Basic_Three"), BI.i18nText("BI-Basic_Four"), BI.i18nText("BI-Basic_Five"), BI.i18nText("BI-Basic_Six"), - BI.i18nText("BI-Day_Ri")]; + BI.i18nText("BI-Date_Day")]; // Monday first, etc. Date._FD = 1; -// full month names +// full month namesdat Date._MN = [ BI.i18nText("BI-Basic_January"), BI.i18nText("BI-Basic_February"), diff --git a/docs/base.css b/docs/base.css index f423941b2..8a57a0a64 100644 --- a/docs/base.css +++ b/docs/base.css @@ -678,8 +678,13 @@ li.CodeMirror-hint-active { overflow: hidden; overflow-x: hidden; overflow-y: hidden; + background: #ffffff; + border-right: 1px solid #d4dadd; + border-top: 1px solid #d4dadd; + border-bottom: 1px solid #d4dadd; } .bi-segment > .first-element { + border-left: 1px solid #d4dadd; -webkit-border-radius: 6px 0px 0px 6px; -moz-border-radius: 6px 0px 0px 6px; border-radius: 6px 0px 0px 6px; @@ -689,6 +694,18 @@ li.CodeMirror-hint-active { -moz-border-radius: 0px 6px 6px 0px; border-radius: 0px 6px 6px 0px; } +.bi-theme-dark .bi-segment > .center-element { + overflow: hidden; + overflow-x: hidden; + overflow-y: hidden; + background: #242640; + border-right: 1px solid #525466; + border-top: 1px solid #525466; + border-bottom: 1px solid #525466; +} +.bi-theme-dark .bi-segment > .first-element { + border-left: 1px solid #242640; +} /****添加计算宽度的--运算符直接需要space****/ /****** common color(常用颜色,可用于普遍场景) *****/ /**** custom color(自定义颜色,用于特定场景) ****/ diff --git a/docs/case.js b/docs/case.js index 41a27538c..d5d9092aa 100644 --- a/docs/case.js +++ b/docs/case.js @@ -8804,15 +8804,10 @@ BI.Segment = BI.inherit(BI.Widget, { this.buttonGroup = BI.createWidget({ element: this, type: "bi.button_group", - items: BI.map(o.items, function (i, item) { - return BI.extend({ - type: "bi.segment_button", - height: o.height - 2, - whiteSpace: o.whiteSpace - }, item, { - cls: (i === 0 ? "bi-border-left " : "") - + (item.cls || "") + " bi-border-top bi-border-right bi-border-bottom" - }); + items: BI.createItems(o.items, { + type: "bi.segment_button", + height: o.height - 2, + whiteSpace: o.whiteSpace }), layout: [ { diff --git a/docs/core.js b/docs/core.js index d8367ba60..4b1e3f079 100644 --- a/docs/core.js +++ b/docs/core.js @@ -23645,19 +23645,19 @@ Date._DN = [BI.i18nText("BI-Basic_Sunday"), BI.i18nText("BI-Basic_Sunday")]; // short day names -Date._SDN = [BI.i18nText("BI-Day_Ri"), +Date._SDN = [BI.i18nText("BI-Date_Day"), BI.i18nText("BI-Basic_One"), BI.i18nText("BI-Basic_Two"), BI.i18nText("BI-Basic_Three"), BI.i18nText("BI-Basic_Four"), BI.i18nText("BI-Basic_Five"), BI.i18nText("BI-Basic_Six"), - BI.i18nText("BI-Day_Ri")]; + BI.i18nText("BI-Date_Day")]; // Monday first, etc. Date._FD = 1; -// full month names +// full month namesdat Date._MN = [ BI.i18nText("BI-Basic_January"), BI.i18nText("BI-Basic_February"), diff --git a/src/case/segment/segment.js b/src/case/segment/segment.js index 3fc3fabea..0979baaa0 100644 --- a/src/case/segment/segment.js +++ b/src/case/segment/segment.js @@ -19,15 +19,10 @@ BI.Segment = BI.inherit(BI.Widget, { this.buttonGroup = BI.createWidget({ element: this, type: "bi.button_group", - items: BI.map(o.items, function (i, item) { - return BI.extend({ - type: "bi.segment_button", - height: o.height - 2, - whiteSpace: o.whiteSpace - }, item, { - cls: (i === 0 ? "bi-border-left " : "") - + (item.cls || "") + " bi-border-top bi-border-right bi-border-bottom" - }); + items: BI.createItems(o.items, { + type: "bi.segment_button", + height: o.height - 2, + whiteSpace: o.whiteSpace }), layout: [ { diff --git a/src/core/proto/date.js b/src/core/proto/date.js index 8ccbe1e4d..72df18466 100644 --- a/src/core/proto/date.js +++ b/src/core/proto/date.js @@ -21,7 +21,7 @@ Date._SDN = [BI.i18nText("BI-Date_Day"), // Monday first, etc. Date._FD = 1; -// full month names +// full month namesdat Date._MN = [ BI.i18nText("BI-Basic_January"), BI.i18nText("BI-Basic_February"), diff --git a/src/css/base/segment/segment.css b/src/css/base/segment/segment.css index 7de4338bc..8aaa25a96 100644 --- a/src/css/base/segment/segment.css +++ b/src/css/base/segment/segment.css @@ -5,8 +5,13 @@ overflow: hidden; overflow-x: hidden; overflow-y: hidden; + background: #ffffff; + border-right: 1px solid #d4dadd; + border-top: 1px solid #d4dadd; + border-bottom: 1px solid #d4dadd; } .bi-segment > .first-element { + border-left: 1px solid #d4dadd; -webkit-border-radius: 6px 0px 0px 6px; -moz-border-radius: 6px 0px 0px 6px; border-radius: 6px 0px 0px 6px; @@ -16,3 +21,15 @@ -moz-border-radius: 0px 6px 6px 0px; border-radius: 0px 6px 6px 0px; } +.bi-theme-dark .bi-segment > .center-element { + overflow: hidden; + overflow-x: hidden; + overflow-y: hidden; + background: #242640; + border-right: 1px solid #525466; + border-top: 1px solid #525466; + border-bottom: 1px solid #525466; +} +.bi-theme-dark .bi-segment > .first-element { + border-left: 1px solid #242640; +} diff --git a/src/less/base/segment/segment.less b/src/less/base/segment/segment.less index 981a7426e..bbf0df435 100644 --- a/src/less/base/segment/segment.less +++ b/src/less/base/segment/segment.less @@ -3,11 +3,31 @@ .bi-segment{ & > .center-element{ .overflow-hidden(); + background: @color-bi-background-default; + border-right: 1px solid @color-bi-border-line; + border-top: 1px solid @color-bi-border-line; + border-bottom: 1px solid @color-bi-border-line; } & > .first-element{ + border-left: 1px solid @color-bi-border-line; .border-corner-radius(6px,0px,0px,6px) } & > .last-element{ .border-corner-radius(0px,6px,6px,0px) } +} + +.bi-theme-dark { + .bi-segment { + & > .center-element{ + .overflow-hidden(); + background: @color-bi-background-default-theme-dark; + border-right: 1px solid @color-bi-border-line-theme-dark; + border-top: 1px solid @color-bi-border-line-theme-dark; + border-bottom: 1px solid @color-bi-border-line-theme-dark; + } + & > .first-element{ + border-left: 1px solid @color-bi-background-default-theme-dark; + } + } } \ No newline at end of file