From 39a0ea183eb7fccb343097934e14926bcdc207cd Mon Sep 17 00:00:00 2001 From: Treecat Date: Mon, 21 Nov 2022 13:47:52 +0800 Subject: [PATCH 01/29] =?UTF-8?q?REPORT-85040=20fix:=20=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=97=B6=E9=97=B4=E4=BC=9A=E8=B6=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/calendar/calendar.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/case/calendar/calendar.js b/src/case/calendar/calendar.js index 88ccf198a..0a9d40e05 100644 --- a/src/case/calendar/calendar.js +++ b/src/case/calendar/calendar.js @@ -156,13 +156,21 @@ BI.Calendar = BI.inherit(BI.Widget, { return BI.map(items, function (i, item) { return BI.map(item, function (j, td) { var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month); + var year = o.year; + if (month > 12) { + month = 1; + year++; + } else if (month < 1) { + month = 12; + year--; + } return BI.extend(td, { type: "bi.calendar_date_item", once: false, forceSelected: true, - value: o.year + "-" + month + "-" + td.text, + value: year + "-" + month + "-" + td.text, disabled: td.disabled, - cls: td.lastMonth || td.nextMonth ? "not-current-month-day": "", + cls: td.lastMonth || td.nextMonth ? "not-current-month-day" : "", lgap: 2, rgap: 2, tgap: 4, From 65626480c87c42538a60e2123fad9a1eeb7ff931 Mon Sep 17 00:00:00 2001 From: "Xavier.Meng" Date: Mon, 21 Nov 2022 14:52:57 +0800 Subject: [PATCH 02/29] =?UTF-8?q?=E6=97=A0JIRA=20refactor(TextValueCombo):?= =?UTF-8?q?=20=E8=A1=A5=E5=85=85=20ts=20=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/case/combo/combo.textvalue.ts | 7 ++++++- typescript/case/combo/popup.textvalue.ts | 13 +++++++++++++ typescript/index.ts | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 typescript/case/combo/popup.textvalue.ts diff --git a/typescript/case/combo/combo.textvalue.ts b/typescript/case/combo/combo.textvalue.ts index 0a50d2342..128ec03b6 100644 --- a/typescript/case/combo/combo.textvalue.ts +++ b/typescript/case/combo/combo.textvalue.ts @@ -5,5 +5,10 @@ export declare class TextValueCombo extends Widget { static EVENT_CHANGE: string; - populate(items: any): void; + clear(): void; + setText(text: string): void; + setValue(value: any): void; + setStatus(status: "success" | "warning" | "error"): void; + getValue(): any[]; + populate(items: any[]): void; } diff --git a/typescript/case/combo/popup.textvalue.ts b/typescript/case/combo/popup.textvalue.ts new file mode 100644 index 000000000..a3fe1b0d1 --- /dev/null +++ b/typescript/case/combo/popup.textvalue.ts @@ -0,0 +1,13 @@ +import { Pane } from "../../base/pane"; + +export declare class TextValueComboPopup extends Pane { + static xtype: string; + + static EVENT_CHANGE: string; + static EVENT_CLEAR: string; + static EVENT_CONFIRM: string; + + populate(items: any[]): void; + getValue(): any; + setValue(value: any): void; +} diff --git a/typescript/index.ts b/typescript/index.ts index a1b9831c9..cf63c604d 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -20,6 +20,7 @@ import { IconChangeButton } from "./case/button/icon/icon.change"; import { MultiSelectItem } from "./case/button/item.multiselect"; import { BubbleCombo } from "./case/combo/bubblecombo/combo.bubble"; import { TextValueCombo } from "./case/combo/combo.textvalue"; +import { TextValueComboPopup } from "./case/combo/popup.textvalue"; import { SmallTextValueCombo } from "./case/combo/combo.textvaluesmall"; import { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue"; import { SignEditor } from "./case/editor/editor.sign"; @@ -226,6 +227,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { ButtonGroup: typeof ButtonGroup; Combo: typeof Combo; TextValueCombo: typeof TextValueCombo; + TextValueComboPopup: typeof TextValueComboPopup; SmallTextValueCombo: typeof SmallTextValueCombo; BubbleCombo: typeof BubbleCombo; AllValueMultiTextValueCombo: typeof AllValueMultiTextValueCombo; @@ -464,6 +466,7 @@ export { MultiSelectBar, SelectList, TextValueCombo, + TextValueComboPopup, SmallTextValueCombo, Editor, IconLabel, From 987283972996eed0b1dbb702ea946ec76fdfc3b1 Mon Sep 17 00:00:00 2001 From: windy Date: Mon, 21 Nov 2022 17:25:32 +0800 Subject: [PATCH 03/29] =?UTF-8?q?BI-117325=20=E5=8F=AF=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/downlist/combo.downlist.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widget/downlist/combo.downlist.js b/src/widget/downlist/combo.downlist.js index 8b9aa4c0c..10c39bfbf 100644 --- a/src/widget/downlist/combo.downlist.js +++ b/src/widget/downlist/combo.downlist.js @@ -44,7 +44,8 @@ popup: {}, minWidth: 140, maxHeight: 1000, - destroyWhenHide: false + destroyWhenHide: false, + isDefaultInit: true, }); }, @@ -57,7 +58,7 @@ type: "bi.combo", trigger: o.trigger, isNeedAdjustWidth: false, - isDefaultInit: true, + isDefaultInit: o.isDefaultInit, container: o.container, adjustLength: o.adjustLength, direction: o.direction, From 4c7f40659a4d5f5d40c171cb07a6af011614762d Mon Sep 17 00:00:00 2001 From: data Date: Mon, 21 Nov 2022 19:06:10 +0800 Subject: [PATCH 04/29] auto upgrade version to 2.0.20221121190600 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 841972678..b54ae8401 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221117172352", + "version": "2.0.20221121190600", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 1ef4f7f406f0d8c40c883b8d4f0f4d23b50fccfc Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Nov 2022 10:46:04 +0800 Subject: [PATCH 05/29] auto upgrade version to 2.0.20221122104551 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b54ae8401..ba2ec6d6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221121190600", + "version": "2.0.20221122104551", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 28c8088f7c3963e1333ead12073180887c1acea6 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Nov 2022 11:36:26 +0800 Subject: [PATCH 06/29] auto upgrade version to 2.0.20221122113602 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ba2ec6d6a..042ef5ce3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221122104551", + "version": "2.0.20221122113602", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From aa7964abd8b6627e1e41dd0d9b703c3ec0f479cf Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Nov 2022 13:44:58 +0800 Subject: [PATCH 07/29] auto upgrade version to 2.0.20221122134446 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 042ef5ce3..8ff018e45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221122113602", + "version": "2.0.20221122134446", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From b719f7d34d195fe3cc506d07c154fe820658927e Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Nov 2022 14:16:02 +0800 Subject: [PATCH 08/29] auto upgrade version to 2.0.20221122141551 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ff018e45..e4cde1565 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221122134446", + "version": "2.0.20221122141551", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From c25f840f942f4cd3b1a3297e333374dd9dc4edb0 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Nov 2022 14:46:46 +0800 Subject: [PATCH 09/29] auto upgrade version to 2.0.20221122144609 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e4cde1565..99f620e2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221122141551", + "version": "2.0.20221122144609", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 2f8aa5d584bf0ed1c1e3788d259efcff03da76b6 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 22 Nov 2022 14:52:08 +0800 Subject: [PATCH 10/29] =?UTF-8?q?BI-117565=20fix:=20=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E6=83=85=E5=86=B5=E4=B8=8Bnumber-checker=E7=9A=84?= =?UTF-8?q?=E5=9C=86=E8=A7=92=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit W3C 对于重合曲线有这样的规范:如果两个相邻的角的半径和超过了对应的盒子的边的长度,那么浏览器要重新计算保证它们不会重合。 --- .../widget/multiselect/trigger/button.checkselected.less | 2 +- .../multitree/trigger/multi.tree.button.checkselected.less | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/less/widget/multiselect/trigger/button.checkselected.less b/src/less/widget/multiselect/trigger/button.checkselected.less index 4a36315b0..ded0da5eb 100644 --- a/src/less/widget/multiselect/trigger/button.checkselected.less +++ b/src/less/widget/multiselect/trigger/button.checkselected.less @@ -2,7 +2,7 @@ .bi-multi-select-check-selected-button { z-index: 1; - .border-radius(50%); + .border-radius(99999px); &:active { color: @color-bi-text-highlight; diff --git a/src/less/widget/multitree/trigger/multi.tree.button.checkselected.less b/src/less/widget/multitree/trigger/multi.tree.button.checkselected.less index 55207b67a..dd7fe2527 100644 --- a/src/less/widget/multitree/trigger/multi.tree.button.checkselected.less +++ b/src/less/widget/multitree/trigger/multi.tree.button.checkselected.less @@ -6,10 +6,11 @@ z-index: 1; } .trigger-check-text { - .border-radius(8px); + .border-radius(99999px); z-index: 1; + &:active { background-color: @color-bi-background-multi-select-trigger-check-selected; } } -} \ No newline at end of file +} From 2b4c5600dff49eed1d4effc6c3515fab77f79928 Mon Sep 17 00:00:00 2001 From: "Xavier.Meng" Date: Tue, 22 Nov 2022 17:09:33 +0800 Subject: [PATCH 11/29] =?UTF-8?q?=E6=97=A0JIRA=20refactor(each):=20?= =?UTF-8?q?=E5=8A=A0=E4=B8=AA=E9=87=8D=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index 6182a0833..4d6550f4f 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -38,7 +38,9 @@ export interface _base { size: (collection: any) => number; - each: (collection: T[] | object | string, callback?: ((index: number, value: T) => void) | object | string, thisArg?: any) => any; + each(collection: ArrayLike, iteratee?: (index: number, value: T) => void, thisArg?: any): ArrayLike; + each(collection: T, iteratee?: (index: K, value: T[K]) => void, thisArg?: any): T; + each(collection: T, iteratee?: any, thisArg?: any): T; map: (collection: T[] | object | string | null | undefined, callback?: ((index: number, value: T) => U) | object | string, thisArg?: any) => U[]; From 5c2ccee8b818da16de397e2b427e1e12f0d08680 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Nov 2022 17:25:58 +0800 Subject: [PATCH 12/29] auto upgrade version to 2.0.20221122172525 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 99f620e2d..09b179d9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221122144609", + "version": "2.0.20221122172525", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 715c07db5d3fbf96ab3c2bb4fe9d671dbaad7777 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Nov 2022 22:25:18 +0800 Subject: [PATCH 13/29] auto upgrade version to 2.0.20221122222501 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 09b179d9e..25a16e4fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221122172525", + "version": "2.0.20221122222501", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From ce6b828d9246ade1c79d2d7fc327b2a00dc111db Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 23 Nov 2022 10:36:31 +0800 Subject: [PATCH 14/29] =?UTF-8?q?=E6=97=A0JIRA=20feat:=20=E5=8A=A0?= =?UTF-8?q?=E4=B8=AA=E6=96=B9=E6=B3=95=20BI.getMinimumFontSize()=20?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=BD=93=E5=89=8D=E6=9C=80=E5=B0=8F=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/function.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/platform/web/function.js b/src/core/platform/web/function.js index 1c74836e2..47b6b9d39 100644 --- a/src/core/platform/web/function.js +++ b/src/core/platform/web/function.js @@ -137,5 +137,14 @@ BI._.extend(BI, { return version[1] * 1; } return 0; + }, + + getMinimumFontSize: function () { + const el = document.createElement('div'); + el.style.fontSize = "0px"; + document.body.appendChild(el); + const size = getComputedStyle(el).fontSize; + el.remove(); + return size; } }); From de13f33d440aff07f51082090b6f7cb74c508efd Mon Sep 17 00:00:00 2001 From: data Date: Wed, 23 Nov 2022 10:54:55 +0800 Subject: [PATCH 15/29] auto upgrade version to 2.0.20221123105406 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 25a16e4fe..5ee1f98d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221122222501", + "version": "2.0.20221123105406", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 997e307a9e4ccd6222c3b6b591a9510fdf6a99e0 Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 24 Nov 2022 15:54:15 +0800 Subject: [PATCH 16/29] =?UTF-8?q?=E6=97=A0JIRA=20feat:=20=E5=8A=A0?= =?UTF-8?q?=E4=B8=AA=E6=96=B9=E6=B3=95=20BI.getMinimumFontSize()=20?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=BD=93=E5=89=8D=E6=9C=80=E5=B0=8F=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/function.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/platform/web/function.js b/src/core/platform/web/function.js index 47b6b9d39..152933882 100644 --- a/src/core/platform/web/function.js +++ b/src/core/platform/web/function.js @@ -145,6 +145,6 @@ BI._.extend(BI, { document.body.appendChild(el); const size = getComputedStyle(el).fontSize; el.remove(); - return size; + return parseInt(size); } }); From 8114b75e2da64f336528d236de315a22bec28e38 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 24 Nov 2022 20:38:28 +0800 Subject: [PATCH 17/29] auto upgrade version to 2.0.20221124203811 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ee1f98d2..b194a1dc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221123105406", + "version": "2.0.20221124203811", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 3c7b5118d548a543e1b81c2d2ed02e24d19dbdb6 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 28 Nov 2022 10:16:37 +0800 Subject: [PATCH 18/29] auto upgrade version to 2.0.20221128101611 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b194a1dc2..fb398af51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221124203811", + "version": "2.0.20221128101611", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From dd3c91ff5566d747ed642bc9c1f576c78908895d Mon Sep 17 00:00:00 2001 From: data Date: Tue, 29 Nov 2022 15:24:58 +0800 Subject: [PATCH 19/29] auto upgrade version to 2.0.20221129152444 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb398af51..5db81c903 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221128101611", + "version": "2.0.20221129152444", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 87355e8689acf9d781377dccdb6a15143f95cbe6 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 29 Nov 2022 17:52:58 +0800 Subject: [PATCH 20/29] =?UTF-8?q?KERNEL-13662=20feat:=20text=5Fvalue=5Fcom?= =?UTF-8?q?bo=20=E5=A4=8D=E9=80=89,=E6=94=AF=E6=8C=81=E4=B8=8D=E5=B8=A6?= =?UTF-8?q?=E5=85=A8=E9=80=89=20-=20from=20Richie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/case/combo/demo.text_value_combo.js | 30 +-- .../combo/textvaluecombo/combo.textvalue.js | 4 +- .../combo/textvaluecombo/popup.textvalue.js | 185 +++++++++++------- 3 files changed, 136 insertions(+), 83 deletions(-) diff --git a/demo/js/case/combo/demo.text_value_combo.js b/demo/js/case/combo/demo.text_value_combo.js index 15df83c54..cf6b30feb 100644 --- a/demo/js/case/combo/demo.text_value_combo.js +++ b/demo/js/case/combo/demo.text_value_combo.js @@ -8,19 +8,21 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { render: function () { var combo1, combo2; - var items = [{ - text: "MVC-1", - iconCls: "date-font", - value: 1 - }, { - text: "MVC-2", - iconCls: "search-font", - value: 2 - }, { - text: "MVC-3", - iconCls: "pull-right-font", - value: 3 - }]; + var items = [ + { + text: "MVC-1", + iconCls: "date-font", + value: 1 + }, { + text: "MVC-2", + iconCls: "search-font", + value: 2 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + } + ]; // 创建下拉框各种场景用例 return { @@ -195,6 +197,8 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { allowClear: true, defaultText: "请选择", chooseType: BI.Selection.Multi, + value: [1], + // allowSelectAll: false, listeners: [ { eventName: BI.TextValueCombo.EVENT_CHANGE, diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index 1128f4ed8..02642da1a 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/src/case/combo/textvaluecombo/combo.textvalue.js @@ -16,7 +16,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { el: {}, allowClear: false, status: "success", // success | warning | error, - title: null + title: null, + allowSelectAll: true, }); }, @@ -78,6 +79,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { ref: ref => this.popup = ref, chooseType: o.chooseType, items: o.items, + allowSelectAll: o.allowSelectAll, listeners: [ { eventName: BI.TextValueComboPopup.EVENT_CHANGE, diff --git a/src/case/combo/textvaluecombo/popup.textvalue.js b/src/case/combo/textvaluecombo/popup.textvalue.js index 3f50089af..fa0de7c23 100644 --- a/src/case/combo/textvaluecombo/popup.textvalue.js +++ b/src/case/combo/textvaluecombo/popup.textvalue.js @@ -2,92 +2,132 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, { _defaultConfig: function () { return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-text-icon-popup", - chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + allowSelectAll: true, }); }, - render () { + render() { var o = this.options, self = this; if (o.chooseType !== BI.ButtonGroup.CHOOSE_TYPE_MULTI) { return { type: "bi.vertical", vgap: 5, - items: [{ - type: "bi.button_group", - ref: (_ref) => { - this.popup = _ref; - }, - items: this._formatItems(o.items), - chooseType: o.chooseType, - layouts: [{ - type: "bi.vertical" - }], - value: o.value, - listeners: [{ - eventName: BI.Controller.EVENT_CHANGE, - action: function (type, val, obj) { - self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - if (type === BI.Events.CLICK) { - self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj); + items: [ + { + type: "bi.button_group", + ref: (_ref) => { + this.popup = _ref; + }, + items: this._formatItems(o.items), + chooseType: o.chooseType, + layouts: [ + { + type: "bi.vertical" } - } - }] - }] + ], + value: o.value, + listeners: [ + { + eventName: BI.Controller.EVENT_CHANGE, + action: function (type, val, obj) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + if (type === BI.Events.CLICK) { + self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj); + } + } + } + ] + } + ] }; } return { type: "bi.vertical", verticalAlign: BI.VerticalAlign.Stretch, rowSize: ["fill", ""], - items: [{ - type: "bi.select_list", - logic: { - dynamic: true, - innerVgap: 5, - rowSize: ["", "fill"], - verticalAlign: BI.VerticalAlign.Stretch - }, - ref: (_ref) => { - this.popup = _ref; - }, - el: { - el: { - chooseType: o.chooseType + items: [ + { + el: o.allowSelectAll ? { + type: "bi.select_list", + logic: { + dynamic: true, + innerVgap: 5, + rowSize: ["", "fill"], + verticalAlign: BI.VerticalAlign.Stretch + }, + ref: (_ref) => { + this.popup = _ref; + }, + el: { + el: { + chooseType: o.chooseType, + } + }, + items: this._formatItems(o.items), + value: { + type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, + value: o.value + }, + listeners: [ + { + eventName: BI.SelectList.EVENT_CHANGE, + action: function (val) { + self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val); + } + } + ] + } : { + type: "bi.list_pane", + logic: { + dynamic: true, + innerVgap: 5, + rowSize: ["", "fill"], + verticalAlign: BI.VerticalAlign.Stretch + }, + ref: (_ref) => { + this.popup = _ref; + }, + el: { + chooseType: o.chooseType, + }, + items: this._formatItems(o.items), + value: o.value, + listeners: [ + { + eventName: BI.ListPane.EVENT_CHANGE, + action: function (val) { + self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val); + } + } + ] } }, - items: this._formatItems(o.items), - value: { - type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, - value: o.value - }, - listeners: [{ - eventName: BI.SelectList.EVENT_CHANGE, - action: function (val) { - self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val); - } - }] - }, { - type: "bi.center", - cls: "list-view-toolbar bi-high-light bi-split-top", - height: 24, - items: BI.createItems([{ - type: "bi.text_button", - text: BI.i18nText("BI-Basic_Clears"), - handler: function () { - self.fireEvent(BI.TextValueComboPopup.EVENT_CLEAR); - } - }, { - type: "bi.text_button", - text: BI.i18nText("BI-Basic_OK"), - handler: function () { - self.fireEvent(BI.TextValueComboPopup.EVENT_CONFIRM); - } - }], { - once: false, - shadow: true, - isShadowShowingOnSelected: true - }) - }] + { + type: "bi.center", + cls: "list-view-toolbar bi-high-light bi-split-top", + height: 24, + items: BI.createItems([ + { + type: "bi.text_button", + text: BI.i18nText("BI-Basic_Clears"), + handler: function () { + self.fireEvent(BI.TextValueComboPopup.EVENT_CLEAR); + } + }, { + type: "bi.text_button", + text: BI.i18nText("BI-Basic_OK"), + handler: function () { + self.fireEvent(BI.TextValueComboPopup.EVENT_CONFIRM); + } + } + ], { + once: false, + shadow: true, + isShadowShowingOnSelected: true + }) + } + ] }; }, @@ -117,6 +157,9 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, { return this.popup.getValue(); } var val = this.popup.getValue(); + if (!this.options.allowSelectAll) { + return val; + } if (val.type === BI.ButtonGroup.CHOOSE_TYPE_MULTI) { return val.value; } else { @@ -128,6 +171,10 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, { if (this.options.chooseType !== BI.ButtonGroup.CHOOSE_TYPE_MULTI) { return this.popup.setValue(v); } + if (!this.options.allowSelectAll) { + this.popup.setValue(v); + return; + } this.popup.setValue({ type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, value: v From 16c85e896d3050241a1a11feaf72c2d6a909acb2 Mon Sep 17 00:00:00 2001 From: data Date: Wed, 30 Nov 2022 10:03:51 +0800 Subject: [PATCH 21/29] auto upgrade version to 2.0.20221130100342 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5db81c903..37bc66d53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221129152444", + "version": "2.0.20221130100342", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 5aa51caf02259bc6f06c0786ad4021b30f432f4f Mon Sep 17 00:00:00 2001 From: data Date: Wed, 30 Nov 2022 15:26:02 +0800 Subject: [PATCH 22/29] auto upgrade version to 2.0.20221130152547 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 37bc66d53..412d6436c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221130100342", + "version": "2.0.20221130152547", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 6006d7bb5c878e2cec54dba324e49134b989816c Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 1 Dec 2022 17:14:48 +0800 Subject: [PATCH 23/29] =?UTF-8?q?KERNEL-13662=20feat:=20text=5Fvalue=5Fcom?= =?UTF-8?q?bo=20=E5=A4=8D=E9=80=89,=E6=94=AF=E6=8C=81=E4=B8=8D=E5=B8=A6?= =?UTF-8?q?=E5=85=A8=E9=80=89=20-=20from=20Richie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/case/combo/demo.text_value_combo.js | 23 ++++ .../combo/textvaluecombo/popup.textvalue.js | 112 +++++++++--------- 2 files changed, 79 insertions(+), 56 deletions(-) diff --git a/demo/js/case/combo/demo.text_value_combo.js b/demo/js/case/combo/demo.text_value_combo.js index cf6b30feb..4f8c4a92e 100644 --- a/demo/js/case/combo/demo.text_value_combo.js +++ b/demo/js/case/combo/demo.text_value_combo.js @@ -209,6 +209,29 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { ] } ] + }), + this.createCombo("支持复选,不要全选功能", { + type: "bi.vertical", + items: [ + { + type: "bi.text_value_combo", + width: 300, + items: items, + allowClear: true, + defaultText: "请选择", + chooseType: BI.Selection.Multi, + value: [1], + allowSelectAll: false, + listeners: [ + { + eventName: BI.TextValueCombo.EVENT_CHANGE, + action: function () { + console.log(this.getValue()); + } + } + ] + } + ] }) ] }; diff --git a/src/case/combo/textvaluecombo/popup.textvalue.js b/src/case/combo/textvaluecombo/popup.textvalue.js index fa0de7c23..3411793a4 100644 --- a/src/case/combo/textvaluecombo/popup.textvalue.js +++ b/src/case/combo/textvaluecombo/popup.textvalue.js @@ -45,65 +45,38 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, { return { type: "bi.vertical", verticalAlign: BI.VerticalAlign.Stretch, - rowSize: ["fill", ""], - items: [ + items: o.allowSelectAll ? [ { - el: o.allowSelectAll ? { - type: "bi.select_list", - logic: { - dynamic: true, - innerVgap: 5, - rowSize: ["", "fill"], - verticalAlign: BI.VerticalAlign.Stretch - }, - ref: (_ref) => { - this.popup = _ref; - }, - el: { - el: { - chooseType: o.chooseType, - } - }, - items: this._formatItems(o.items), - value: { - type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, - value: o.value - }, - listeners: [ - { - eventName: BI.SelectList.EVENT_CHANGE, - action: function (val) { - self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val); - } - } - ] - } : { - type: "bi.list_pane", - logic: { - dynamic: true, - innerVgap: 5, - rowSize: ["", "fill"], - verticalAlign: BI.VerticalAlign.Stretch - }, - ref: (_ref) => { - this.popup = _ref; - }, + type: "bi.select_list", + logic: { + dynamic: true, + innerVgap: 5, + rowSize: ["", "fill"], + verticalAlign: BI.VerticalAlign.Stretch + }, + ref: (_ref) => { + this.popup = _ref; + }, + el: { el: { chooseType: o.chooseType, - }, - items: this._formatItems(o.items), - value: o.value, - listeners: [ - { - eventName: BI.ListPane.EVENT_CHANGE, - action: function (val) { - self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val); - } + } + }, + items: this._formatItems(o.items), + value: { + type: BI.ButtonGroup.CHOOSE_TYPE_MULTI, + value: o.value + }, + height: "fill", + listeners: [ + { + eventName: BI.SelectList.EVENT_CHANGE, + action: function (val) { + self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val); } - ] - } - }, - { + } + ] + }, { type: "bi.center", cls: "list-view-toolbar bi-high-light bi-split-top", height: 24, @@ -127,7 +100,34 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, { isShadowShowingOnSelected: true }) } - ] + ] : [ + { + type: "bi.list_pane", + logic: { + dynamic: true, + innerVgap: 5, + rowSize: ["", "fill"], + verticalAlign: BI.VerticalAlign.Stretch + }, + ref: (_ref) => { + this.popup = _ref; + }, + el: { + chooseType: o.chooseType, + }, + items: this._formatItems(o.items), + value: o.value, + height: "fill", + listeners: [ + { + eventName: BI.ListPane.EVENT_CHANGE, + action: function (val) { + self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val); + } + } + ] + } + ], }; }, From 6e0dd6ac965645b450ac4e36cb16b5a01e12e234 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 1 Dec 2022 18:03:30 +0800 Subject: [PATCH 24/29] auto upgrade version to 2.0.20221201180321 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 412d6436c..51b322873 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221130152547", + "version": "2.0.20221201180321", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From be531e8e2760ecc6ff8b231259f3fd1510731bb5 Mon Sep 17 00:00:00 2001 From: "Xavier.Meng" Date: Fri, 2 Dec 2022 16:09:07 +0800 Subject: [PATCH 25/29] =?UTF-8?q?=E6=97=A0JIRA=20fix(widget.ts):=20?= =?UTF-8?q?=E6=8A=8A=5FrenderEngine=E6=94=B9=E4=B8=BA=E9=9D=99=E6=80=81?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/widget.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/typescript/core/widget.ts b/typescript/core/widget.ts index 4c1fc9d2f..fa945cb7c 100644 --- a/typescript/core/widget.ts +++ b/typescript/core/widget.ts @@ -418,6 +418,11 @@ export declare class Widget extends OB { */ static registerRenderEngine(engine: RenderEngine): void; + /** + * 渲染引擎 + */ + static _renderEngine: RenderEngine; + /** * 出现loading的锁 */ @@ -476,11 +481,6 @@ export declare class Widget extends OB { */ _manualSetValid: boolean; - /** - * 渲染引擎 - */ - _renderEngine: RenderEngine; - _store(): void; // 生命周期函数 From c24491b809a1f9069a5ef3253b7e38256e08c17f Mon Sep 17 00:00:00 2001 From: data Date: Fri, 2 Dec 2022 16:25:34 +0800 Subject: [PATCH 26/29] auto upgrade version to 2.0.20221202162515 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 51b322873..1be2639c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221201180321", + "version": "2.0.20221202162515", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From e5b4abe106c44c3d2ee621604e89f425a64fcee7 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 2 Dec 2022 16:43:51 +0800 Subject: [PATCH 27/29] auto upgrade version to 2.0.20221202164316 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1be2639c9..bb4e6bbf3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221202162515", + "version": "2.0.20221202164316", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 50e28a62192a11d6650c120ddcd1d8b253e833e7 Mon Sep 17 00:00:00 2001 From: "Xavier.Meng" Date: Fri, 2 Dec 2022 17:12:40 +0800 Subject: [PATCH 28/29] =?UTF-8?q?=E6=97=A0JIRA=20fix(widget.ts):=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=5FWidget=E9=87=8C=E7=9A=84=5FrenderEngine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/widget.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/typescript/core/widget.ts b/typescript/core/widget.ts index fa945cb7c..5992ce01c 100644 --- a/typescript/core/widget.ts +++ b/typescript/core/widget.ts @@ -69,11 +69,6 @@ export interface _Widget extends _OB { */ _manualSetValid: boolean; - /** - * 渲染引擎 - */ - _renderEngine: RenderEngine; - _store(): void; // 生命周期函数 From a710efe37e74c28ac9aa1f496414c5c9403f2f80 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 2 Dec 2022 17:40:28 +0800 Subject: [PATCH 29/29] auto upgrade version to 2.0.20221202174010 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bb4e6bbf3..cd175efdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221202164316", + "version": "2.0.20221202174010", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts",