diff --git a/bi.lessconfig.json b/bi.lessconfig.json
index e1e853591..d4042b18d 100644
--- a/bi.lessconfig.json
+++ b/bi.lessconfig.json
@@ -8,7 +8,7 @@
"@color-light-gray": "#ECEEF3",
"@color-light-gray-theme-dark": "#292F45",
"@border-color-dark-line": "#2E3A4D",
- "@color-sliver-theme-dark": "363E55",
+ "@color-sliver-theme-dark": "#363E55",
"@border-color-disabled": "#E7E8EB",
"@color-bi-background-active-radio": "transparent",
@@ -18,6 +18,7 @@
"@color-bi-background-disabled-active-checkbox-content": "#D0D4DA",
"@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479",
"@color-bi-background-tooltip-success": "#2E3A4D",
+ "@color-bi-text-header-background": "#647185",
"@color-bi-border-tooltip-success": "#2E3A4D",
"@color-bi-background-toast-success": "#FFFFFF",
"@color-bi-background-toast-warning": "#FFFFFF",
diff --git a/dist/font/iconfont.eot b/dist/font/iconfont.eot
index 72e145f57..69ce839c8 100644
Binary files a/dist/font/iconfont.eot and b/dist/font/iconfont.eot differ
diff --git a/dist/font/iconfont.svg b/dist/font/iconfont.svg
index b5678472f..f41328033 100644
--- a/dist/font/iconfont.svg
+++ b/dist/font/iconfont.svg
@@ -14,6 +14,10 @@
/>
+
+
+
+
diff --git a/dist/font/iconfont.ttf b/dist/font/iconfont.ttf
index 6001a1a04..c9c66fca5 100644
Binary files a/dist/font/iconfont.ttf and b/dist/font/iconfont.ttf differ
diff --git a/dist/font/iconfont.woff b/dist/font/iconfont.woff
index d8c629fdd..cc2826fcb 100644
Binary files a/dist/font/iconfont.woff and b/dist/font/iconfont.woff differ
diff --git a/dist/font/iconfont.woff2 b/dist/font/iconfont.woff2
index 165d01f51..99326dd53 100644
Binary files a/dist/font/iconfont.woff2 and b/dist/font/iconfont.woff2 differ
diff --git a/package.json b/package.json
index 2332da732..40f59c9a8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "fineui",
- "version": "2.0.20220225184322",
+ "version": "2.0.20220305232243",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",
diff --git a/src/base/layer/layer.popover.js b/src/base/layer/layer.popover.js
index 9109a9a4e..bce738ef3 100644
--- a/src/base/layer/layer.popover.js
+++ b/src/base/layer/layer.popover.js
@@ -27,7 +27,7 @@ BI.Popover = BI.inherit(BI.Widget, {
footerHeight: 44,
closable: true, // BI-40839 是否显示右上角的关闭按钮
bodyHgap: BI.SIZE_CONSANTS.H_GAP_SIZE,
- bodyTgap: 10
+ bodyTgap: BI.SIZE_CONSANTS.V_GAP_SIZE
};
},
@@ -109,10 +109,10 @@ BI.Popover = BI.inherit(BI.Widget, {
},
items: [{
el: o.body
- }]
- },
- hgap: o.bodyHgap,
- tgap: o.bodyTgap
+ }],
+ hgap: o.bodyHgap,
+ tgap: o.bodyTgap
+ }
} : {
el: {
type: "bi.absolute",
@@ -143,7 +143,6 @@ BI.Popover = BI.inherit(BI.Widget, {
}
return BI.extend({
- type: o.logic.dynamic ? "bi.vertical" : "bi.vtape",
items: items,
width: this._getSuitableWidth(size.width)
}, o.logic.dynamic ? {
diff --git a/src/base/single/1.text.js b/src/base/single/1.text.js
index cc6081e7f..235a1a404 100644
--- a/src/base/single/1.text.js
+++ b/src/base/single/1.text.js
@@ -76,7 +76,11 @@
this.text = this;
}
- var text = this._getShowText();
+ var text = BI.isFunction(o.text) ? this.__watch(o.text, function (context, newValue) {
+ self.setText(newValue);
+ }, {
+ deep: true
+ }) : o.text;
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) {
this.setText(text);
diff --git a/src/case/button/item.multiselect.js b/src/case/button/item.multiselect.js
index afe27abcc..648036f61 100644
--- a/src/case/button/item.multiselect.js
+++ b/src/case/button/item.multiselect.js
@@ -38,22 +38,24 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
type: "bi.center_adapt",
items: [this.checkbox]
}, {
- type: "bi.label",
- ref: function (_ref) {
- self.text = _ref;
- },
- cls: "list-item-text",
- textAlign: "left",
- whiteSpace: "nowrap",
- textHeight: o.height,
- height: o.height,
- hgap: o.hgap,
- rgap: o.rgap,
- lgap: o.textLgap,
- text: o.text,
- keyword: o.keyword,
- value: o.value,
- py: o.py
+ el: {
+ type: "bi.label",
+ ref: function (_ref) {
+ self.text = _ref;
+ },
+ cls: "list-item-text",
+ textAlign: "left",
+ whiteSpace: "nowrap",
+ textHeight: o.height,
+ height: o.height,
+ hgap: o.hgap,
+ rgap: o.rgap,
+ lgap: o.textLgap,
+ text: o.text,
+ keyword: o.keyword,
+ value: o.value,
+ py: o.py
+ }
}]
};
},
diff --git a/src/case/button/item.singleselect.radio.js b/src/case/button/item.singleselect.radio.js
index 8ebc42e0c..911dd56e0 100644
--- a/src/case/button/item.singleselect.radio.js
+++ b/src/case/button/item.singleselect.radio.js
@@ -36,22 +36,24 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
},
}]
}, {
- type: "bi.label",
- ref: function (_ref) {
- self.text = _ref;
- },
- cls: "list-item-text",
- textAlign: "left",
- whiteSpace: "nowrap",
- textHeight: o.height,
- height: o.height,
- hgap: o.hgap,
- rgap: o.textRgap,
- lgap: o.textLgap,
- text: o.text,
- keyword: o.keyword,
- value: o.value,
- py: o.py
+ el: {
+ type: "bi.label",
+ ref: function (_ref) {
+ self.text = _ref;
+ },
+ cls: "list-item-text",
+ textAlign: "left",
+ whiteSpace: "nowrap",
+ textHeight: o.height,
+ height: o.height,
+ hgap: o.hgap,
+ rgap: o.textRgap,
+ lgap: o.textLgap,
+ text: o.text,
+ keyword: o.keyword,
+ value: o.value,
+ py: o.py
+ }
}]
};
},
diff --git a/src/case/button/node/node.arrow.js b/src/case/button/node/node.arrow.js
index 68c58fac9..259ea3158 100644
--- a/src/case/button/node/node.arrow.js
+++ b/src/case/button/node/node.arrow.js
@@ -32,19 +32,21 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, {
type: "bi.vertical_adapt",
columnSize: [o.iconWrapperWidth || o.height, "fill"],
items: [this.checkbox, {
- type: "bi.label",
- ref: function (_ref) {
- self.text = _ref;
- },
- textAlign: "left",
- whiteSpace: "nowrap",
- textHeight: o.height,
- height: o.height,
- hgap: o.hgap,
- text: o.text,
- value: o.value,
- py: o.py,
- keyword: o.keyword
+ el: {
+ type: "bi.label",
+ ref: function (_ref) {
+ self.text = _ref;
+ },
+ textAlign: "left",
+ whiteSpace: "nowrap",
+ textHeight: o.height,
+ height: o.height,
+ hgap: o.hgap,
+ text: o.text,
+ value: o.value,
+ py: o.py,
+ keyword: o.keyword
+ }
}]
};
},
diff --git a/src/case/button/node/node.plus.js b/src/case/button/node/node.plus.js
index f60e1c933..d5de8817b 100644
--- a/src/case/button/node/node.plus.js
+++ b/src/case/button/node/node.plus.js
@@ -37,19 +37,21 @@ BI.PlusGroupNode = BI.inherit(BI.NodeButton, {
type: "bi.vertical_adapt",
columnSize: [o.iconWrapperWidth || o.height, "fill"],
items: [this.checkbox, {
- type: "bi.label",
- ref: function (_ref) {
- self.text = _ref;
- },
- textAlign: "left",
- whiteSpace: "nowrap",
- textHeight: o.height,
- height: o.height,
- hgap: o.hgap,
- text: o.text,
- value: o.value,
- keyword: o.keyword,
- py: o.py
+ el: {
+ type: "bi.label",
+ ref: function (_ref) {
+ self.text = _ref;
+ },
+ textAlign: "left",
+ whiteSpace: "nowrap",
+ textHeight: o.height,
+ height: o.height,
+ hgap: o.hgap,
+ text: o.text,
+ value: o.value,
+ keyword: o.keyword,
+ py: o.py
+ }
}]
};
},
diff --git a/src/case/combo/bubblecombo/popup.bubble.js b/src/case/combo/bubblecombo/popup.bubble.js
index d41767996..c65905821 100644
--- a/src/case/combo/bubblecombo/popup.bubble.js
+++ b/src/case/combo/bubblecombo/popup.bubble.js
@@ -11,7 +11,7 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 70,
maxWidth: 300,
- minHeight: 50,
+ // minHeight: 50,
showArrow: true,
});
}
diff --git a/src/component/form/form.js b/src/component/form/form.js
index 87cd64236..27734455f 100644
--- a/src/component/form/form.js
+++ b/src/component/form/form.js
@@ -35,6 +35,7 @@
},
_createItems: function () {
+ var self = this;
var o = this.options;
return BI.map(o.items, function (idx, item) {
@@ -50,7 +51,7 @@
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
- this.validate();
+ self.fireEvent(BI.Form.EVENT_CHANGE, this.validate());
}
}]
};
@@ -88,4 +89,5 @@
}
});
+BI.Form.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.custom_form", BI.Form);
diff --git a/src/core/3.ob.js b/src/core/3.ob.js
index 5cf3cda20..8f7ed1004 100644
--- a/src/core/3.ob.js
+++ b/src/core/3.ob.js
@@ -51,7 +51,9 @@
if (BI.isFunction(this.props)) {
props = this.props(config);
}
- this.options = extend(this._defaultConfig(config), props, config);
+ var defaultProps = this._defaultConfig(config);
+ var modifiedDefaultProps = (config && config.type && BI.OB.configFunctions[config.type + ".props"]) ? BI.OB.configFunctions[config.type + ".props"](config, defaultProps) : null;
+ this.options = extend(defaultProps, props, modifiedDefaultProps, config);
},
_init: function () {
diff --git a/src/core/5.inject.js b/src/core/5.inject.js
index 78417079c..3cb1d15bf 100644
--- a/src/core/5.inject.js
+++ b/src/core/5.inject.js
@@ -91,7 +91,7 @@
};
};
- var configFunctions = {};
+ var configFunctions = BI.OB.configFunctions = {};
var runConfigFunction = function (type) {
if (!type || !configFunctions[type]) {
return false;
diff --git a/src/core/logic/logic.js b/src/core/logic/logic.js
index e5de9d24e..fab052e19 100644
--- a/src/core/logic/logic.js
+++ b/src/core/logic/logic.js
@@ -30,7 +30,7 @@ BI.LogicFactory = {
case BI.LogicFactory.Type.HorizontalFill:
logic = BI.HorizontalFillLayoutLogic;
break;
- default :
+ default:
logic = BI.Logic;
break;
}
@@ -43,7 +43,6 @@ BI.LogicFactory = {
case BI.Direction.Bottom:
case BI.Direction.Custom:
return BI.LogicFactory.Type.Vertical;
- break;
case BI.Direction.Left:
case BI.Direction.Right:
return BI.LogicFactory.Type.Horizontal;
@@ -78,4 +77,4 @@ BI.LogicFactory = {
}
return items;
}
-};
\ No newline at end of file
+};
diff --git a/src/core/logic/logic.layout.js b/src/core/logic/logic.layout.js
index d86d914ba..21ce0f9b8 100644
--- a/src/core/logic/logic.layout.js
+++ b/src/core/logic/logic.layout.js
@@ -19,7 +19,9 @@ BI.VerticalLayoutLogic = BI.inherit(BI.Logic, {
lgap: 0,
rgap: 0,
tgap: 0,
- bgap: 0
+ bgap: 0,
+ innerVgap: 0,
+ innerHgap: 0
};
},
@@ -41,6 +43,8 @@ BI.VerticalLayoutLogic = BI.inherit(BI.Logic, {
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
+ innerHgap: o.innerHgap,
+ innerVgap: o.innerVgap,
items: o.items
};
}
@@ -68,7 +72,9 @@ BI.HorizontalLayoutLogic = BI.inherit(BI.Logic, {
lgap: 0,
rgap: 0,
tgap: 0,
- bgap: 0
+ bgap: 0,
+ innerVgap: 0,
+ innerHgap: 0
};
},
@@ -90,6 +96,8 @@ BI.HorizontalLayoutLogic = BI.inherit(BI.Logic, {
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
+ innerHgap: o.innerHgap,
+ innerVgap: o.innerVgap,
items: o.items
};
}
@@ -163,7 +171,9 @@ BI.HorizontalFillLayoutLogic = BI.inherit(BI.Logic, {
lgap: 0,
rgap: 0,
tgap: 0,
- bgap: 0
+ bgap: 0,
+ innerVgap: 0,
+ innerHgap: 0
};
},
@@ -190,6 +200,8 @@ BI.HorizontalFillLayoutLogic = BI.inherit(BI.Logic, {
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
+ innerHgap: o.innerHgap,
+ innerVgap: o.innerVgap,
items: o.items
};
}
diff --git a/src/core/system.js b/src/core/system.js
index 823195f86..123bd88be 100644
--- a/src/core/system.js
+++ b/src/core/system.js
@@ -17,13 +17,13 @@
TRIGGER_HEIGHT: 24,
TOAST_TOP: 10,
H_GAP_SIZE: "M",
- V_GAP_SIZE: "M"
+ V_GAP_SIZE: "S"
}
};
// 具体尺寸还没定,先写着
var sizeMap = {
- "S": 16,
+ "S": 10,
"M" : 20,
"L": 24
};
diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js
index b2debf370..c77145b73 100644
--- a/src/core/wrapper/layout.js
+++ b/src/core/wrapper/layout.js
@@ -62,11 +62,24 @@ BI.Layout = BI.inherit(BI.Widget, {
_init4Scroll: function () {
switch (this.options.scrollable) {
case true:
+ case "xy":
this.element.css("overflow", "auto");
- break;
+ return;
case false:
this.element.css("overflow", "hidden");
- break;
+ return;
+ case "x":
+ this.element.css({
+ "overflow-x": "auto",
+ "overflow-y": "hidden"
+ });
+ return;
+ case "y":
+ this.element.css({
+ "overflow-x": "hidden",
+ "overflow-y": "auto"
+ });
+ return;
default :
break;
}
@@ -75,6 +88,7 @@ BI.Layout = BI.inherit(BI.Widget, {
"overflow-x": "auto",
"overflow-y": "hidden"
});
+ return;
}
if (this.options.scrolly) {
this.element.css({
diff --git a/src/core/wrapper/layout/layout.absolute.js b/src/core/wrapper/layout/layout.absolute.js
index fa61028c1..86c7e94e1 100644
--- a/src/core/wrapper/layout/layout.absolute.js
+++ b/src/core/wrapper/layout/layout.absolute.js
@@ -24,21 +24,43 @@ BI.AbsoluteLayout = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.AbsoluteLayout.superclass._addElement.apply(this, arguments);
var left = 0, right = 0, top = 0, bottom = 0;
- if (BI.isNotNull(item.left)) {
- w.element.css({left: BI.isNumber(item.left) ? this._optimiseGap(item.left) : item.left});
- left += item.left;
+ var offsets = BI.pick(item, ["top", "right", "bottom", "left"]);
+
+ if (BI.isKey(item.inset)) {
+ var insets = BI.map((item.inset + "").split(" "), function (i, str) {
+ return BI.parseFloat(str);
+ });
+ switch (insets.length) {
+ case 1:
+ offsets = {top: insets[0], bottom: insets[0], left: insets[0], right: insets[0]}
+ break;
+ case 2:
+ offsets = {top: insets[0], bottom: insets[0], left: insets[1], right: insets[1]}
+ break;
+ case 3:
+ offsets = {top: insets[0], left: insets[1], right: insets[1], bottom: insets[2]}
+ break
+ case 4:
+ default:
+ offsets = {top: insets[0], right: insets[1], bottom: insets[2], left: insets[3]}
+ break;
+ }
+ }
+ if (BI.isNotNull(offsets.left)) {
+ w.element.css({left: BI.isNumber(offsets.left) ? this._optimiseGap(offsets.left) : offsets.left});
+ left += offsets.left;
}
- if (BI.isNotNull(item.right)) {
- w.element.css({right: BI.isNumber(item.right) ? this._optimiseGap(item.right) : item.right});
- right += item.right;
+ if (BI.isNotNull(offsets.right)) {
+ w.element.css({right: BI.isNumber(offsets.right) ? this._optimiseGap(offsets.right) : offsets.right});
+ right += offsets.right;
}
- if (BI.isNotNull(item.top)) {
- w.element.css({top: BI.isNumber(item.top) ? this._optimiseGap(item.top) : item.top});
- top += item.top;
+ if (BI.isNotNull(offsets.top)) {
+ w.element.css({top: BI.isNumber(offsets.top) ? this._optimiseGap(offsets.top) : offsets.top});
+ top += offsets.top;
}
- if (BI.isNotNull(item.bottom)) {
- w.element.css({bottom: BI.isNumber(item.bottom) ? this._optimiseGap(item.bottom) : item.bottom});
- bottom += item.bottom;
+ if (BI.isNotNull(offsets.bottom)) {
+ w.element.css({bottom: BI.isNumber(offsets.bottom) ? this._optimiseGap(offsets.bottom) : offsets.bottom});
+ bottom += offsets.bottom;
}
if (BI.isNotNull(o.hgap)) {
diff --git a/src/less/resource/font.less b/src/less/resource/font.less
index 6c7b3994d..7e7e4e91c 100644
--- a/src/less/resource/font.less
+++ b/src/less/resource/font.less
@@ -83,7 +83,7 @@
//toast
.font(toast-error-font, @font-tip-error, @color-bi-color-toast-error);
-.font(toast-success-font, @font-tip-success, @color-bi-color-toast-error);
+.font(toast-success-font, @font-tip-success, @color-bi-color-toast-success);
.font(toast-warning-font, @font-tip-warning, @color-bi-color-toast-warning);
.font(toast-message-font, @font-tip-message, @color-bi-color-toast-normal);
diff --git a/src/widget/datetime/datetime.combo.js b/src/widget/datetime/datetime.combo.js
index 81224c021..d436da1a8 100644
--- a/src/widget/datetime/datetime.combo.js
+++ b/src/widget/datetime/datetime.combo.js
@@ -6,7 +6,8 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
popupHeight: 290,
popupWidth: 270,
comboAdjustHeight: 1,
- border: 1
+ border: 1,
+ iconWidth: 24
},
_defaultConfig: function () {
return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
@@ -83,7 +84,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font",
- width: opts.height,
+ width: this.constants.iconWidth,
height: opts.height,
});
triggerBtn.on(BI.IconButton.EVENT_CHANGE, function () {
@@ -96,21 +97,9 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
BI.createWidget({
type: "bi.htape",
+ columnSize: ["", this.constants.iconWidth],
element: this,
- items: [{
- type: "bi.absolute",
- items: [{
- el: this.combo,
- top: 0,
- left: 0,
- right: 0,
- bottom: 0
- }, {
- el: triggerBtn,
- top: 0,
- right: 0
- }]
- }]
+ items: [this.combo, triggerBtn]
});
},
diff --git a/src/widget/datetime/datetime.trigger.js b/src/widget/datetime/datetime.trigger.js
index ea0d047cb..d161585e6 100644
--- a/src/widget/datetime/datetime.trigger.js
+++ b/src/widget/datetime/datetime.trigger.js
@@ -3,7 +3,8 @@
*/
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
- hgap: 4
+ hgap: 4,
+ iconWidth:24
},
_defaultConfig: function () {
@@ -33,7 +34,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
el: this.text
},{
el: BI.createWidget(),
- width: o.height
+ width: this._const.iconWidth
}]
});
this.setValue(o.value);
diff --git a/src/widget/dynamicdate/dynamicdate.combo.js b/src/widget/dynamicdate/dynamicdate.combo.js
index 997211275..185e1ca35 100644
--- a/src/widget/dynamicdate/dynamicdate.combo.js
+++ b/src/widget/dynamicdate/dynamicdate.combo.js
@@ -3,7 +3,8 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
popupHeight: 259,
popupWidth: 270,
comboAdjustHeight: 1,
- border: 1
+ border: 1,
+ iconWidth: 24
},
props: {
@@ -48,7 +49,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
destroyWhenHide: true,
el: {
type: "bi.horizontal_fill",
- columnSize: [opts.height - border, "fill"],
+ columnSize: [this.constants.iconWidth, "fill"],
height: opts.height - border,
items: [{
el: {
diff --git a/src/widget/dynamicdate/dynamicdate.trigger.js b/src/widget/dynamicdate/dynamicdate.trigger.js
index 48e8a4601..1412fae69 100644
--- a/src/widget/dynamicdate/dynamicdate.trigger.js
+++ b/src/widget/dynamicdate/dynamicdate.trigger.js
@@ -5,7 +5,8 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
yearLength: 4,
yearMonthLength: 6,
yearFullMonthLength: 7,
- compareFormat: "%Y-%X-%d"
+ compareFormat: "%Y-%X-%d",
+ iconWidth: 24
},
props: {
@@ -120,15 +121,16 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({
type: "bi.htape",
element: this,
+ columnSize: ["", this._const.iconWidth],
items: [{
el: this.editor
}, {
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font",
- width: o.iconWidth
+ width: this._const.iconWidth
},
- width: o.iconWidth
+ width: this._const.iconWidth
}]
});
!o.allowEdit && BI.createWidget({
diff --git a/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/src/widget/dynamicdatetime/dynamicdatetime.combo.js
index 37655791d..1b8a58243 100644
--- a/src/widget/dynamicdatetime/dynamicdatetime.combo.js
+++ b/src/widget/dynamicdatetime/dynamicdatetime.combo.js
@@ -3,7 +3,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
popupHeight: 259,
popupWidth: 270,
comboAdjustHeight: 1,
- border: 1
+ border: 1,
+ iconWidth: 24
},
props: {
@@ -48,13 +49,13 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
isNeedAdjustWidth: opts.isNeedAdjustWidth,
el: {
type: "bi.horizontal_fill",
- columnSize: [opts.height - border, "fill"],
+ columnSize: [this.constants.iconWidth, "fill"],
height: opts.height - border,
items: [{
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font",
- width: opts.height - border,
+ width: this.constants.iconWidth,
height: opts.height - border,
ref: function () {
self.changeIcon = this;
@@ -68,7 +69,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
- iconWidth: opts.height - border,
+ iconWidth: this.constants.iconWidth,
height: opts.height - border,
value: opts.value,
ref: function () {
diff --git a/src/widget/dynamicdatetime/dynamicdatetime.trigger.js b/src/widget/dynamicdatetime/dynamicdatetime.trigger.js
index e58cd99f5..dd5c7ed6f 100644
--- a/src/widget/dynamicdatetime/dynamicdatetime.trigger.js
+++ b/src/widget/dynamicdatetime/dynamicdatetime.trigger.js
@@ -5,7 +5,8 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
yearLength: 4,
yearMonthLength: 6,
yearFullMonthLength: 7,
- compareFormat: "%Y-%X-%d %H:%M:%S"
+ compareFormat: "%Y-%X-%d %H:%M:%S",
+ iconWidth: 24
},
props: {
@@ -118,6 +119,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({
type: "bi.htape",
element: this,
+ columnSize: ["", this._const.iconWidth],
items: [{
el: this.editor
}, {
diff --git a/src/widget/time/time.combo.js b/src/widget/time/time.combo.js
index d69443bc7..30c40e0ab 100644
--- a/src/widget/time/time.combo.js
+++ b/src/widget/time/time.combo.js
@@ -10,7 +10,8 @@
popupHeight: 80,
popupWidth: 240,
comboAdjustHeight: 1,
- border: 1
+ border: 1,
+ iconWidth: 24
},
props: {
baseCls: "bi-time-combo",
@@ -177,7 +178,7 @@
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button time-font icon-size-16",
- width: opts.height,
+ width: this.constants.iconWidth,
height: opts.height,
listeners: [{
eventName: BI.IconButton.EVENT_CHANGE,
diff --git a/src/widget/timeinterval/timeperiods.js b/src/widget/timeinterval/timeperiods.js
index dbc73333e..45c5a970f 100644
--- a/src/widget/timeinterval/timeperiods.js
+++ b/src/widget/timeinterval/timeperiods.js
@@ -21,13 +21,13 @@
return {
type: "bi.absolute",
- height: this.constants.height,
+ height: o.height,
items: [{
el: {
type: "bi.horizontal_auto",
items: [{
type: "bi.label",
- height: this.constants.height,
+ height: o.height,
width: this.constants.width,
text: "-",
ref: function (_ref) {
@@ -42,7 +42,7 @@
}, {
el: {
type: "bi.center",
- height: this.constants.height,
+ height: o.height,
hgap: this.constants.hgap,
items: [{
type: "bi.absolute",
@@ -82,9 +82,11 @@
_createCombo: function (v) {
var self = this;
+ var o = this.options;
return {
type: "bi.time_combo",
value: v,
+ height: o.height,
listeners: [{
eventName: BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,
action: function () {
diff --git a/src/widget/year/combo.year.js b/src/widget/year/combo.year.js
index 0770ed3c8..62a498d54 100644
--- a/src/widget/year/combo.year.js
+++ b/src/widget/year/combo.year.js
@@ -1,5 +1,9 @@
BI.DynamicYearCombo = BI.inherit(BI.Widget, {
+ _const: {
+ iconWidth: 24
+ },
+
props: {
baseCls: "bi-year-combo",
behaviors: {},
@@ -136,13 +140,13 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button",
- width: o.height - border,
+ width: this._const.iconWidth,
height: o.height - border,
ref: function () {
self.changeIcon = this;
}
},
- width: o.height - border
+ width: this._const.iconWidth
}, this.combo]
},
top: 0,
diff --git a/src/widget/year/trigger.year.js b/src/widget/year/trigger.year.js
index 612b51362..91b80a431 100644
--- a/src/widget/year/trigger.year.js
+++ b/src/widget/year/trigger.year.js
@@ -1,7 +1,8 @@
BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
- vgap: 2
+ vgap: 2,
+ iconWidth: 24
},
_defaultConfig: function () {
@@ -90,7 +91,8 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
});
BI.createWidget({
element: this,
- type: "bi.htape",
+ type: "bi.horizontal_fill",
+ columnSize: ["fill", ""],
items: [{
el: this.editor
}, {
@@ -98,15 +100,13 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
type: "bi.text_button",
baseCls: "bi-trigger-year-text",
text: BI.i18nText("BI-Multi_Date_Year"),
- width: o.height
},
- width: o.height
}, {
el: {
type: "bi.trigger_icon_button",
- width: o.height
+ width: this._const.iconWidth
},
- width: o.height
+ width: this._const.iconWidth
}]
});
this.setValue(o.value);
diff --git a/src/widget/yearinterval/yearinterval.js b/src/widget/yearinterval/yearinterval.js
index 9a2986271..7c27f24f4 100644
--- a/src/widget/yearinterval/yearinterval.js
+++ b/src/widget/yearinterval/yearinterval.js
@@ -29,7 +29,7 @@ BI.YearInterval = BI.inherit(BI.Single, {
return [{
type: "bi.center",
hgap: 15,
- height: this.constants.height,
+ height: o.height,
items: [{
type: "bi.absolute",
items: [{
@@ -53,7 +53,7 @@ BI.YearInterval = BI.inherit(BI.Single, {
type: "bi.horizontal_auto",
items: [{
type: "bi.label",
- height: this.constants.height,
+ height: o.height,
width: this.constants.width,
text: "-",
ref: function (_ref) {
@@ -70,6 +70,7 @@ BI.YearInterval = BI.inherit(BI.Single, {
supportDynamic: o.supportDynamic,
minDate: o.minDate,
maxDate: o.maxDate,
+ height: o.height,
behaviors: o.behaviors,
value: v,
listeners: [{
diff --git a/src/widget/yearmonth/trigger.yearmonth.js b/src/widget/yearmonth/trigger.yearmonth.js
index 11a15a785..56a6b420a 100644
--- a/src/widget/yearmonth/trigger.yearmonth.js
+++ b/src/widget/yearmonth/trigger.yearmonth.js
@@ -1,7 +1,8 @@
BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
- vgap: 2
+ vgap: 2,
+ iconWidth: 24
},
props: {
@@ -20,7 +21,6 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
_init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options;
-
this.yearEditor = this._createEditor(true);
this.monthEditor = this._createEditor(false);
@@ -30,31 +30,30 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
items: [{
type: "bi.center",
items: [{
- type: "bi.htape",
+ type: "bi.horizontal_fill",
+ columnSize: ["fill", ""],
items: [this.yearEditor, {
el: {
type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Year"),
- width: o.height
},
- width: o.height
}]
}, {
- type: "bi.htape",
+ type: "bi.horizontal_fill",
+ columnSize: ["fill", ""],
items: [this.monthEditor, {
el: {
type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Month"),
- width: o.height
},
- width: o.height}]
+ }]
}]
}, {
el: {
type: "bi.trigger_icon_button",
- width: o.height
+ width: this._const.iconWidth
},
- width: o.height
+ width: this._const.iconWidth
}]
});
this.setValue(o.value);
diff --git a/src/widget/yearquarter/combo.yearquarter.js b/src/widget/yearquarter/combo.yearquarter.js
index c8820fdb3..ae42bec41 100644
--- a/src/widget/yearquarter/combo.yearquarter.js
+++ b/src/widget/yearquarter/combo.yearquarter.js
@@ -1,5 +1,8 @@
BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
+ _consts:{
+ iconWidth: 24
+ },
props: {
baseCls: "bi-year-quarter-combo",
behaviors: {},
@@ -140,13 +143,13 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button",
- width: o.height - border,
+ width: this._consts.iconWidth,
height: o.height - border,
ref: function () {
self.changeIcon = this;
}
},
- width: o.height - border
+ width: this._consts.iconWidth
}, this.combo]
},
top: 0,
diff --git a/src/widget/yearquarter/trigger.yearquarter.js b/src/widget/yearquarter/trigger.yearquarter.js
index 4e3765c36..ea7cb6f4e 100644
--- a/src/widget/yearquarter/trigger.yearquarter.js
+++ b/src/widget/yearquarter/trigger.yearquarter.js
@@ -1,7 +1,8 @@
BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
- vgap: 2
+ vgap: 2,
+ iconWidth: 24
},
props: {
@@ -14,7 +15,6 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
_init: function () {
BI.DynamicYearQuarterTrigger.superclass._init.apply(this, arguments);
var o = this.options;
-
this.yearEditor = this._createEditor(true);
this.quarterEditor = this._createEditor(false);
@@ -27,32 +27,30 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
items: [{
type: "bi.center",
items: [{
- type: "bi.htape",
+ type: "bi.horizontal_fill",
+ columnSize: ["fill", ""],
items: [this.yearEditor, {
el: {
type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Year"),
- width: height
},
- width: height
}]
}, {
- type: "bi.htape",
+ type: "bi.horizontal_fill",
+ columnSize: ["fill", ""],
items: [this.quarterEditor, {
el: {
type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Quarter"),
- width: height
},
- width: height
}]
}]
}, {
el: {
type: "bi.trigger_icon_button",
- width: height
+ width: this._const.iconWidth,
},
- width: height
+ width: this._const.iconWidth,
}]
});
this.setValue(o.value);
diff --git a/src/widget/yearquarterinterval/yearquarterinterval.js b/src/widget/yearquarterinterval/yearquarterinterval.js
index 4dbf4f691..e148a92f0 100644
--- a/src/widget/yearquarterinterval/yearquarterinterval.js
+++ b/src/widget/yearquarterinterval/yearquarterinterval.js
@@ -29,7 +29,7 @@ BI.YearQuarterInterval = BI.inherit(BI.Single, {
return [{
type: "bi.center",
hgap: 15,
- height: this.constants.height,
+ height: o.height,
items: [{
type: "bi.absolute",
items: [{
@@ -53,7 +53,7 @@ BI.YearQuarterInterval = BI.inherit(BI.Single, {
type: "bi.horizontal_auto",
items: [{
type: "bi.label",
- height: this.constants.height,
+ height: o.height,
width: this.constants.width,
text: "-",
ref: function (_ref) {
@@ -72,6 +72,7 @@ BI.YearQuarterInterval = BI.inherit(BI.Single, {
maxDate: o.maxDate,
behaviors: o.behaviors,
value: v,
+ height: o.height,
listeners: [{
eventName: BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW,
action: function () {
diff --git a/typescript/component/form/form.ts b/typescript/component/form/form.ts
new file mode 100644
index 000000000..ab5844120
--- /dev/null
+++ b/typescript/component/form/form.ts
@@ -0,0 +1,14 @@
+import { Widget } from "../../core/widget";
+
+export declare class Form extends Widget {
+ static xtype: string;
+ static EVENT_CHANGE: string;
+
+ isAllValid(): boolean;
+
+ validateWithNoTip(): boolean[];
+
+ validate(): boolean[];
+
+ getValue(): T[];
+}
\ No newline at end of file
diff --git a/typescript/index.ts b/typescript/index.ts
index fa18bc8da..dae3dfb93 100644
--- a/typescript/index.ts
+++ b/typescript/index.ts
@@ -25,6 +25,7 @@ import { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.se
import { SignEditor } from "./case/editor/editor.sign";
import { StateEditor } from './case/editor/editor.state';
import { AllValueMultiTextValueCombo } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo";
+import { Form } from './component/form/form';
import { AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser";
import { AbstractListTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser.list";
import { Action, ActionFactory } from "./core/action/action";
@@ -218,6 +219,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
SmallTextValueCombo: typeof SmallTextValueCombo;
BubbleCombo: typeof BubbleCombo;
AllValueMultiTextValueCombo: typeof AllValueMultiTextValueCombo;
+ Form: typeof Form;
IconTextItem: typeof IconTextItem;
MultiSelectItem: typeof MultiSelectItem;
AbstractLabel: typeof AbstractLabel;
@@ -512,6 +514,7 @@ export {
Switch,
HorizontalLayout,
ShelterEditor,
+ Form,
TextTrigger,
SelectTextTrigger,
DateInterval,
diff --git a/typescript/widget/downlist/item.downlistgroup.ts b/typescript/widget/downlist/item.downlistgroup.ts
index 8c85305ea..bf7be317f 100644
--- a/typescript/widget/downlist/item.downlistgroup.ts
+++ b/typescript/widget/downlist/item.downlistgroup.ts
@@ -4,6 +4,11 @@ export declare class DownListGroupItem extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
+ props: {
+ iconCls1: string;
+ iconCls2: string;
+ } & BasicButton['props'];
+
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;