@94ai/nf-popup-lazy-select 5.0.32 → 5.0.37
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, computed } from "vue-demi";
|
|
2
2
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
3
|
-
import
|
|
3
|
+
import Locale from "element-ui/lib/mixins/locale";
|
|
4
4
|
import ResizeObserver from "resize-observer-polyfill";
|
|
5
|
+
import Vue from "vue";
|
|
5
6
|
import { closest } from "@94ai/common-utils";
|
|
6
7
|
function _mergeNamespaces(n, m) {
|
|
7
8
|
for (var i = 0; i < m.length; i++) {
|
|
@@ -701,38 +702,74 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
|
|
|
701
702
|
function getDefaultExportFromCjs(x) {
|
|
702
703
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
703
704
|
}
|
|
704
|
-
function
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
705
|
+
var throttle$1 = function(delay, noTrailing, callback, debounceMode) {
|
|
706
|
+
var timeoutID;
|
|
707
|
+
var lastExec = 0;
|
|
708
|
+
if (typeof noTrailing !== "boolean") {
|
|
709
|
+
debounceMode = callback;
|
|
710
|
+
callback = noTrailing;
|
|
711
|
+
noTrailing = void 0;
|
|
712
|
+
}
|
|
713
|
+
function wrapper() {
|
|
714
|
+
var self2 = this;
|
|
715
|
+
var elapsed = Number(/* @__PURE__ */ new Date()) - lastExec;
|
|
716
|
+
var args = arguments;
|
|
717
|
+
function exec() {
|
|
718
|
+
lastExec = Number(/* @__PURE__ */ new Date());
|
|
719
|
+
callback.apply(self2, args);
|
|
720
|
+
}
|
|
721
|
+
function clear() {
|
|
722
|
+
timeoutID = void 0;
|
|
723
|
+
}
|
|
724
|
+
if (debounceMode && !timeoutID) {
|
|
725
|
+
exec();
|
|
726
|
+
}
|
|
727
|
+
if (timeoutID) {
|
|
728
|
+
clearTimeout(timeoutID);
|
|
729
|
+
}
|
|
730
|
+
if (debounceMode === void 0 && elapsed > delay) {
|
|
731
|
+
exec();
|
|
732
|
+
} else if (noTrailing !== true) {
|
|
733
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === void 0 ? delay - elapsed : delay);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
return wrapper;
|
|
737
|
+
};
|
|
738
|
+
var throttle = throttle$1;
|
|
739
|
+
var debounce = function(delay, atBegin, callback) {
|
|
740
|
+
return callback === void 0 ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
|
|
741
|
+
};
|
|
742
|
+
const debounce$1 = /* @__PURE__ */ getDefaultExportFromCjs(debounce);
|
|
743
|
+
const isServer = typeof window === "undefined";
|
|
744
|
+
const resizeHandler = function(entries) {
|
|
745
|
+
for (let entry of entries) {
|
|
746
|
+
const listeners = entry.target.__resizeListeners__ || [];
|
|
747
|
+
if (listeners.length) {
|
|
748
|
+
listeners.forEach((fn) => {
|
|
749
|
+
fn();
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
const addResizeListener = function(element, fn) {
|
|
755
|
+
if (isServer)
|
|
756
|
+
return;
|
|
757
|
+
if (!element.__resizeListeners__) {
|
|
758
|
+
element.__resizeListeners__ = [];
|
|
759
|
+
element.__ro__ = new ResizeObserver(resizeHandler);
|
|
760
|
+
element.__ro__.observe(element);
|
|
761
|
+
}
|
|
762
|
+
element.__resizeListeners__.push(fn);
|
|
763
|
+
};
|
|
764
|
+
const removeResizeListener = function(element, fn) {
|
|
765
|
+
if (!element || !element.__resizeListeners__)
|
|
766
|
+
return;
|
|
767
|
+
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
768
|
+
if (!element.__resizeListeners__.length) {
|
|
769
|
+
element.__ro__.disconnect();
|
|
770
|
+
}
|
|
771
|
+
};
|
|
772
|
+
const defaultLang = {
|
|
736
773
|
el: {
|
|
737
774
|
colorpicker: {
|
|
738
775
|
confirm: "确定",
|
|
@@ -928,568 +965,11 @@ deepmerge.all = function deepmergeAll(array, optionsArgument) {
|
|
|
928
965
|
});
|
|
929
966
|
};
|
|
930
967
|
var deepmerge_1 = deepmerge;
|
|
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;
|
|
994
|
-
}
|
|
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) {
|
|
1005
|
-
prop = prop || "";
|
|
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];
|
|
1011
|
-
if (!current)
|
|
1012
|
-
break;
|
|
1013
|
-
if (i === j - 1) {
|
|
1014
|
-
result = current[path];
|
|
1015
|
-
break;
|
|
1016
|
-
}
|
|
1017
|
-
current = current[path];
|
|
1018
|
-
}
|
|
1019
|
-
return result;
|
|
1020
|
-
};
|
|
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) {
|
|
1050
|
-
if (a === b)
|
|
1051
|
-
return true;
|
|
1052
|
-
if (!(a instanceof Array))
|
|
1053
|
-
return false;
|
|
1054
|
-
if (!(b instanceof Array))
|
|
1055
|
-
return false;
|
|
1056
|
-
if (a.length !== b.length)
|
|
1057
|
-
return false;
|
|
1058
|
-
for (var i = 0; i !== a.length; ++i) {
|
|
1059
|
-
if (a[i] !== b[i])
|
|
1060
|
-
return false;
|
|
1061
|
-
}
|
|
1062
|
-
return true;
|
|
1063
|
-
};
|
|
1064
|
-
util.escapeRegexpString = function escapeRegexpString() {
|
|
1065
|
-
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
1066
|
-
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
1067
|
-
};
|
|
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;
|
|
1075
|
-
};
|
|
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") {
|
|
1210
|
-
args = args[0];
|
|
1211
|
-
}
|
|
1212
|
-
if (!args || !args.hasOwnProperty) {
|
|
1213
|
-
args = {};
|
|
1214
|
-
}
|
|
1215
|
-
return string.replace(RE_NARGS$1, function(match, prefix, i, index) {
|
|
1216
|
-
var result = void 0;
|
|
1217
|
-
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
1218
|
-
return i;
|
|
1219
|
-
} else {
|
|
1220
|
-
result = (0, _util.hasOwn)(args, i) ? args[i] : null;
|
|
1221
|
-
if (result === null || result === void 0) {
|
|
1222
|
-
return "";
|
|
1223
|
-
}
|
|
1224
|
-
return result;
|
|
1225
|
-
}
|
|
1226
|
-
});
|
|
1227
|
-
}
|
|
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
|
-
};
|
|
1246
|
-
}
|
|
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) || {}, {
|
|
1256
|
-
clone: true
|
|
1257
|
-
}));
|
|
1258
|
-
}
|
|
1259
|
-
return vuei18n.apply(this, arguments);
|
|
1260
|
-
}
|
|
1261
|
-
};
|
|
1262
|
-
var t$1 = locale.t = function t(path, options) {
|
|
1263
|
-
var value = i18nHandler$1.apply(this, arguments);
|
|
1264
|
-
if (value !== null && value !== void 0)
|
|
1265
|
-
return value;
|
|
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];
|
|
1270
|
-
value = current[property];
|
|
1271
|
-
if (i === j - 1)
|
|
1272
|
-
return format$1(value, options);
|
|
1273
|
-
if (!value)
|
|
1274
|
-
return "";
|
|
1275
|
-
current = value;
|
|
1276
|
-
}
|
|
1277
|
-
return "";
|
|
1278
|
-
};
|
|
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 = {
|
|
1292
|
-
methods: {
|
|
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);
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
};
|
|
1301
|
-
var throttle$1 = function(delay, noTrailing, callback, debounceMode) {
|
|
1302
|
-
var timeoutID;
|
|
1303
|
-
var lastExec = 0;
|
|
1304
|
-
if (typeof noTrailing !== "boolean") {
|
|
1305
|
-
debounceMode = callback;
|
|
1306
|
-
callback = noTrailing;
|
|
1307
|
-
noTrailing = void 0;
|
|
1308
|
-
}
|
|
1309
|
-
function wrapper() {
|
|
1310
|
-
var self2 = this;
|
|
1311
|
-
var elapsed = Number(/* @__PURE__ */ new Date()) - lastExec;
|
|
1312
|
-
var args = arguments;
|
|
1313
|
-
function exec() {
|
|
1314
|
-
lastExec = Number(/* @__PURE__ */ new Date());
|
|
1315
|
-
callback.apply(self2, args);
|
|
1316
|
-
}
|
|
1317
|
-
function clear() {
|
|
1318
|
-
timeoutID = void 0;
|
|
1319
|
-
}
|
|
1320
|
-
if (debounceMode && !timeoutID) {
|
|
1321
|
-
exec();
|
|
1322
|
-
}
|
|
1323
|
-
if (timeoutID) {
|
|
1324
|
-
clearTimeout(timeoutID);
|
|
1325
|
-
}
|
|
1326
|
-
if (debounceMode === void 0 && elapsed > delay) {
|
|
1327
|
-
exec();
|
|
1328
|
-
} else if (noTrailing !== true) {
|
|
1329
|
-
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === void 0 ? delay - elapsed : delay);
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
return wrapper;
|
|
1333
|
-
};
|
|
1334
|
-
var throttle = throttle$1;
|
|
1335
|
-
var debounce = function(delay, atBegin, callback) {
|
|
1336
|
-
return callback === void 0 ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
|
|
1337
|
-
};
|
|
1338
|
-
const debounce$1 = /* @__PURE__ */ getDefaultExportFromCjs(debounce);
|
|
1339
|
-
const isServer = typeof window === "undefined";
|
|
1340
|
-
const resizeHandler = function(entries) {
|
|
1341
|
-
for (let entry of entries) {
|
|
1342
|
-
const listeners = entry.target.__resizeListeners__ || [];
|
|
1343
|
-
if (listeners.length) {
|
|
1344
|
-
listeners.forEach((fn) => {
|
|
1345
|
-
fn();
|
|
1346
|
-
});
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
};
|
|
1350
|
-
const addResizeListener = function(element, fn) {
|
|
1351
|
-
if (isServer)
|
|
1352
|
-
return;
|
|
1353
|
-
if (!element.__resizeListeners__) {
|
|
1354
|
-
element.__resizeListeners__ = [];
|
|
1355
|
-
element.__ro__ = new ResizeObserver(resizeHandler);
|
|
1356
|
-
element.__ro__.observe(element);
|
|
1357
|
-
}
|
|
1358
|
-
element.__resizeListeners__.push(fn);
|
|
1359
|
-
};
|
|
1360
|
-
const removeResizeListener = function(element, fn) {
|
|
1361
|
-
if (!element || !element.__resizeListeners__)
|
|
1362
|
-
return;
|
|
1363
|
-
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
1364
|
-
if (!element.__resizeListeners__.length) {
|
|
1365
|
-
element.__ro__.disconnect();
|
|
1366
|
-
}
|
|
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
968
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1489
969
|
function hasOwn(obj, key) {
|
|
1490
970
|
return hasOwnProperty.call(obj, key);
|
|
1491
971
|
}
|
|
1492
|
-
const
|
|
972
|
+
const getValueByPath = function(object, prop) {
|
|
1493
973
|
prop = prop || "";
|
|
1494
974
|
const paths = prop.split(".");
|
|
1495
975
|
let current = object;
|
|
@@ -1506,7 +986,7 @@ const getValueByPath2 = function(object, prop) {
|
|
|
1506
986
|
}
|
|
1507
987
|
return result;
|
|
1508
988
|
};
|
|
1509
|
-
const
|
|
989
|
+
const valueEquals = (a, b) => {
|
|
1510
990
|
if (a === b)
|
|
1511
991
|
return true;
|
|
1512
992
|
if (!(a instanceof Array))
|
|
@@ -1521,10 +1001,10 @@ const valueEquals2 = (a, b) => {
|
|
|
1521
1001
|
}
|
|
1522
1002
|
return true;
|
|
1523
1003
|
};
|
|
1524
|
-
const
|
|
1004
|
+
const isIE = function() {
|
|
1525
1005
|
return !Vue.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
1526
1006
|
};
|
|
1527
|
-
const
|
|
1007
|
+
const isEdge = function() {
|
|
1528
1008
|
return !Vue.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
|
|
1529
1009
|
};
|
|
1530
1010
|
const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
@@ -1554,7 +1034,7 @@ function Format(Vue2) {
|
|
|
1554
1034
|
const format = Format();
|
|
1555
1035
|
let lang = defaultLang;
|
|
1556
1036
|
let merged = false;
|
|
1557
|
-
let
|
|
1037
|
+
let i18nHandler = function() {
|
|
1558
1038
|
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
|
1559
1039
|
if (typeof vuei18n === "function" && !!Vue.locale) {
|
|
1560
1040
|
if (!merged) {
|
|
@@ -1566,8 +1046,8 @@ let i18nHandler2 = function() {
|
|
|
1566
1046
|
return vuei18n.apply(this, arguments);
|
|
1567
1047
|
}
|
|
1568
1048
|
};
|
|
1569
|
-
const
|
|
1570
|
-
let value =
|
|
1049
|
+
const t = function(path, options) {
|
|
1050
|
+
let value = i18nHandler.apply(this, arguments);
|
|
1571
1051
|
if (value !== null && value !== void 0)
|
|
1572
1052
|
return value;
|
|
1573
1053
|
const array = path.split(".");
|
|
@@ -2168,7 +1648,7 @@ var popper$1 = { exports: {} };
|
|
|
2168
1648
|
modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
|
|
2169
1649
|
}
|
|
2170
1650
|
modifiersToRun.forEach((function(modifier) {
|
|
2171
|
-
if (
|
|
1651
|
+
if (isFunction(modifier)) {
|
|
2172
1652
|
data = modifier.call(this, data);
|
|
2173
1653
|
}
|
|
2174
1654
|
}).bind(this));
|
|
@@ -2480,7 +1960,7 @@ var popper$1 = { exports: {} };
|
|
|
2480
1960
|
element.style[prop] = styles[prop] + unit;
|
|
2481
1961
|
});
|
|
2482
1962
|
}
|
|
2483
|
-
function
|
|
1963
|
+
function isFunction(functionToCheck) {
|
|
2484
1964
|
var getType = {};
|
|
2485
1965
|
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
2486
1966
|
}
|
|
@@ -2497,8 +1977,8 @@ var popper$1 = { exports: {} };
|
|
|
2497
1977
|
}
|
|
2498
1978
|
function getBoundingClientRect(element) {
|
|
2499
1979
|
var rect = element.getBoundingClientRect();
|
|
2500
|
-
var
|
|
2501
|
-
var rectTop =
|
|
1980
|
+
var isIE2 = navigator.userAgent.indexOf("MSIE") != -1;
|
|
1981
|
+
var rectTop = isIE2 && element.tagName === "HTML" ? -element.scrollTop : rect.top;
|
|
2502
1982
|
return {
|
|
2503
1983
|
left: rect.left,
|
|
2504
1984
|
top: rectTop,
|
|
@@ -2811,7 +2291,7 @@ var _sfc_staticRenderFns$1 = [];
|
|
|
2811
2291
|
var __component__$1 = /* @__PURE__ */ normalizeComponent(_sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
2812
2292
|
const SelectMenu = __component__$1.exports;
|
|
2813
2293
|
const _sfc_main = {
|
|
2814
|
-
mixins: [Emitter,
|
|
2294
|
+
mixins: [Emitter, Locale, Focus("reference"), NavigationMixin],
|
|
2815
2295
|
name: "ElSelect",
|
|
2816
2296
|
componentName: "ElSelect",
|
|
2817
2297
|
inject: {
|
|
@@ -2832,7 +2312,7 @@ const _sfc_main = {
|
|
|
2832
2312
|
return (this.elFormItem || {}).elFormItemSize;
|
|
2833
2313
|
},
|
|
2834
2314
|
readonly() {
|
|
2835
|
-
return !this.filterable || this.multiple || !
|
|
2315
|
+
return !this.filterable || this.multiple || !isIE() && !isEdge() && !this.visible;
|
|
2836
2316
|
},
|
|
2837
2317
|
showClose() {
|
|
2838
2318
|
let hasValue = this.multiple ? Array.isArray(this.value) && this.value.length > 0 : this.value !== void 0 && this.value !== null && this.value !== "";
|
|
@@ -2922,7 +2402,7 @@ const _sfc_main = {
|
|
|
2922
2402
|
placeholder: {
|
|
2923
2403
|
type: String,
|
|
2924
2404
|
default() {
|
|
2925
|
-
return
|
|
2405
|
+
return t("el.select.placeholder");
|
|
2926
2406
|
}
|
|
2927
2407
|
},
|
|
2928
2408
|
defaultFirstOption: Boolean,
|
|
@@ -2988,7 +2468,7 @@ const _sfc_main = {
|
|
|
2988
2468
|
if (this.filterable && !this.multiple) {
|
|
2989
2469
|
this.inputLength = 20;
|
|
2990
2470
|
}
|
|
2991
|
-
if (!
|
|
2471
|
+
if (!valueEquals(val, oldVal)) {
|
|
2992
2472
|
this.dispatch("ElFormItem", "el.form.change", val);
|
|
2993
2473
|
}
|
|
2994
2474
|
},
|
|
@@ -3126,26 +2606,26 @@ const _sfc_main = {
|
|
|
3126
2606
|
this.$nextTick(() => this.scrollToOption(this.selected));
|
|
3127
2607
|
},
|
|
3128
2608
|
emitChange(val) {
|
|
3129
|
-
if (!
|
|
2609
|
+
if (!valueEquals(this.value, val)) {
|
|
3130
2610
|
this.$emit("change", val);
|
|
3131
2611
|
}
|
|
3132
2612
|
},
|
|
3133
2613
|
getOption(value) {
|
|
3134
2614
|
let option;
|
|
3135
|
-
const
|
|
2615
|
+
const isObject = Object.prototype.toString.call(value).toLowerCase() === "[object object]";
|
|
3136
2616
|
const isNull = Object.prototype.toString.call(value).toLowerCase() === "[object null]";
|
|
3137
|
-
const
|
|
2617
|
+
const isUndefined = Object.prototype.toString.call(value).toLowerCase() === "[object undefined]";
|
|
3138
2618
|
for (let i = this.cachedOptions.length - 1; i >= 0; i--) {
|
|
3139
2619
|
const cachedOption = this.cachedOptions[i];
|
|
3140
|
-
const
|
|
3141
|
-
if (
|
|
2620
|
+
const isEqual = isObject ? getValueByPath(cachedOption.value, this.valueKey) === getValueByPath(value, this.valueKey) : cachedOption.value === value;
|
|
2621
|
+
if (isEqual) {
|
|
3142
2622
|
option = cachedOption;
|
|
3143
2623
|
break;
|
|
3144
2624
|
}
|
|
3145
2625
|
}
|
|
3146
2626
|
if (option)
|
|
3147
2627
|
return option;
|
|
3148
|
-
const label = !
|
|
2628
|
+
const label = !isObject && !isNull && !isUndefined ? value : "";
|
|
3149
2629
|
let newOption = {
|
|
3150
2630
|
value,
|
|
3151
2631
|
currentLabel: label
|
|
@@ -3321,14 +2801,14 @@ const _sfc_main = {
|
|
|
3321
2801
|
}
|
|
3322
2802
|
},
|
|
3323
2803
|
getValueIndex(arr = [], value) {
|
|
3324
|
-
const
|
|
3325
|
-
if (!
|
|
2804
|
+
const isObject = Object.prototype.toString.call(value).toLowerCase() === "[object object]";
|
|
2805
|
+
if (!isObject) {
|
|
3326
2806
|
return arr.indexOf(value);
|
|
3327
2807
|
} else {
|
|
3328
2808
|
const valueKey = this.valueKey;
|
|
3329
2809
|
let index = -1;
|
|
3330
2810
|
arr.some((item, i) => {
|
|
3331
|
-
if (
|
|
2811
|
+
if (getValueByPath(item, valueKey) === getValueByPath(value, valueKey)) {
|
|
3332
2812
|
index = i;
|
|
3333
2813
|
return true;
|
|
3334
2814
|
}
|
|
@@ -3421,7 +2901,7 @@ const _sfc_main = {
|
|
|
3421
2901
|
if (Object.prototype.toString.call(item.value).toLowerCase() !== "[object object]") {
|
|
3422
2902
|
return item.value;
|
|
3423
2903
|
} else {
|
|
3424
|
-
return
|
|
2904
|
+
return getValueByPath(item.value, this.valueKey);
|
|
3425
2905
|
}
|
|
3426
2906
|
}
|
|
3427
2907
|
},
|