diff --git a/packages/fineui/dist/font/iconfont.eot b/packages/fineui/dist/font/iconfont.eot
index d546c0852..30d5644ca 100644
Binary files a/packages/fineui/dist/font/iconfont.eot and b/packages/fineui/dist/font/iconfont.eot differ
diff --git a/packages/fineui/dist/font/iconfont.svg b/packages/fineui/dist/font/iconfont.svg
index 0b8884829..0aa415779 100644
--- a/packages/fineui/dist/font/iconfont.svg
+++ b/packages/fineui/dist/font/iconfont.svg
@@ -14,6 +14,26 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -92,17 +112,17 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -180,9 +200,9 @@
-
+
-
+
diff --git a/packages/fineui/dist/font/iconfont.ttf b/packages/fineui/dist/font/iconfont.ttf
index 8a6a119ee..243165efe 100644
Binary files a/packages/fineui/dist/font/iconfont.ttf and b/packages/fineui/dist/font/iconfont.ttf differ
diff --git a/packages/fineui/dist/font/iconfont.woff b/packages/fineui/dist/font/iconfont.woff
index 299ff37ab..e8fb8e441 100644
Binary files a/packages/fineui/dist/font/iconfont.woff and b/packages/fineui/dist/font/iconfont.woff differ
diff --git a/packages/fineui/dist/font/iconfont.woff2 b/packages/fineui/dist/font/iconfont.woff2
index 044ee253e..2229cff55 100644
Binary files a/packages/fineui/dist/font/iconfont.woff2 and b/packages/fineui/dist/font/iconfont.woff2 differ
diff --git a/packages/fineui/src/base/foundation/message.js b/packages/fineui/src/base/foundation/message.js
index 81ec43818..5eb3e9d69 100644
--- a/packages/fineui/src/base/foundation/message.js
+++ b/packages/fineui/src/base/foundation/message.js
@@ -201,6 +201,9 @@ function _show(hasCancel, title, message, callback, config = {}) {
type: VerticalLayout.xtype,
cls: "bi-card bi-border-radius",
width: 450,
+ css: {
+ 'max-height': '100%'
+ },
hgap: 32,
attributes: {
tabIndex: 1,
diff --git a/packages/fineui/src/base/single/input/file.js b/packages/fineui/src/base/single/input/file.js
index c89a02e70..63278b6e0 100644
--- a/packages/fineui/src/base/single/input/file.js
+++ b/packages/fineui/src/base/single/input/file.js
@@ -242,14 +242,11 @@ const sendFile = (toString => {
upload.onloadstart();
}
}
- const boundary = `AjaxUploadBoundary${new Date().getTime()}`;
- xhr.setRequestHeader("Content-Type", `multipart/form-data; boundary=${boundary}`);
if (handler.file.getAsBinary) {
+ const boundary = `AjaxUploadBoundary${new Date().getTime()}`;
+ xhr.setRequestHeader("Content-Type", `multipart/form-data; boundary=${boundary}`);
xhr[xhr.sendAsBinary ? "sendAsBinary" : "send"](multipart(boundary, handler.name, handler.file));
} else {
- xhr.setRequestHeader("Content-Type", "multipart/form-data");
- // xhr.setRequestHeader("X-Name", handler.name);
- // xhr.setRequestHeader("X-File-Name", handler.file.fileName);
const form = new FormData();
form.append("FileData", handler.file);
xhr.send(form);
diff --git a/packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js b/packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js
index dce27ea81..c27328e72 100644
--- a/packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js
+++ b/packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js
@@ -216,6 +216,7 @@ export class TextValueCombo extends Widget {
}
setValue(v) {
+ this.options.value = v;
this.combo.setValue(v);
this._checkError(v);
}
diff --git a/packages/fineui/src/core/1.lodash.js b/packages/fineui/src/core/1.lodash.js
index ca3a3ade0..2658bdf48 100644
--- a/packages/fineui/src/core/1.lodash.js
+++ b/packages/fineui/src/core/1.lodash.js
@@ -6142,6 +6142,30 @@
return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
}
+ /**
+ * This method is like `uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @see uniq, uniqBy
+ * @example
+ *
+ * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]
+ *
+ * uniqWith(objects, isEqual)
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+ function uniqWith(array, comparator) {
+ comparator = typeof comparator === 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+ }
+
/**
* This method is like `_.zip` except that it accepts an array of grouped
* elements and creates an array regrouping the elements to their pre-zip
@@ -10041,6 +10065,7 @@
lodash.union = union;
lodash.uniq = uniq;
lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
lodash.unzip = unzip;
lodash.values = values;
lodash.without = without;
diff --git a/packages/fineui/src/core/2.base.js b/packages/fineui/src/core/2.base.js
index acd34eca7..fe07103c6 100644
--- a/packages/fineui/src/core/2.base.js
+++ b/packages/fineui/src/core/2.base.js
@@ -482,6 +482,7 @@ _.each(
"take",
"takeRight",
"uniqBy",
+ "uniqWith"
],
name => {
lodashFns[name] = _apply(name);
@@ -510,6 +511,7 @@ export const range = lodashFns.range;
export const take = lodashFns.take;
export const takeRight = lodashFns.takeRight;
export const uniqBy = lodashFns.uniqBy;
+export const uniqWith = lodashFns.uniqWith;
export const findIndex = lodashFns.findIndex;
export const findLastIndex = lodashFns.findLastIndex;
@@ -972,7 +974,7 @@ export let nextTick = /*!PURE*/(function () {
pending = true;
timerFunc();
}
-
+
if (!cb && typeof Promise !== "undefined") {
return new Promise((resolve, reject) => {
_resolve = resolve;
@@ -983,7 +985,7 @@ export let nextTick = /*!PURE*/(function () {
export const setNextTick = (fn) => {
nextTick = fn;
-}
+}
// 数字相关方法
_.each(["random"], name => {
@@ -1367,7 +1369,7 @@ export function parseDateTime(str, fmt) {
m = today.getMonth();
}
if (_global.isNaN(d)) {
- d = Math.min(getMonthDays(getDate(y, m)), today.getDate());
+ d = 1;
}
if (_global.isNaN(hr)) {
hr = today.getHours();
diff --git a/packages/fineui/src/core/wrapper/layout/layout.card.js b/packages/fineui/src/core/wrapper/layout/layout.card.js
index f2f717938..940831926 100644
--- a/packages/fineui/src/core/wrapper/layout/layout.card.js
+++ b/packages/fineui/src/core/wrapper/layout/layout.card.js
@@ -107,9 +107,12 @@ export class CardLayout extends Layout {
throw new Error("cardName not exist", cardName);
}
- const child = this._children[this._getChildName(cardName)];
+ let child = this._children[this._getChildName(cardName)];
this._deleteCardByName(cardName);
- child && child._destroy();
+ if (child) {
+ child._destroy();
+ child = null;
+ }
}
addCardByName(cardName, cardItem) {
diff --git a/packages/fineui/src/fix/fix.compact.js b/packages/fineui/src/fix/fix.compact.js
index 40b02fe8f..e76aea6a4 100644
--- a/packages/fineui/src/fix/fix.compact.js
+++ b/packages/fineui/src/fix/fix.compact.js
@@ -76,7 +76,7 @@ function popTarget() {
export const Model = Fix.Model;
const oldWatch = Fix.watch;
-Fix.watch = function(model, expOrFn, cb, options) {
+Fix.watch = function (model, expOrFn, cb, options) {
if (isPlainObject(cb)) {
options = cb;
cb = cb.handler;
@@ -89,7 +89,7 @@ Fix.watch = function(model, expOrFn, cb, options) {
this,
model,
expOrFn,
- function() {
+ function () {
options && options.store && pushTarget(options.store);
let res;
try {
@@ -167,7 +167,7 @@ export function createStore() {
}
const _init = Widget.prototype._init;
-Widget.prototype._init = function() {
+Widget.prototype._init = function () {
const needPop = createStore.call(this);
try {
_init.apply(this, arguments);
@@ -178,7 +178,7 @@ Widget.prototype._init = function() {
};
const __initWatch = Widget.prototype.__initWatch;
-Widget.prototype.__initWatch = function() {
+Widget.prototype.__initWatch = function () {
__initWatch.apply(this, arguments);
const workerMode =
Providers.getProvider("bi.provider.system").getWorkerMode();
@@ -191,7 +191,7 @@ Widget.prototype.__initWatch = function() {
};
const unMount = Widget.prototype.__destroy;
-Widget.prototype.__destroy = function() {
+Widget.prototype.__destroy = function () {
try {
unMount.apply(this, arguments);
} catch (e) {
@@ -204,6 +204,7 @@ Widget.prototype.__destroy = function() {
unwatch();
});
});
+ Fix.cleanupDeps();
this._watchers && (this._watchers = []);
if (this.store) {
this.store._parent && (this.store._parent = null);
@@ -213,7 +214,7 @@ Widget.prototype.__destroy = function() {
delete this.__cacheStore;
};
-Widget.prototype.__watch = function(getter, handler, options) {
+Widget.prototype.__watch = function (getter, handler, options) {
this._watchers = this._watchers || [];
const watcher = new Fix.Watcher(
null,
@@ -235,7 +236,7 @@ Widget.prototype.__watch = function(getter, handler, options) {
_.each(["_render", "__afterRender", "_mount", "__afterMount"], (name) => {
const old = Widget.prototype[name];
old &&
- (Widget.prototype[name] = function() {
+ (Widget.prototype[name] = function () {
this.store && pushTarget(this.store);
let res;
try {
diff --git a/packages/fineui/src/fix/fix.js b/packages/fineui/src/fix/fix.js
index 387eb3984..51e550ae0 100644
--- a/packages/fineui/src/fix/fix.js
+++ b/packages/fineui/src/fix/fix.js
@@ -110,7 +110,15 @@ function isExtensible(obj) {
function remove(arr, item) {
- if (arr && arr.length) {
+ if (!arr) {
+ return;
+ }
+ const len = arr.length;
+ if (len) {
+ if (item === arr[len - 1]) {
+ arr.length = len - 1;
+ return;
+ }
const index = arr.indexOf(item);
if (index > -1) {
return arr.splice(index, 1);
@@ -929,7 +937,7 @@ function watch(model, expOrFn, cb, options) {
return m;
} : parsePath(exp);
const v = getter.call(model, model);
- if (v.__ob__) {
+ if (v && v.__ob__) {
const dep = new Dep();
if (isGlobal) {
(v.__ob__._scopeDeps || (v.__ob__._scopeDeps = [])).push(dep);
diff --git a/packages/fineui/src/widget/multiselect/loader.js b/packages/fineui/src/widget/multiselect/loader.js
index f39c35ef7..933c96e43 100644
--- a/packages/fineui/src/widget/multiselect/loader.js
+++ b/packages/fineui/src/widget/multiselect/loader.js
@@ -73,14 +73,14 @@ export class MultiSelectInnerLoader extends Widget {
if (this.cachItems && this.cachItems.length > 0) {
this.next.setLoaded();
const items = this._composeItems(this.cachItems.slice(0, 100));
- this.addItems(items);
this.cachItems = this.cachItems.slice(100);
+ this.addItems(items);
return;
}
o.itemsCreator.apply(this, [
{ times: ++this.times },
- function() {
+ function () {
self.next.setLoaded();
self.addItems(...arguments);
}
@@ -105,7 +105,7 @@ export class MultiSelectInnerLoader extends Widget {
],
value: o.value,
});
- this.button_group.on(Controller.EVENT_CHANGE, function(type, value, obj) {
+ this.button_group.on(Controller.EVENT_CHANGE, function (type, value, obj) {
if (type === Events.CLICK) {
const node = self.cachGroup.getNodeByValue(value);
if (node) {
@@ -158,12 +158,12 @@ export class MultiSelectInnerLoader extends Widget {
});
o.isDefaultInit &&
- isEmpty(o.items) &&
- nextTick(
- bind(function() {
- o.isDefaultInit && isEmpty(o.items) && this._populate();
- }, this)
- );
+ isEmpty(o.items) &&
+ nextTick(
+ bind(function () {
+ o.isDefaultInit && isEmpty(o.items) && this._populate();
+ }, this)
+ );
}
hasNext() {
@@ -221,7 +221,7 @@ export class MultiSelectInnerLoader extends Widget {
if (arguments.length === 0 && isFunction(o.itemsCreator)) {
o.itemsCreator.apply(this, [
{ times: 1 },
- function(items, keyword) {
+ function (items, keyword) {
if (arguments.length === 0) {
throw new Error("object already registered");
}
diff --git a/packages/fineui/typescript/core/base.ts b/packages/fineui/typescript/core/base.ts
index 10d9794ec..07b481d34 100644
--- a/packages/fineui/typescript/core/base.ts
+++ b/packages/fineui/typescript/core/base.ts
@@ -172,6 +172,8 @@ export declare function uniq(array: T[], isSorted?: boolean, iteratee?: any,
export declare function uniqBy(array: T[], iteratee?: any, context?: any): T[];
+export declare function uniqWith(array: T[], comparator?: any): T[];
+
// 对象相关方法
export declare function keys(object: object): string[];