@94ai/nf-popup-lazy-select 5.0.7 → 5.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -697,7 +697,42 @@ function Focus(ref2) {
|
|
|
697
697
|
}
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
|
|
700
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
701
|
+
function getDefaultExportFromCjs(x) {
|
|
702
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
703
|
+
}
|
|
704
|
+
function getAugmentedNamespace(n) {
|
|
705
|
+
if (n.__esModule)
|
|
706
|
+
return n;
|
|
707
|
+
var f = n.default;
|
|
708
|
+
if (typeof f == "function") {
|
|
709
|
+
var a = function a2() {
|
|
710
|
+
if (this instanceof a2) {
|
|
711
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
712
|
+
}
|
|
713
|
+
return f.apply(this, arguments);
|
|
714
|
+
};
|
|
715
|
+
a.prototype = f.prototype;
|
|
716
|
+
} else
|
|
717
|
+
a = {};
|
|
718
|
+
Object.defineProperty(a, "__esModule", {
|
|
719
|
+
value: true
|
|
720
|
+
});
|
|
721
|
+
Object.keys(n).forEach(function(k) {
|
|
722
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
723
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
724
|
+
enumerable: true,
|
|
725
|
+
get: function() {
|
|
726
|
+
return n[k];
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
return a;
|
|
731
|
+
}
|
|
732
|
+
var locale = {};
|
|
733
|
+
var zhCN = {};
|
|
734
|
+
zhCN.__esModule = true;
|
|
735
|
+
zhCN.default = {
|
|
701
736
|
el: {
|
|
702
737
|
colorpicker: {
|
|
703
738
|
confirm: "确定",
|
|
@@ -893,17 +928,86 @@ deepmerge.all = function deepmergeAll(array, optionsArgument) {
|
|
|
893
928
|
});
|
|
894
929
|
};
|
|
895
930
|
var deepmerge_1 = deepmerge;
|
|
896
|
-
const
|
|
897
|
-
|
|
898
|
-
|
|
931
|
+
const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
932
|
+
__proto__: null,
|
|
933
|
+
default: deepmerge_1
|
|
934
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
935
|
+
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(es);
|
|
936
|
+
var format$2 = {};
|
|
937
|
+
var util = {};
|
|
938
|
+
var types = {};
|
|
939
|
+
types.__esModule = true;
|
|
940
|
+
types.isString = isString;
|
|
941
|
+
types.isObject = isObject;
|
|
942
|
+
types.isHtmlElement = isHtmlElement;
|
|
943
|
+
function isString(obj) {
|
|
944
|
+
return Object.prototype.toString.call(obj) === "[object String]";
|
|
945
|
+
}
|
|
946
|
+
function isObject(obj) {
|
|
947
|
+
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
948
|
+
}
|
|
949
|
+
function isHtmlElement(node) {
|
|
950
|
+
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
951
|
+
}
|
|
952
|
+
types.isFunction = function isFunction(functionToCheck) {
|
|
953
|
+
var getType = {};
|
|
954
|
+
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
955
|
+
};
|
|
956
|
+
types.isUndefined = function isUndefined(val) {
|
|
957
|
+
return val === void 0;
|
|
958
|
+
};
|
|
959
|
+
types.isDefined = function isDefined(val) {
|
|
960
|
+
return val !== void 0 && val !== null;
|
|
961
|
+
};
|
|
962
|
+
util.__esModule = true;
|
|
963
|
+
util.isEmpty = util.isEqual = util.arrayEquals = util.looseEqual = util.capitalize = util.kebabCase = util.autoprefixer = util.isFirefox = util.isEdge = util.isIE = util.coerceTruthyValueToArray = util.arrayFind = util.arrayFindIndex = util.escapeRegexpString = util.valueEquals = util.generateId = util.getValueByPath = void 0;
|
|
964
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
965
|
+
return typeof obj;
|
|
966
|
+
} : function(obj) {
|
|
967
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
968
|
+
};
|
|
969
|
+
util.noop = noop;
|
|
970
|
+
util.hasOwn = hasOwn$1;
|
|
971
|
+
util.toObject = toObject;
|
|
972
|
+
util.getPropByPath = getPropByPath;
|
|
973
|
+
util.rafThrottle = rafThrottle;
|
|
974
|
+
util.objToArray = objToArray;
|
|
975
|
+
var _vue$1 = Vue;
|
|
976
|
+
var _vue2$1 = _interopRequireDefault$1(_vue$1);
|
|
977
|
+
var _types = types;
|
|
978
|
+
function _interopRequireDefault$1(obj) {
|
|
979
|
+
return obj && obj.__esModule ? obj : {
|
|
980
|
+
default: obj
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
984
|
+
function noop() {
|
|
985
|
+
}
|
|
986
|
+
function hasOwn$1(obj, key) {
|
|
987
|
+
return hasOwnProperty$1.call(obj, key);
|
|
988
|
+
}
|
|
989
|
+
function extend(to, _from) {
|
|
990
|
+
for (var key in _from) {
|
|
991
|
+
to[key] = _from[key];
|
|
992
|
+
}
|
|
993
|
+
return to;
|
|
899
994
|
}
|
|
900
|
-
|
|
995
|
+
function toObject(arr) {
|
|
996
|
+
var res = {};
|
|
997
|
+
for (var i = 0; i < arr.length; i++) {
|
|
998
|
+
if (arr[i]) {
|
|
999
|
+
extend(res, arr[i]);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
return res;
|
|
1003
|
+
}
|
|
1004
|
+
util.getValueByPath = function getValueByPath(object, prop) {
|
|
901
1005
|
prop = prop || "";
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
for (
|
|
906
|
-
|
|
1006
|
+
var paths = prop.split(".");
|
|
1007
|
+
var current = object;
|
|
1008
|
+
var result = null;
|
|
1009
|
+
for (var i = 0, j = paths.length; i < j; i++) {
|
|
1010
|
+
var path = paths[i];
|
|
907
1011
|
if (!current)
|
|
908
1012
|
break;
|
|
909
1013
|
if (i === j - 1) {
|
|
@@ -914,7 +1018,35 @@ const getValueByPath = function(object, prop) {
|
|
|
914
1018
|
}
|
|
915
1019
|
return result;
|
|
916
1020
|
};
|
|
917
|
-
|
|
1021
|
+
function getPropByPath(obj, path, strict) {
|
|
1022
|
+
var tempObj = obj;
|
|
1023
|
+
path = path.replace(/\[(\w+)\]/g, ".$1");
|
|
1024
|
+
path = path.replace(/^\./, "");
|
|
1025
|
+
var keyArr = path.split(".");
|
|
1026
|
+
var i = 0;
|
|
1027
|
+
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
1028
|
+
if (!tempObj && !strict)
|
|
1029
|
+
break;
|
|
1030
|
+
var key = keyArr[i];
|
|
1031
|
+
if (key in tempObj) {
|
|
1032
|
+
tempObj = tempObj[key];
|
|
1033
|
+
} else {
|
|
1034
|
+
if (strict) {
|
|
1035
|
+
throw new Error("please transfer a valid prop path to form item!");
|
|
1036
|
+
}
|
|
1037
|
+
break;
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
return {
|
|
1041
|
+
o: tempObj,
|
|
1042
|
+
k: keyArr[i],
|
|
1043
|
+
v: tempObj ? tempObj[keyArr[i]] : null
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
util.generateId = function generateId() {
|
|
1047
|
+
return Math.floor(Math.random() * 1e4);
|
|
1048
|
+
};
|
|
1049
|
+
util.valueEquals = function valueEquals(a, b) {
|
|
918
1050
|
if (a === b)
|
|
919
1051
|
return true;
|
|
920
1052
|
if (!(a instanceof Array))
|
|
@@ -923,33 +1055,169 @@ const valueEquals = (a, b) => {
|
|
|
923
1055
|
return false;
|
|
924
1056
|
if (a.length !== b.length)
|
|
925
1057
|
return false;
|
|
926
|
-
for (
|
|
1058
|
+
for (var i = 0; i !== a.length; ++i) {
|
|
927
1059
|
if (a[i] !== b[i])
|
|
928
1060
|
return false;
|
|
929
1061
|
}
|
|
930
1062
|
return true;
|
|
931
1063
|
};
|
|
932
|
-
|
|
933
|
-
|
|
1064
|
+
util.escapeRegexpString = function escapeRegexpString() {
|
|
1065
|
+
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
1066
|
+
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
934
1067
|
};
|
|
935
|
-
|
|
936
|
-
|
|
1068
|
+
var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
|
|
1069
|
+
for (var i = 0; i !== arr.length; ++i) {
|
|
1070
|
+
if (pred(arr[i])) {
|
|
1071
|
+
return i;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
return -1;
|
|
937
1075
|
};
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
1076
|
+
util.arrayFind = function arrayFind(arr, pred) {
|
|
1077
|
+
var idx = arrayFindIndex(arr, pred);
|
|
1078
|
+
return idx !== -1 ? arr[idx] : void 0;
|
|
1079
|
+
};
|
|
1080
|
+
util.coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
|
|
1081
|
+
if (Array.isArray(val)) {
|
|
1082
|
+
return val;
|
|
1083
|
+
} else if (val) {
|
|
1084
|
+
return [val];
|
|
1085
|
+
} else {
|
|
1086
|
+
return [];
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
util.isIE = function isIE() {
|
|
1090
|
+
return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
1091
|
+
};
|
|
1092
|
+
util.isEdge = function isEdge() {
|
|
1093
|
+
return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
|
|
1094
|
+
};
|
|
1095
|
+
util.isFirefox = function isFirefox() {
|
|
1096
|
+
return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
1097
|
+
};
|
|
1098
|
+
util.autoprefixer = function autoprefixer(style) {
|
|
1099
|
+
if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
|
|
1100
|
+
return style;
|
|
1101
|
+
var rules = ["transform", "transition", "animation"];
|
|
1102
|
+
var prefixes = ["ms-", "webkit-"];
|
|
1103
|
+
rules.forEach(function(rule) {
|
|
1104
|
+
var value = style[rule];
|
|
1105
|
+
if (rule && value) {
|
|
1106
|
+
prefixes.forEach(function(prefix) {
|
|
1107
|
+
style[prefix + rule] = value;
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
});
|
|
1111
|
+
return style;
|
|
1112
|
+
};
|
|
1113
|
+
util.kebabCase = function kebabCase(str) {
|
|
1114
|
+
var hyphenateRE = /([^-])([A-Z])/g;
|
|
1115
|
+
return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
|
|
1116
|
+
};
|
|
1117
|
+
util.capitalize = function capitalize(str) {
|
|
1118
|
+
if (!(0, _types.isString)(str))
|
|
1119
|
+
return str;
|
|
1120
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
1121
|
+
};
|
|
1122
|
+
var looseEqual = util.looseEqual = function looseEqual2(a, b) {
|
|
1123
|
+
var isObjectA = (0, _types.isObject)(a);
|
|
1124
|
+
var isObjectB = (0, _types.isObject)(b);
|
|
1125
|
+
if (isObjectA && isObjectB) {
|
|
1126
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
1127
|
+
} else if (!isObjectA && !isObjectB) {
|
|
1128
|
+
return String(a) === String(b);
|
|
1129
|
+
} else {
|
|
1130
|
+
return false;
|
|
1131
|
+
}
|
|
1132
|
+
};
|
|
1133
|
+
var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
|
|
1134
|
+
arrayA = arrayA || [];
|
|
1135
|
+
arrayB = arrayB || [];
|
|
1136
|
+
if (arrayA.length !== arrayB.length) {
|
|
1137
|
+
return false;
|
|
1138
|
+
}
|
|
1139
|
+
for (var i = 0; i < arrayA.length; i++) {
|
|
1140
|
+
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
1141
|
+
return false;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
return true;
|
|
1145
|
+
};
|
|
1146
|
+
util.isEqual = function isEqual(value1, value2) {
|
|
1147
|
+
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
1148
|
+
return arrayEquals(value1, value2);
|
|
1149
|
+
}
|
|
1150
|
+
return looseEqual(value1, value2);
|
|
1151
|
+
};
|
|
1152
|
+
var isEmpty = util.isEmpty = function isEmpty2(val) {
|
|
1153
|
+
if (val == null)
|
|
1154
|
+
return true;
|
|
1155
|
+
if (typeof val === "boolean")
|
|
1156
|
+
return false;
|
|
1157
|
+
if (typeof val === "number")
|
|
1158
|
+
return !val;
|
|
1159
|
+
if (val instanceof Error)
|
|
1160
|
+
return val.message === "";
|
|
1161
|
+
switch (Object.prototype.toString.call(val)) {
|
|
1162
|
+
case "[object String]":
|
|
1163
|
+
case "[object Array]":
|
|
1164
|
+
return !val.length;
|
|
1165
|
+
case "[object File]":
|
|
1166
|
+
case "[object Map]":
|
|
1167
|
+
case "[object Set]": {
|
|
1168
|
+
return !val.size;
|
|
1169
|
+
}
|
|
1170
|
+
case "[object Object]": {
|
|
1171
|
+
return !Object.keys(val).length;
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
return false;
|
|
1175
|
+
};
|
|
1176
|
+
function rafThrottle(fn) {
|
|
1177
|
+
var locked = false;
|
|
1178
|
+
return function() {
|
|
1179
|
+
var _this = this;
|
|
1180
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
1181
|
+
args[_key] = arguments[_key];
|
|
1182
|
+
}
|
|
1183
|
+
if (locked)
|
|
1184
|
+
return;
|
|
1185
|
+
locked = true;
|
|
1186
|
+
window.requestAnimationFrame(function(_) {
|
|
1187
|
+
fn.apply(_this, args);
|
|
1188
|
+
locked = false;
|
|
1189
|
+
});
|
|
1190
|
+
};
|
|
1191
|
+
}
|
|
1192
|
+
function objToArray(obj) {
|
|
1193
|
+
if (Array.isArray(obj)) {
|
|
1194
|
+
return obj;
|
|
1195
|
+
}
|
|
1196
|
+
return isEmpty(obj) ? [] : [obj];
|
|
1197
|
+
}
|
|
1198
|
+
format$2.__esModule = true;
|
|
1199
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
1200
|
+
return typeof obj;
|
|
1201
|
+
} : function(obj) {
|
|
1202
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1203
|
+
};
|
|
1204
|
+
format$2.default = function(Vue2) {
|
|
1205
|
+
function template(string) {
|
|
1206
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1207
|
+
args[_key - 1] = arguments[_key];
|
|
1208
|
+
}
|
|
1209
|
+
if (args.length === 1 && _typeof(args[0]) === "object") {
|
|
942
1210
|
args = args[0];
|
|
943
1211
|
}
|
|
944
1212
|
if (!args || !args.hasOwnProperty) {
|
|
945
1213
|
args = {};
|
|
946
1214
|
}
|
|
947
|
-
return string.replace(RE_NARGS, (match, prefix, i, index)
|
|
948
|
-
|
|
1215
|
+
return string.replace(RE_NARGS$1, function(match, prefix, i, index) {
|
|
1216
|
+
var result = void 0;
|
|
949
1217
|
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
950
1218
|
return i;
|
|
951
1219
|
} else {
|
|
952
|
-
result = hasOwn(args, i) ? args[i] : null;
|
|
1220
|
+
result = (0, _util.hasOwn)(args, i) ? args[i] : null;
|
|
953
1221
|
if (result === null || result === void 0) {
|
|
954
1222
|
return "";
|
|
955
1223
|
}
|
|
@@ -958,50 +1226,78 @@ function Format(Vue2) {
|
|
|
958
1226
|
});
|
|
959
1227
|
}
|
|
960
1228
|
return template;
|
|
1229
|
+
};
|
|
1230
|
+
var _util = util;
|
|
1231
|
+
var RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
1232
|
+
locale.__esModule = true;
|
|
1233
|
+
locale.i18n = locale.use = locale.t = void 0;
|
|
1234
|
+
var _zhCN = zhCN;
|
|
1235
|
+
var _zhCN2 = _interopRequireDefault(_zhCN);
|
|
1236
|
+
var _vue = Vue;
|
|
1237
|
+
var _vue2 = _interopRequireDefault(_vue);
|
|
1238
|
+
var _deepmerge = require$$2;
|
|
1239
|
+
var _deepmerge2 = _interopRequireDefault(_deepmerge);
|
|
1240
|
+
var _format = format$2;
|
|
1241
|
+
var _format2 = _interopRequireDefault(_format);
|
|
1242
|
+
function _interopRequireDefault(obj) {
|
|
1243
|
+
return obj && obj.__esModule ? obj : {
|
|
1244
|
+
default: obj
|
|
1245
|
+
};
|
|
961
1246
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
if (typeof vuei18n === "function" && !!
|
|
968
|
-
if (!merged) {
|
|
969
|
-
merged = true;
|
|
970
|
-
|
|
1247
|
+
var format$1 = (0, _format2.default)(_vue2.default);
|
|
1248
|
+
var lang$1 = _zhCN2.default;
|
|
1249
|
+
var merged$1 = false;
|
|
1250
|
+
var i18nHandler$1 = function i18nHandler() {
|
|
1251
|
+
var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
|
|
1252
|
+
if (typeof vuei18n === "function" && !!_vue2.default.locale) {
|
|
1253
|
+
if (!merged$1) {
|
|
1254
|
+
merged$1 = true;
|
|
1255
|
+
_vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang$1, _vue2.default.locale(_vue2.default.config.lang) || {}, {
|
|
971
1256
|
clone: true
|
|
972
1257
|
}));
|
|
973
1258
|
}
|
|
974
1259
|
return vuei18n.apply(this, arguments);
|
|
975
1260
|
}
|
|
976
1261
|
};
|
|
977
|
-
|
|
978
|
-
|
|
1262
|
+
var t$1 = locale.t = function t(path, options) {
|
|
1263
|
+
var value = i18nHandler$1.apply(this, arguments);
|
|
979
1264
|
if (value !== null && value !== void 0)
|
|
980
1265
|
return value;
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
for (
|
|
984
|
-
|
|
1266
|
+
var array = path.split(".");
|
|
1267
|
+
var current = lang$1;
|
|
1268
|
+
for (var i = 0, j = array.length; i < j; i++) {
|
|
1269
|
+
var property = array[i];
|
|
985
1270
|
value = current[property];
|
|
986
1271
|
if (i === j - 1)
|
|
987
|
-
return format(value, options);
|
|
1272
|
+
return format$1(value, options);
|
|
988
1273
|
if (!value)
|
|
989
1274
|
return "";
|
|
990
1275
|
current = value;
|
|
991
1276
|
}
|
|
992
1277
|
return "";
|
|
993
1278
|
};
|
|
994
|
-
|
|
1279
|
+
var use = locale.use = function use2(l) {
|
|
1280
|
+
lang$1 = l || lang$1;
|
|
1281
|
+
};
|
|
1282
|
+
var i18n = locale.i18n = function i18n2(fn) {
|
|
1283
|
+
i18nHandler$1 = fn || i18nHandler$1;
|
|
1284
|
+
};
|
|
1285
|
+
locale.default = {
|
|
1286
|
+
use,
|
|
1287
|
+
t: t$1,
|
|
1288
|
+
i18n
|
|
1289
|
+
};
|
|
1290
|
+
var _locale = locale;
|
|
1291
|
+
var _default = {
|
|
995
1292
|
methods: {
|
|
996
|
-
t(
|
|
997
|
-
|
|
1293
|
+
t: function t2() {
|
|
1294
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
1295
|
+
args[_key] = arguments[_key];
|
|
1296
|
+
}
|
|
1297
|
+
return _locale.t.apply(this, args);
|
|
998
1298
|
}
|
|
999
1299
|
}
|
|
1000
1300
|
};
|
|
1001
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
1002
|
-
function getDefaultExportFromCjs(x) {
|
|
1003
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
1004
|
-
}
|
|
1005
1301
|
var throttle$1 = function(delay, noTrailing, callback, debounceMode) {
|
|
1006
1302
|
var timeoutID;
|
|
1007
1303
|
var lastExec = 0;
|
|
@@ -1069,6 +1365,224 @@ const removeResizeListener = function(element, fn) {
|
|
|
1069
1365
|
element.__ro__.disconnect();
|
|
1070
1366
|
}
|
|
1071
1367
|
};
|
|
1368
|
+
const defaultLang = {
|
|
1369
|
+
el: {
|
|
1370
|
+
colorpicker: {
|
|
1371
|
+
confirm: "确定",
|
|
1372
|
+
clear: "清空"
|
|
1373
|
+
},
|
|
1374
|
+
datepicker: {
|
|
1375
|
+
now: "此刻",
|
|
1376
|
+
today: "今天",
|
|
1377
|
+
cancel: "取消",
|
|
1378
|
+
clear: "清空",
|
|
1379
|
+
confirm: "确定",
|
|
1380
|
+
selectDate: "选择日期",
|
|
1381
|
+
selectTime: "选择时间",
|
|
1382
|
+
startDate: "开始日期",
|
|
1383
|
+
startTime: "开始时间",
|
|
1384
|
+
endDate: "结束日期",
|
|
1385
|
+
endTime: "结束时间",
|
|
1386
|
+
prevYear: "前一年",
|
|
1387
|
+
nextYear: "后一年",
|
|
1388
|
+
prevMonth: "上个月",
|
|
1389
|
+
nextMonth: "下个月",
|
|
1390
|
+
year: "年",
|
|
1391
|
+
month1: "1 月",
|
|
1392
|
+
month2: "2 月",
|
|
1393
|
+
month3: "3 月",
|
|
1394
|
+
month4: "4 月",
|
|
1395
|
+
month5: "5 月",
|
|
1396
|
+
month6: "6 月",
|
|
1397
|
+
month7: "7 月",
|
|
1398
|
+
month8: "8 月",
|
|
1399
|
+
month9: "9 月",
|
|
1400
|
+
month10: "10 月",
|
|
1401
|
+
month11: "11 月",
|
|
1402
|
+
month12: "12 月",
|
|
1403
|
+
// week: '周次',
|
|
1404
|
+
weeks: {
|
|
1405
|
+
sun: "日",
|
|
1406
|
+
mon: "一",
|
|
1407
|
+
tue: "二",
|
|
1408
|
+
wed: "三",
|
|
1409
|
+
thu: "四",
|
|
1410
|
+
fri: "五",
|
|
1411
|
+
sat: "六"
|
|
1412
|
+
},
|
|
1413
|
+
months: {
|
|
1414
|
+
jan: "一月",
|
|
1415
|
+
feb: "二月",
|
|
1416
|
+
mar: "三月",
|
|
1417
|
+
apr: "四月",
|
|
1418
|
+
may: "五月",
|
|
1419
|
+
jun: "六月",
|
|
1420
|
+
jul: "七月",
|
|
1421
|
+
aug: "八月",
|
|
1422
|
+
sep: "九月",
|
|
1423
|
+
oct: "十月",
|
|
1424
|
+
nov: "十一月",
|
|
1425
|
+
dec: "十二月"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
select: {
|
|
1429
|
+
loading: "加载中",
|
|
1430
|
+
noMatch: "无匹配数据",
|
|
1431
|
+
noData: "无数据",
|
|
1432
|
+
placeholder: "请选择"
|
|
1433
|
+
},
|
|
1434
|
+
cascader: {
|
|
1435
|
+
noMatch: "无匹配数据",
|
|
1436
|
+
loading: "加载中",
|
|
1437
|
+
placeholder: "请选择",
|
|
1438
|
+
noData: "暂无数据"
|
|
1439
|
+
},
|
|
1440
|
+
pagination: {
|
|
1441
|
+
goto: "前往",
|
|
1442
|
+
pagesize: "条/页",
|
|
1443
|
+
total: "共 {total} 条",
|
|
1444
|
+
pageClassifier: "页"
|
|
1445
|
+
},
|
|
1446
|
+
messagebox: {
|
|
1447
|
+
title: "提示",
|
|
1448
|
+
confirm: "确定",
|
|
1449
|
+
cancel: "取消",
|
|
1450
|
+
error: "输入的数据不合法!"
|
|
1451
|
+
},
|
|
1452
|
+
upload: {
|
|
1453
|
+
deleteTip: "按 delete 键可删除",
|
|
1454
|
+
delete: "删除",
|
|
1455
|
+
preview: "查看图片",
|
|
1456
|
+
continue: "继续上传"
|
|
1457
|
+
},
|
|
1458
|
+
table: {
|
|
1459
|
+
emptyText: "暂无数据",
|
|
1460
|
+
confirmFilter: "筛选",
|
|
1461
|
+
resetFilter: "重置",
|
|
1462
|
+
clearFilter: "全部",
|
|
1463
|
+
sumText: "合计"
|
|
1464
|
+
},
|
|
1465
|
+
tree: {
|
|
1466
|
+
emptyText: "暂无数据"
|
|
1467
|
+
},
|
|
1468
|
+
transfer: {
|
|
1469
|
+
noMatch: "无匹配数据",
|
|
1470
|
+
noData: "无数据",
|
|
1471
|
+
titles: ["列表 1", "列表 2"],
|
|
1472
|
+
filterPlaceholder: "请输入搜索内容",
|
|
1473
|
+
noCheckedFormat: "共 {total} 项",
|
|
1474
|
+
hasCheckedFormat: "已选 {checked}/{total} 项"
|
|
1475
|
+
},
|
|
1476
|
+
image: {
|
|
1477
|
+
error: "加载失败"
|
|
1478
|
+
},
|
|
1479
|
+
pageHeader: {
|
|
1480
|
+
title: "返回"
|
|
1481
|
+
},
|
|
1482
|
+
popconfirm: {
|
|
1483
|
+
confirmButtonText: "确定",
|
|
1484
|
+
cancelButtonText: "取消"
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
};
|
|
1488
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1489
|
+
function hasOwn(obj, key) {
|
|
1490
|
+
return hasOwnProperty.call(obj, key);
|
|
1491
|
+
}
|
|
1492
|
+
const getValueByPath2 = function(object, prop) {
|
|
1493
|
+
prop = prop || "";
|
|
1494
|
+
const paths = prop.split(".");
|
|
1495
|
+
let current = object;
|
|
1496
|
+
let result = null;
|
|
1497
|
+
for (let i = 0, j = paths.length; i < j; i++) {
|
|
1498
|
+
const path = paths[i];
|
|
1499
|
+
if (!current)
|
|
1500
|
+
break;
|
|
1501
|
+
if (i === j - 1) {
|
|
1502
|
+
result = current[path];
|
|
1503
|
+
break;
|
|
1504
|
+
}
|
|
1505
|
+
current = current[path];
|
|
1506
|
+
}
|
|
1507
|
+
return result;
|
|
1508
|
+
};
|
|
1509
|
+
const valueEquals2 = (a, b) => {
|
|
1510
|
+
if (a === b)
|
|
1511
|
+
return true;
|
|
1512
|
+
if (!(a instanceof Array))
|
|
1513
|
+
return false;
|
|
1514
|
+
if (!(b instanceof Array))
|
|
1515
|
+
return false;
|
|
1516
|
+
if (a.length !== b.length)
|
|
1517
|
+
return false;
|
|
1518
|
+
for (let i = 0; i !== a.length; ++i) {
|
|
1519
|
+
if (a[i] !== b[i])
|
|
1520
|
+
return false;
|
|
1521
|
+
}
|
|
1522
|
+
return true;
|
|
1523
|
+
};
|
|
1524
|
+
const isIE2 = function() {
|
|
1525
|
+
return !Vue.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
1526
|
+
};
|
|
1527
|
+
const isEdge2 = function() {
|
|
1528
|
+
return !Vue.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
|
|
1529
|
+
};
|
|
1530
|
+
const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
1531
|
+
function Format(Vue2) {
|
|
1532
|
+
function template(string, ...args) {
|
|
1533
|
+
if (args.length === 1 && typeof args[0] === "object") {
|
|
1534
|
+
args = args[0];
|
|
1535
|
+
}
|
|
1536
|
+
if (!args || !args.hasOwnProperty) {
|
|
1537
|
+
args = {};
|
|
1538
|
+
}
|
|
1539
|
+
return string.replace(RE_NARGS, (match, prefix, i, index) => {
|
|
1540
|
+
let result;
|
|
1541
|
+
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
1542
|
+
return i;
|
|
1543
|
+
} else {
|
|
1544
|
+
result = hasOwn(args, i) ? args[i] : null;
|
|
1545
|
+
if (result === null || result === void 0) {
|
|
1546
|
+
return "";
|
|
1547
|
+
}
|
|
1548
|
+
return result;
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
return template;
|
|
1553
|
+
}
|
|
1554
|
+
const format = Format();
|
|
1555
|
+
let lang = defaultLang;
|
|
1556
|
+
let merged = false;
|
|
1557
|
+
let i18nHandler2 = function() {
|
|
1558
|
+
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
|
1559
|
+
if (typeof vuei18n === "function" && !!Vue.locale) {
|
|
1560
|
+
if (!merged) {
|
|
1561
|
+
merged = true;
|
|
1562
|
+
Vue.locale(Vue.config.lang, deepmerge_1(lang, Vue.locale(Vue.config.lang) || {}, {
|
|
1563
|
+
clone: true
|
|
1564
|
+
}));
|
|
1565
|
+
}
|
|
1566
|
+
return vuei18n.apply(this, arguments);
|
|
1567
|
+
}
|
|
1568
|
+
};
|
|
1569
|
+
const t3 = function(path, options) {
|
|
1570
|
+
let value = i18nHandler2.apply(this, arguments);
|
|
1571
|
+
if (value !== null && value !== void 0)
|
|
1572
|
+
return value;
|
|
1573
|
+
const array = path.split(".");
|
|
1574
|
+
let current = lang;
|
|
1575
|
+
for (let i = 0, j = array.length; i < j; i++) {
|
|
1576
|
+
const property = array[i];
|
|
1577
|
+
value = current[property];
|
|
1578
|
+
if (i === j - 1)
|
|
1579
|
+
return format(value, options);
|
|
1580
|
+
if (!value)
|
|
1581
|
+
return "";
|
|
1582
|
+
current = value;
|
|
1583
|
+
}
|
|
1584
|
+
return "";
|
|
1585
|
+
};
|
|
1072
1586
|
function scrollIntoView(container, selected) {
|
|
1073
1587
|
if (Vue.prototype.$isServer)
|
|
1074
1588
|
return;
|
|
@@ -1654,7 +2168,7 @@ var popper$1 = { exports: {} };
|
|
|
1654
2168
|
modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
|
|
1655
2169
|
}
|
|
1656
2170
|
modifiersToRun.forEach((function(modifier) {
|
|
1657
|
-
if (
|
|
2171
|
+
if (isFunction2(modifier)) {
|
|
1658
2172
|
data = modifier.call(this, data);
|
|
1659
2173
|
}
|
|
1660
2174
|
}).bind(this));
|
|
@@ -1966,7 +2480,7 @@ var popper$1 = { exports: {} };
|
|
|
1966
2480
|
element.style[prop] = styles[prop] + unit;
|
|
1967
2481
|
});
|
|
1968
2482
|
}
|
|
1969
|
-
function
|
|
2483
|
+
function isFunction2(functionToCheck) {
|
|
1970
2484
|
var getType = {};
|
|
1971
2485
|
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
1972
2486
|
}
|
|
@@ -1983,8 +2497,8 @@ var popper$1 = { exports: {} };
|
|
|
1983
2497
|
}
|
|
1984
2498
|
function getBoundingClientRect(element) {
|
|
1985
2499
|
var rect = element.getBoundingClientRect();
|
|
1986
|
-
var
|
|
1987
|
-
var rectTop =
|
|
2500
|
+
var isIE3 = navigator.userAgent.indexOf("MSIE") != -1;
|
|
2501
|
+
var rectTop = isIE3 && element.tagName === "HTML" ? -element.scrollTop : rect.top;
|
|
1988
2502
|
return {
|
|
1989
2503
|
left: rect.left,
|
|
1990
2504
|
top: rectTop,
|
|
@@ -2297,7 +2811,7 @@ var _sfc_staticRenderFns$1 = [];
|
|
|
2297
2811
|
var __component__$1 = /* @__PURE__ */ normalizeComponent(_sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
2298
2812
|
const SelectMenu = __component__$1.exports;
|
|
2299
2813
|
const _sfc_main = {
|
|
2300
|
-
mixins: [Emitter,
|
|
2814
|
+
mixins: [Emitter, _default, Focus("reference"), NavigationMixin],
|
|
2301
2815
|
name: "ElSelect",
|
|
2302
2816
|
componentName: "ElSelect",
|
|
2303
2817
|
inject: {
|
|
@@ -2318,7 +2832,7 @@ const _sfc_main = {
|
|
|
2318
2832
|
return (this.elFormItem || {}).elFormItemSize;
|
|
2319
2833
|
},
|
|
2320
2834
|
readonly() {
|
|
2321
|
-
return !this.filterable || this.multiple || !
|
|
2835
|
+
return !this.filterable || this.multiple || !isIE2() && !isEdge2() && !this.visible;
|
|
2322
2836
|
},
|
|
2323
2837
|
showClose() {
|
|
2324
2838
|
let hasValue = this.multiple ? Array.isArray(this.value) && this.value.length > 0 : this.value !== void 0 && this.value !== null && this.value !== "";
|
|
@@ -2408,7 +2922,7 @@ const _sfc_main = {
|
|
|
2408
2922
|
placeholder: {
|
|
2409
2923
|
type: String,
|
|
2410
2924
|
default() {
|
|
2411
|
-
return
|
|
2925
|
+
return t3("el.select.placeholder");
|
|
2412
2926
|
}
|
|
2413
2927
|
},
|
|
2414
2928
|
defaultFirstOption: Boolean,
|
|
@@ -2474,7 +2988,7 @@ const _sfc_main = {
|
|
|
2474
2988
|
if (this.filterable && !this.multiple) {
|
|
2475
2989
|
this.inputLength = 20;
|
|
2476
2990
|
}
|
|
2477
|
-
if (!
|
|
2991
|
+
if (!valueEquals2(val, oldVal)) {
|
|
2478
2992
|
this.dispatch("ElFormItem", "el.form.change", val);
|
|
2479
2993
|
}
|
|
2480
2994
|
},
|
|
@@ -2612,26 +3126,26 @@ const _sfc_main = {
|
|
|
2612
3126
|
this.$nextTick(() => this.scrollToOption(this.selected));
|
|
2613
3127
|
},
|
|
2614
3128
|
emitChange(val) {
|
|
2615
|
-
if (!
|
|
3129
|
+
if (!valueEquals2(this.value, val)) {
|
|
2616
3130
|
this.$emit("change", val);
|
|
2617
3131
|
}
|
|
2618
3132
|
},
|
|
2619
3133
|
getOption(value) {
|
|
2620
3134
|
let option;
|
|
2621
|
-
const
|
|
3135
|
+
const isObject2 = Object.prototype.toString.call(value).toLowerCase() === "[object object]";
|
|
2622
3136
|
const isNull = Object.prototype.toString.call(value).toLowerCase() === "[object null]";
|
|
2623
|
-
const
|
|
3137
|
+
const isUndefined2 = Object.prototype.toString.call(value).toLowerCase() === "[object undefined]";
|
|
2624
3138
|
for (let i = this.cachedOptions.length - 1; i >= 0; i--) {
|
|
2625
3139
|
const cachedOption = this.cachedOptions[i];
|
|
2626
|
-
const
|
|
2627
|
-
if (
|
|
3140
|
+
const isEqual2 = isObject2 ? getValueByPath2(cachedOption.value, this.valueKey) === getValueByPath2(value, this.valueKey) : cachedOption.value === value;
|
|
3141
|
+
if (isEqual2) {
|
|
2628
3142
|
option = cachedOption;
|
|
2629
3143
|
break;
|
|
2630
3144
|
}
|
|
2631
3145
|
}
|
|
2632
3146
|
if (option)
|
|
2633
3147
|
return option;
|
|
2634
|
-
const label = !
|
|
3148
|
+
const label = !isObject2 && !isNull && !isUndefined2 ? value : "";
|
|
2635
3149
|
let newOption = {
|
|
2636
3150
|
value,
|
|
2637
3151
|
currentLabel: label
|
|
@@ -2807,14 +3321,14 @@ const _sfc_main = {
|
|
|
2807
3321
|
}
|
|
2808
3322
|
},
|
|
2809
3323
|
getValueIndex(arr = [], value) {
|
|
2810
|
-
const
|
|
2811
|
-
if (!
|
|
3324
|
+
const isObject2 = Object.prototype.toString.call(value).toLowerCase() === "[object object]";
|
|
3325
|
+
if (!isObject2) {
|
|
2812
3326
|
return arr.indexOf(value);
|
|
2813
3327
|
} else {
|
|
2814
3328
|
const valueKey = this.valueKey;
|
|
2815
3329
|
let index = -1;
|
|
2816
3330
|
arr.some((item, i) => {
|
|
2817
|
-
if (
|
|
3331
|
+
if (getValueByPath2(item, valueKey) === getValueByPath2(value, valueKey)) {
|
|
2818
3332
|
index = i;
|
|
2819
3333
|
return true;
|
|
2820
3334
|
}
|
|
@@ -2907,7 +3421,7 @@ const _sfc_main = {
|
|
|
2907
3421
|
if (Object.prototype.toString.call(item.value).toLowerCase() !== "[object object]") {
|
|
2908
3422
|
return item.value;
|
|
2909
3423
|
} else {
|
|
2910
|
-
return
|
|
3424
|
+
return getValueByPath2(item.value, this.valueKey);
|
|
2911
3425
|
}
|
|
2912
3426
|
}
|
|
2913
3427
|
},
|