فهرست منبع

添加Safari/IE对Object.assign函数的支持

zhuth 7 سال پیش
والد
کامیت
059e8d749b
1فایلهای تغییر یافته به همراه21 افزوده شده و 1 حذف شده
  1. 21 1
      kanban-console/src/main/webapp/resources/lib/i18n/i18n.js

+ 21 - 1
kanban-console/src/main/webapp/resources/lib/i18n/i18n.js

@@ -1018,4 +1018,24 @@ function turnGSSuccess(fn){
 
 function turnESSuccess(fn){
 	Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_turnEs, fn || Ext.emptyFn);
-}
+}
+Object.assign = Object.assign || function(target, varArgs) {
+	if (target == null) {
+		throw new TypeError('Cannot convert undefined or null to object');
+	}
+
+	var to = Object(target);
+
+	for (var index = 1; index < arguments.length; index++) {
+		var nextSource = arguments[index];
+
+		if (nextSource != null) {
+			for (var nextKey in nextSource) {
+				if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
+					to[nextKey] = nextSource[nextKey];
+				}
+			}
+		}
+	}
+	return to;
+};