fast-element-plus 1.0.0-alpha.8 → 1.0.0-alpha.9
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.
- package/dist/index.full.js +822 -978
- package/dist/index.full.js.map +1 -1
- package/dist/index.full.min.js +5 -5
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +5 -5
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +822 -978
- package/dist/index.full.mjs.map +1 -1
- package/dist/styles/index.css +3 -3
- package/dist/styles/index.css.map +1 -1
- package/es/components/avatar/src/avatar.d.ts +4 -4
- package/es/components/button/src/button.d.ts +24 -3
- package/es/components/button/src/button.mjs +5 -20
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/carNumber/src/carNumber.d.ts +15 -3
- package/es/components/carNumber/src/carNumber.mjs +8 -12
- package/es/components/carNumber/src/carNumber.mjs.map +1 -1
- package/es/components/contextMenu/src/contextMenu.mjs +5 -5
- package/es/components/contextMenu/src/contextMenu.mjs.map +1 -1
- package/es/components/dialog/src/dialog.d.ts +30 -1
- package/es/components/dialog/src/dialog.mjs +9 -15
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/drawer/src/drawer.d.ts +81 -6
- package/es/components/drawer/src/drawer.mjs +3 -12
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/form/src/form.d.ts +8 -8
- package/es/components/form/src/form.mjs +5 -20
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/formItem.d.ts +11 -11
- package/es/components/form/src/formItem.mjs +6 -24
- package/es/components/form/src/formItem.mjs.map +1 -1
- package/es/components/form/utils/form.mjs +2 -2
- package/es/components/form/utils/form.mjs.map +1 -1
- package/es/components/image/src/image.d.ts +25 -0
- package/es/components/layoutGrid/src/layoutGrid.mjs +7 -10
- package/es/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
- package/es/components/layoutGrid/src/layoutGridItem.mjs +2 -2
- package/es/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
- package/es/components/select/src/select.d.ts +17 -17
- package/es/components/select/src/select.mjs +7 -18
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/selectPage/src/selectPage.d.ts +23 -23
- package/es/components/selectPage/src/selectPage.mjs +7 -16
- package/es/components/selectPage/src/selectPage.mjs.map +1 -1
- package/es/components/selectV2/src/selectV2.d.ts +12 -12
- package/es/components/selectV2/src/selectV2.mjs +6 -17
- package/es/components/selectV2/src/selectV2.mjs.map +1 -1
- package/es/components/table/src/table.mjs +95 -145
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/tableColumn.d.ts +1 -1
- package/es/components/table/src/tableColumn.mjs +68 -72
- package/es/components/table/src/tableColumn.mjs.map +1 -1
- package/es/components/table/src/tableColumnSettingDialog.mjs +26 -29
- package/es/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
- package/es/components/table/src/tableSearchForm.mjs +53 -66
- package/es/components/table/src/tableSearchForm.mjs.map +1 -1
- package/es/components/table/src/tableSearchFormItem.mjs +32 -40
- package/es/components/table/src/tableSearchFormItem.mjs.map +1 -1
- package/es/components/table/src/useTable.mjs +16 -21
- package/es/components/table/src/useTable.mjs.map +1 -1
- package/es/components/table/utils/table.mjs +6 -10
- package/es/components/table/utils/table.mjs.map +1 -1
- package/es/components/tree/src/tree.d.ts +35 -35
- package/es/components/tree/src/tree.mjs +21 -78
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/treeSelect/src/treeSelect.d.ts +23 -23
- package/es/components/treeSelect/src/treeSelect.mjs +26 -91
- package/es/components/treeSelect/src/treeSelect.mjs.map +1 -1
- package/es/components/upload/src/upload.d.ts +4 -4
- package/es/components/upload/src/upload.mjs +6 -21
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/useUpload.d.ts +4 -4
- package/es/components/upload/src/useUpload.mjs +5 -5
- package/es/components/upload/src/useUpload.mjs.map +1 -1
- package/es/components/uploadImage/src/uploadImage.d.ts +4 -4
- package/es/components/uploadImage/src/uploadImage.mjs +6 -21
- package/es/components/uploadImage/src/uploadImage.mjs.map +1 -1
- package/es/components/uploadImages/src/uploadImages.d.ts +4 -4
- package/es/components/uploadImages/src/uploadImages.mjs +6 -21
- package/es/components/uploadImages/src/uploadImages.mjs.map +1 -1
- package/es/directives/click-draggable/index.mjs.map +1 -1
- package/es/element-plus.mjs +11 -11
- package/es/element-plus.mjs.map +1 -1
- package/es/hooks/use-loading/index.mjs +1 -2
- package/es/hooks/use-loading/index.mjs.map +1 -1
- package/es/hooks/use-overlay/index.mjs +1 -2
- package/es/hooks/use-overlay/index.mjs.map +1 -1
- package/lib/components/avatar/src/avatar.d.ts +4 -4
- package/lib/components/button/src/button.d.ts +24 -3
- package/lib/components/button/src/button.js +1 -1
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/carNumber/src/carNumber.d.ts +15 -3
- package/lib/components/carNumber/src/carNumber.js +1 -1
- package/lib/components/carNumber/src/carNumber.js.map +1 -1
- package/lib/components/contextMenu/src/contextMenu.js +1 -1
- package/lib/components/contextMenu/src/contextMenu.js.map +1 -1
- package/lib/components/dialog/src/dialog.d.ts +30 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/drawer/src/drawer.d.ts +81 -6
- package/lib/components/drawer/src/drawer.js +1 -1
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/form/src/form.d.ts +8 -8
- package/lib/components/form/src/form.js +1 -1
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/formItem.d.ts +11 -11
- package/lib/components/form/src/formItem.js +1 -1
- package/lib/components/form/src/formItem.js.map +1 -1
- package/lib/components/form/utils/form.js +1 -1
- package/lib/components/form/utils/form.js.map +1 -1
- package/lib/components/image/src/image.d.ts +25 -0
- package/lib/components/layoutGrid/src/layoutGrid.js +1 -1
- package/lib/components/layoutGrid/src/layoutGrid.js.map +1 -1
- package/lib/components/layoutGrid/src/layoutGridItem.js +1 -1
- package/lib/components/layoutGrid/src/layoutGridItem.js.map +1 -1
- package/lib/components/select/src/select.d.ts +17 -17
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/selectPage/src/selectPage.d.ts +23 -23
- package/lib/components/selectPage/src/selectPage.js +1 -1
- package/lib/components/selectPage/src/selectPage.js.map +1 -1
- package/lib/components/selectV2/src/selectV2.d.ts +12 -12
- package/lib/components/selectV2/src/selectV2.js +1 -1
- package/lib/components/selectV2/src/selectV2.js.map +1 -1
- package/lib/components/table/src/table.js +1 -1
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/tableColumn.d.ts +1 -1
- package/lib/components/table/src/tableColumn.js +1 -1
- package/lib/components/table/src/tableColumn.js.map +1 -1
- package/lib/components/table/src/tableColumnSettingDialog.js +1 -1
- package/lib/components/table/src/tableColumnSettingDialog.js.map +1 -1
- package/lib/components/table/src/tableSearchForm.js +1 -1
- package/lib/components/table/src/tableSearchForm.js.map +1 -1
- package/lib/components/table/src/tableSearchFormItem.js +1 -1
- package/lib/components/table/src/tableSearchFormItem.js.map +1 -1
- package/lib/components/table/src/useTable.js +1 -1
- package/lib/components/table/src/useTable.js.map +1 -1
- package/lib/components/table/utils/table.js +1 -1
- package/lib/components/table/utils/table.js.map +1 -1
- package/lib/components/tree/src/tree.d.ts +35 -35
- package/lib/components/tree/src/tree.js +1 -1
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/treeSelect/src/treeSelect.d.ts +23 -23
- package/lib/components/treeSelect/src/treeSelect.js +1 -1
- package/lib/components/treeSelect/src/treeSelect.js.map +1 -1
- package/lib/components/upload/src/upload.d.ts +4 -4
- package/lib/components/upload/src/upload.js +1 -1
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/useUpload.d.ts +4 -4
- package/lib/components/upload/src/useUpload.js +1 -1
- package/lib/components/upload/src/useUpload.js.map +1 -1
- package/lib/components/uploadImage/src/uploadImage.d.ts +4 -4
- package/lib/components/uploadImage/src/uploadImage.js +1 -1
- package/lib/components/uploadImage/src/uploadImage.js.map +1 -1
- package/lib/components/uploadImages/src/uploadImages.d.ts +4 -4
- package/lib/components/uploadImages/src/uploadImages.js +1 -1
- package/lib/components/uploadImages/src/uploadImages.js.map +1 -1
- package/lib/directives/click-draggable/index.js.map +1 -1
- package/lib/element-plus.js +1 -1
- package/lib/element-plus.js.map +1 -1
- package/lib/hooks/use-loading/index.js +1 -1
- package/lib/hooks/use-loading/index.js.map +1 -1
- package/lib/hooks/use-overlay/index.js +1 -1
- package/lib/hooks/use-overlay/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.full.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@fast-china/utils"), require("vue"), require("@element-plus/icons-vue"), require("element-plus"), require("@fast-element-plus/icons-vue")) : typeof define === "function" && define.amd ? define(["exports", "@fast-china/utils", "vue", "@element-plus/icons-vue", "element-plus", "@fast-element-plus/icons-vue"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.FastElementPlus = {}, global2.FastUtils, global2.Vue, global2.ElementPlusIconsVue, global2.ElementPlus, global2.FastElementPlusIconsVue));
|
|
3
|
-
})(this, function(exports2, utils, vue, ElementPlusIconsVue, ElementPlus, FastElementPlusIconsVue) {
|
|
3
|
+
})(this, (function(exports2, utils, vue, ElementPlusIconsVue, ElementPlus, FastElementPlusIconsVue) {
|
|
4
4
|
"use strict";
|
|
5
5
|
function _interopNamespaceDefault(e) {
|
|
6
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -108,9 +108,8 @@
|
|
|
108
108
|
if (window.loading) {
|
|
109
109
|
vue.nextTick(() => {
|
|
110
110
|
setTimeout(() => {
|
|
111
|
-
var _a;
|
|
112
111
|
const loadingEl = document.querySelector(".__fa-loading__box");
|
|
113
|
-
loadingEl &&
|
|
112
|
+
loadingEl && loadingEl.parentNode?.removeChild(loadingEl);
|
|
114
113
|
window.loading = false;
|
|
115
114
|
}, 500);
|
|
116
115
|
});
|
|
@@ -131,9 +130,8 @@
|
|
|
131
130
|
hide: () => {
|
|
132
131
|
if (window.overlay) {
|
|
133
132
|
vue.nextTick(() => {
|
|
134
|
-
var _a;
|
|
135
133
|
const loadingEl = document.querySelector(".__fa-overlay");
|
|
136
|
-
loadingEl &&
|
|
134
|
+
loadingEl && loadingEl.parentNode?.removeChild(loadingEl);
|
|
137
135
|
window.overlay = false;
|
|
138
136
|
});
|
|
139
137
|
}
|
|
@@ -190,7 +188,7 @@
|
|
|
190
188
|
const unprefixedMethods = methodMap[0];
|
|
191
189
|
const returnValue = {};
|
|
192
190
|
for (const methodList of methodMap) {
|
|
193
|
-
const exitFullscreenMethod = methodList
|
|
191
|
+
const exitFullscreenMethod = methodList?.[1];
|
|
194
192
|
if (exitFullscreenMethod in document) {
|
|
195
193
|
for (const [index2, method2] of methodList.entries()) {
|
|
196
194
|
returnValue[unprefixedMethods[index2]] = method2;
|
|
@@ -499,10 +497,10 @@
|
|
|
499
497
|
return tag2 == funcTag$2 || tag2 == genTag$1 || tag2 == asyncTag || tag2 == proxyTag;
|
|
500
498
|
}
|
|
501
499
|
var coreJsData = root["__core-js_shared__"];
|
|
502
|
-
var maskSrcKey = function() {
|
|
500
|
+
var maskSrcKey = (function() {
|
|
503
501
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
504
502
|
return uid ? "Symbol(src)_1." + uid : "";
|
|
505
|
-
}();
|
|
503
|
+
})();
|
|
506
504
|
function isMasked(func2) {
|
|
507
505
|
return !!maskSrcKey && maskSrcKey in func2;
|
|
508
506
|
}
|
|
@@ -550,7 +548,7 @@
|
|
|
550
548
|
return func2;
|
|
551
549
|
};
|
|
552
550
|
var objectCreate = Object.create;
|
|
553
|
-
var baseCreate = /* @__PURE__ */ function() {
|
|
551
|
+
var baseCreate = /* @__PURE__ */ (function() {
|
|
554
552
|
function object2() {
|
|
555
553
|
}
|
|
556
554
|
return function(proto) {
|
|
@@ -565,7 +563,7 @@
|
|
|
565
563
|
object2.prototype = void 0;
|
|
566
564
|
return result2;
|
|
567
565
|
};
|
|
568
|
-
}();
|
|
566
|
+
})();
|
|
569
567
|
function createCtor(Ctor) {
|
|
570
568
|
return function() {
|
|
571
569
|
var args = arguments;
|
|
@@ -779,14 +777,14 @@
|
|
|
779
777
|
return value;
|
|
780
778
|
};
|
|
781
779
|
}
|
|
782
|
-
var defineProperty = function() {
|
|
780
|
+
var defineProperty = (function() {
|
|
783
781
|
try {
|
|
784
782
|
var func2 = getNative(Object, "defineProperty");
|
|
785
783
|
func2({}, "", {});
|
|
786
784
|
return func2;
|
|
787
785
|
} catch (e) {
|
|
788
786
|
}
|
|
789
|
-
}();
|
|
787
|
+
})();
|
|
790
788
|
var baseSetToString = !defineProperty ? identity$1 : function(func2, string2) {
|
|
791
789
|
return defineProperty(func2, "toString", {
|
|
792
790
|
"configurable": true,
|
|
@@ -1227,9 +1225,9 @@
|
|
|
1227
1225
|
var objectProto$l = Object.prototype;
|
|
1228
1226
|
var hasOwnProperty$j = objectProto$l.hasOwnProperty;
|
|
1229
1227
|
var propertyIsEnumerable$1 = objectProto$l.propertyIsEnumerable;
|
|
1230
|
-
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
1228
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
|
|
1231
1229
|
return arguments;
|
|
1232
|
-
}()) ? baseIsArguments : function(value) {
|
|
1230
|
+
})()) ? baseIsArguments : function(value) {
|
|
1233
1231
|
return isObjectLike(value) && hasOwnProperty$j.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
1234
1232
|
};
|
|
1235
1233
|
function stubFalse() {
|
|
@@ -1258,7 +1256,7 @@
|
|
|
1258
1256
|
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
1259
1257
|
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
1260
1258
|
var freeProcess = moduleExports$1 && freeGlobal.process;
|
|
1261
|
-
var nodeUtil = function() {
|
|
1259
|
+
var nodeUtil = (function() {
|
|
1262
1260
|
try {
|
|
1263
1261
|
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
|
|
1264
1262
|
if (types) {
|
|
@@ -1267,7 +1265,7 @@
|
|
|
1267
1265
|
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
1268
1266
|
} catch (e) {
|
|
1269
1267
|
}
|
|
1270
|
-
}();
|
|
1268
|
+
})();
|
|
1271
1269
|
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
1272
1270
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1273
1271
|
var objectProto$k = Object.prototype;
|
|
@@ -5846,7 +5844,7 @@
|
|
|
5846
5844
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
5847
5845
|
var symIterator = Symbol$1 ? Symbol$1.iterator : void 0;
|
|
5848
5846
|
var nativeMax = Math.max, nativeMin = Math.min;
|
|
5849
|
-
var mixin = /* @__PURE__ */ function(func2) {
|
|
5847
|
+
var mixin = /* @__PURE__ */ (function(func2) {
|
|
5850
5848
|
return function(object2, source, options) {
|
|
5851
5849
|
if (options == null) {
|
|
5852
5850
|
var isObj = isObject$1(source), props = isObj && keys$1(source), methodNames = props && props.length && baseFunctions(source, props);
|
|
@@ -5858,7 +5856,7 @@
|
|
|
5858
5856
|
}
|
|
5859
5857
|
return func2(object2, source, options);
|
|
5860
5858
|
};
|
|
5861
|
-
}(mixin$1);
|
|
5859
|
+
})(mixin$1);
|
|
5862
5860
|
lodash.after = func.after;
|
|
5863
5861
|
lodash.ary = func.ary;
|
|
5864
5862
|
lodash.assign = object.assign;
|
|
@@ -6163,7 +6161,7 @@
|
|
|
6163
6161
|
lodash.each = collection.forEach;
|
|
6164
6162
|
lodash.eachRight = collection.forEachRight;
|
|
6165
6163
|
lodash.first = array.head;
|
|
6166
|
-
mixin(lodash, function() {
|
|
6164
|
+
mixin(lodash, (function() {
|
|
6167
6165
|
var source = {};
|
|
6168
6166
|
baseForOwn(lodash, function(func2, methodName) {
|
|
6169
6167
|
if (!hasOwnProperty.call(lodash.prototype, methodName)) {
|
|
@@ -6171,7 +6169,7 @@
|
|
|
6171
6169
|
}
|
|
6172
6170
|
});
|
|
6173
6171
|
return source;
|
|
6174
|
-
}(), { "chain": false });
|
|
6172
|
+
})(), { "chain": false });
|
|
6175
6173
|
lodash.VERSION = VERSION;
|
|
6176
6174
|
(lodash.templateSettings = string.templateSettings).imports._ = lodash;
|
|
6177
6175
|
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
|
@@ -6421,30 +6419,15 @@
|
|
|
6421
6419
|
}));
|
|
6422
6420
|
return utils.useExpose(expose, {
|
|
6423
6421
|
/** @description 按钮 html 元素 */
|
|
6424
|
-
ref: vue.computed(() =>
|
|
6425
|
-
var _a;
|
|
6426
|
-
return (_a = buttonRef.value) == null ? void 0 : _a.ref;
|
|
6427
|
-
}),
|
|
6422
|
+
ref: vue.computed(() => buttonRef.value?.ref),
|
|
6428
6423
|
/** @description 按钮尺寸 */
|
|
6429
|
-
size: vue.computed(() =>
|
|
6430
|
-
var _a;
|
|
6431
|
-
return (_a = buttonRef.value) == null ? void 0 : _a.size;
|
|
6432
|
-
}),
|
|
6424
|
+
size: vue.computed(() => buttonRef.value?.size),
|
|
6433
6425
|
/** @description 按钮类型 */
|
|
6434
|
-
type: vue.computed(() =>
|
|
6435
|
-
var _a;
|
|
6436
|
-
return (_a = buttonRef.value) == null ? void 0 : _a.type;
|
|
6437
|
-
}),
|
|
6426
|
+
type: vue.computed(() => buttonRef.value?.type),
|
|
6438
6427
|
/** @description 按钮已禁用 */
|
|
6439
|
-
disabled: vue.computed(() =>
|
|
6440
|
-
var _a;
|
|
6441
|
-
return (_a = buttonRef.value) == null ? void 0 : _a.disabled;
|
|
6442
|
-
}),
|
|
6428
|
+
disabled: vue.computed(() => buttonRef.value?.disabled),
|
|
6443
6429
|
/** @description 是否在两个字符之间插入空格 */
|
|
6444
|
-
shouldAddSpace: vue.computed(() =>
|
|
6445
|
-
var _a;
|
|
6446
|
-
return (_a = buttonRef.value) == null ? void 0 : _a.shouldAddSpace;
|
|
6447
|
-
}),
|
|
6430
|
+
shouldAddSpace: vue.computed(() => buttonRef.value?.shouldAddSpace),
|
|
6448
6431
|
/** @description 加载状态 */
|
|
6449
6432
|
loading: vue.computed(() => state.loading)
|
|
6450
6433
|
});
|
|
@@ -6679,15 +6662,13 @@
|
|
|
6679
6662
|
const state = vue.reactive({
|
|
6680
6663
|
value: utils.withDefineType(),
|
|
6681
6664
|
switchLetter: vue.computed(() => {
|
|
6682
|
-
|
|
6683
|
-
if (((_a = state.value) == null ? void 0 : _a.length) >= 1) {
|
|
6665
|
+
if (state.value?.length >= 1) {
|
|
6684
6666
|
return true;
|
|
6685
6667
|
}
|
|
6686
6668
|
return false;
|
|
6687
6669
|
}),
|
|
6688
6670
|
disabledButton: vue.computed(() => {
|
|
6689
|
-
|
|
6690
|
-
if (((_a = state.value) == null ? void 0 : _a.length) >= 8) {
|
|
6671
|
+
if (state.value?.length >= 8) {
|
|
6691
6672
|
return true;
|
|
6692
6673
|
}
|
|
6693
6674
|
return false;
|
|
@@ -6706,16 +6687,14 @@
|
|
|
6706
6687
|
}
|
|
6707
6688
|
};
|
|
6708
6689
|
const handleSelectCarNumber = (value) => {
|
|
6709
|
-
state.value
|
|
6690
|
+
state.value ??= "";
|
|
6710
6691
|
state.value += value;
|
|
6711
6692
|
};
|
|
6712
6693
|
const handleBackClick = () => {
|
|
6713
|
-
|
|
6714
|
-
if (((_a = state.value) == null ? void 0 : _a.length) === 0) return;
|
|
6694
|
+
if (state.value?.length === 0) return;
|
|
6715
6695
|
state.value = state.value.substring(0, state.value.length - 1);
|
|
6716
6696
|
};
|
|
6717
6697
|
const handleConfirmClick = () => {
|
|
6718
|
-
var _a;
|
|
6719
6698
|
let success = false;
|
|
6720
6699
|
if (state.value.length === 7) {
|
|
6721
6700
|
success = RegExps.CarNumber.test(state.value);
|
|
@@ -6725,9 +6704,9 @@
|
|
|
6725
6704
|
if (success) {
|
|
6726
6705
|
emit("update:modelValue", state.value);
|
|
6727
6706
|
emit("change", state.value);
|
|
6728
|
-
|
|
6707
|
+
formItemContext?.prop && formContext?.validateField([formItemContext.prop]);
|
|
6729
6708
|
} else {
|
|
6730
|
-
if (
|
|
6709
|
+
if (formItemContext?.prop && formContext) {
|
|
6731
6710
|
emit("update:modelValue", state.value);
|
|
6732
6711
|
emit("change", state.value);
|
|
6733
6712
|
formContext.validateField([formItemContext.prop]);
|
|
@@ -6735,13 +6714,13 @@
|
|
|
6735
6714
|
ElementPlus.ElMessage.error("车牌号格式不正确");
|
|
6736
6715
|
}
|
|
6737
6716
|
}
|
|
6738
|
-
|
|
6717
|
+
popoverRef.value?.hide();
|
|
6739
6718
|
};
|
|
6740
6719
|
const handleClearClick = () => {
|
|
6741
6720
|
state.value = null;
|
|
6742
6721
|
emit("update:modelValue", null);
|
|
6743
6722
|
emit("change", null);
|
|
6744
|
-
|
|
6723
|
+
formItemContext?.prop && formContext?.validateField([formItemContext.prop]);
|
|
6745
6724
|
};
|
|
6746
6725
|
vue.watch(() => props.modelValue, (newValue) => {
|
|
6747
6726
|
state.value = newValue.toString();
|
|
@@ -6920,6 +6899,7 @@
|
|
|
6920
6899
|
}
|
|
6921
6900
|
return false;
|
|
6922
6901
|
}
|
|
6902
|
+
// @__NO_SIDE_EFFECTS__
|
|
6923
6903
|
function createEventHook() {
|
|
6924
6904
|
const fns = /* @__PURE__ */ new Set();
|
|
6925
6905
|
const off2 = (fn) => {
|
|
@@ -6946,6 +6926,7 @@
|
|
|
6946
6926
|
clear
|
|
6947
6927
|
};
|
|
6948
6928
|
}
|
|
6929
|
+
// @__NO_SIDE_EFFECTS__
|
|
6949
6930
|
function createGlobalState(stateFactory) {
|
|
6950
6931
|
let initialized = false;
|
|
6951
6932
|
let state;
|
|
@@ -6959,7 +6940,7 @@
|
|
|
6959
6940
|
};
|
|
6960
6941
|
}
|
|
6961
6942
|
const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
6962
|
-
const injectLocal = (...args) => {
|
|
6943
|
+
const injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => {
|
|
6963
6944
|
var _a;
|
|
6964
6945
|
const key = args[0];
|
|
6965
6946
|
const instance = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
@@ -6980,6 +6961,7 @@
|
|
|
6980
6961
|
localProvidedState[key] = value;
|
|
6981
6962
|
return vue.provide(key, value);
|
|
6982
6963
|
}
|
|
6964
|
+
// @__NO_SIDE_EFFECTS__
|
|
6983
6965
|
function createInjectionState(composable, options) {
|
|
6984
6966
|
const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState");
|
|
6985
6967
|
const defaultValue = options == null ? void 0 : options.defaultValue;
|
|
@@ -6988,9 +6970,10 @@
|
|
|
6988
6970
|
provideLocal(key, state);
|
|
6989
6971
|
return state;
|
|
6990
6972
|
};
|
|
6991
|
-
const useInjectedState = () => injectLocal(key, defaultValue);
|
|
6973
|
+
const useInjectedState = () => /* @__PURE__ */ injectLocal(key, defaultValue);
|
|
6992
6974
|
return [useProvidingState, useInjectedState];
|
|
6993
6975
|
}
|
|
6976
|
+
// @__NO_SIDE_EFFECTS__
|
|
6994
6977
|
function createRef(value, deep) {
|
|
6995
6978
|
if (deep === true) {
|
|
6996
6979
|
return vue.ref(value);
|
|
@@ -6998,6 +6981,7 @@
|
|
|
6998
6981
|
return vue.shallowRef(value);
|
|
6999
6982
|
}
|
|
7000
6983
|
}
|
|
6984
|
+
// @__NO_SIDE_EFFECTS__
|
|
7001
6985
|
function createSharedComposable(composable) {
|
|
7002
6986
|
let subscribers = 0;
|
|
7003
6987
|
let state;
|
|
@@ -7048,6 +7032,7 @@
|
|
|
7048
7032
|
function isDefined(v) {
|
|
7049
7033
|
return vue.unref(v) != null;
|
|
7050
7034
|
}
|
|
7035
|
+
// @__NO_SIDE_EFFECTS__
|
|
7051
7036
|
function makeDestructurable(obj, arr) {
|
|
7052
7037
|
if (typeof Symbol !== "undefined") {
|
|
7053
7038
|
const clone2 = { ...obj };
|
|
@@ -7068,12 +7053,14 @@
|
|
|
7068
7053
|
return Object.assign([...arr], obj);
|
|
7069
7054
|
}
|
|
7070
7055
|
}
|
|
7056
|
+
// @__NO_SIDE_EFFECTS__
|
|
7071
7057
|
function reactify(fn, options) {
|
|
7072
7058
|
const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? vue.unref : vue.toValue;
|
|
7073
7059
|
return function(...args) {
|
|
7074
7060
|
return vue.computed(() => fn.apply(this, args.map((i) => unrefFn(i))));
|
|
7075
7061
|
};
|
|
7076
7062
|
}
|
|
7063
|
+
// @__NO_SIDE_EFFECTS__
|
|
7077
7064
|
function reactifyObject(obj, optionsOrKeys = {}) {
|
|
7078
7065
|
let keys2 = [];
|
|
7079
7066
|
let options;
|
|
@@ -7091,7 +7078,7 @@
|
|
|
7091
7078
|
const value = obj[key];
|
|
7092
7079
|
return [
|
|
7093
7080
|
key,
|
|
7094
|
-
typeof value === "function" ? reactify(value.bind(obj), options) : value
|
|
7081
|
+
typeof value === "function" ? /* @__PURE__ */ reactify(value.bind(obj), options) : value
|
|
7095
7082
|
];
|
|
7096
7083
|
})
|
|
7097
7084
|
);
|
|
@@ -7406,6 +7393,7 @@
|
|
|
7406
7393
|
function getLifeCycleTarget(target) {
|
|
7407
7394
|
return target || vue.getCurrentInstance();
|
|
7408
7395
|
}
|
|
7396
|
+
// @__NO_SIDE_EFFECTS__
|
|
7409
7397
|
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
7410
7398
|
return createFilterWrapper(
|
|
7411
7399
|
debounceFilter(ms, options),
|
|
@@ -7414,12 +7402,13 @@
|
|
|
7414
7402
|
}
|
|
7415
7403
|
function refDebounced(value, ms = 200, options = {}) {
|
|
7416
7404
|
const debounced = vue.ref(vue.toValue(value));
|
|
7417
|
-
const updater = useDebounceFn(() => {
|
|
7405
|
+
const updater = /* @__PURE__ */ useDebounceFn(() => {
|
|
7418
7406
|
debounced.value = value.value;
|
|
7419
7407
|
}, ms, options);
|
|
7420
7408
|
vue.watch(value, () => updater());
|
|
7421
7409
|
return vue.shallowReadonly(debounced);
|
|
7422
7410
|
}
|
|
7411
|
+
// @__NO_SIDE_EFFECTS__
|
|
7423
7412
|
function refDefault(source, defaultValue) {
|
|
7424
7413
|
return vue.computed({
|
|
7425
7414
|
get() {
|
|
@@ -7431,6 +7420,7 @@
|
|
|
7431
7420
|
}
|
|
7432
7421
|
});
|
|
7433
7422
|
}
|
|
7423
|
+
// @__NO_SIDE_EFFECTS__
|
|
7434
7424
|
function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
|
|
7435
7425
|
return createFilterWrapper(
|
|
7436
7426
|
throttleFilter(ms, trailing, leading, rejectOnCancel),
|
|
@@ -7441,12 +7431,13 @@
|
|
|
7441
7431
|
if (delay2 <= 0)
|
|
7442
7432
|
return value;
|
|
7443
7433
|
const throttled = vue.ref(vue.toValue(value));
|
|
7444
|
-
const updater = useThrottleFn(() => {
|
|
7434
|
+
const updater = /* @__PURE__ */ useThrottleFn(() => {
|
|
7445
7435
|
throttled.value = value.value;
|
|
7446
7436
|
}, delay2, trailing, leading);
|
|
7447
7437
|
vue.watch(value, () => updater());
|
|
7448
7438
|
return throttled;
|
|
7449
7439
|
}
|
|
7440
|
+
// @__NO_SIDE_EFFECTS__
|
|
7450
7441
|
function refWithControl(initial2, options = {}) {
|
|
7451
7442
|
let source = initial2;
|
|
7452
7443
|
let track;
|
|
@@ -7777,6 +7768,7 @@
|
|
|
7777
7768
|
function defaultComparator(value, othVal) {
|
|
7778
7769
|
return value === othVal;
|
|
7779
7770
|
}
|
|
7771
|
+
// @__NO_SIDE_EFFECTS__
|
|
7780
7772
|
function useArrayDifference(...args) {
|
|
7781
7773
|
var _a, _b;
|
|
7782
7774
|
const list = args[0];
|
|
@@ -7797,17 +7789,21 @@
|
|
|
7797
7789
|
return diff1;
|
|
7798
7790
|
}
|
|
7799
7791
|
}
|
|
7792
|
+
// @__NO_SIDE_EFFECTS__
|
|
7800
7793
|
function useArrayEvery(list, fn) {
|
|
7801
7794
|
return vue.computed(() => vue.toValue(list).every((element, index2, array2) => fn(vue.toValue(element), index2, array2)));
|
|
7802
7795
|
}
|
|
7796
|
+
// @__NO_SIDE_EFFECTS__
|
|
7803
7797
|
function useArrayFilter(list, fn) {
|
|
7804
7798
|
return vue.computed(() => vue.toValue(list).map((i) => vue.toValue(i)).filter(fn));
|
|
7805
7799
|
}
|
|
7800
|
+
// @__NO_SIDE_EFFECTS__
|
|
7806
7801
|
function useArrayFind(list, fn) {
|
|
7807
7802
|
return vue.computed(() => vue.toValue(
|
|
7808
7803
|
vue.toValue(list).find((element, index2, array2) => fn(vue.toValue(element), index2, array2))
|
|
7809
7804
|
));
|
|
7810
7805
|
}
|
|
7806
|
+
// @__NO_SIDE_EFFECTS__
|
|
7811
7807
|
function useArrayFindIndex(list, fn) {
|
|
7812
7808
|
return vue.computed(() => vue.toValue(list).findIndex((element, index2, array2) => fn(vue.toValue(element), index2, array2)));
|
|
7813
7809
|
}
|
|
@@ -7819,6 +7815,7 @@
|
|
|
7819
7815
|
}
|
|
7820
7816
|
return void 0;
|
|
7821
7817
|
}
|
|
7818
|
+
// @__NO_SIDE_EFFECTS__
|
|
7822
7819
|
function useArrayFindLast(list, fn) {
|
|
7823
7820
|
return vue.computed(() => vue.toValue(
|
|
7824
7821
|
!Array.prototype.findLast ? findLast(vue.toValue(list), (element, index2, array2) => fn(vue.toValue(element), index2, array2)) : vue.toValue(list).findLast((element, index2, array2) => fn(vue.toValue(element), index2, array2))
|
|
@@ -7827,6 +7824,7 @@
|
|
|
7827
7824
|
function isArrayIncludesOptions(obj) {
|
|
7828
7825
|
return isObject(obj) && containsProp(obj, "formIndex", "comparator");
|
|
7829
7826
|
}
|
|
7827
|
+
// @__NO_SIDE_EFFECTS__
|
|
7830
7828
|
function useArrayIncludes(...args) {
|
|
7831
7829
|
var _a;
|
|
7832
7830
|
const list = args[0];
|
|
@@ -7849,12 +7847,15 @@
|
|
|
7849
7847
|
vue.toValue(array2)
|
|
7850
7848
|
)));
|
|
7851
7849
|
}
|
|
7850
|
+
// @__NO_SIDE_EFFECTS__
|
|
7852
7851
|
function useArrayJoin(list, separator) {
|
|
7853
7852
|
return vue.computed(() => vue.toValue(list).map((i) => vue.toValue(i)).join(vue.toValue(separator)));
|
|
7854
7853
|
}
|
|
7854
|
+
// @__NO_SIDE_EFFECTS__
|
|
7855
7855
|
function useArrayMap(list, fn) {
|
|
7856
7856
|
return vue.computed(() => vue.toValue(list).map((i) => vue.toValue(i)).map(fn));
|
|
7857
7857
|
}
|
|
7858
|
+
// @__NO_SIDE_EFFECTS__
|
|
7858
7859
|
function useArrayReduce(list, reducer, ...args) {
|
|
7859
7860
|
const reduceCallback = (sum2, value, index2) => reducer(vue.toValue(sum2), vue.toValue(value), index2);
|
|
7860
7861
|
return vue.computed(() => {
|
|
@@ -7862,6 +7863,7 @@
|
|
|
7862
7863
|
return args.length ? resolved.reduce(reduceCallback, typeof args[0] === "function" ? vue.toValue(args[0]()) : vue.toValue(args[0])) : resolved.reduce(reduceCallback);
|
|
7863
7864
|
});
|
|
7864
7865
|
}
|
|
7866
|
+
// @__NO_SIDE_EFFECTS__
|
|
7865
7867
|
function useArraySome(list, fn) {
|
|
7866
7868
|
return vue.computed(() => vue.toValue(list).some((element, index2, array2) => fn(vue.toValue(element), index2, array2)));
|
|
7867
7869
|
}
|
|
@@ -7875,6 +7877,7 @@
|
|
|
7875
7877
|
return acc;
|
|
7876
7878
|
}, []);
|
|
7877
7879
|
}
|
|
7880
|
+
// @__NO_SIDE_EFFECTS__
|
|
7878
7881
|
function useArrayUnique(list, compareFn) {
|
|
7879
7882
|
return vue.computed(() => {
|
|
7880
7883
|
const resolvedList = vue.toValue(list).map((element) => vue.toValue(element));
|
|
@@ -7986,6 +7989,7 @@
|
|
|
7986
7989
|
}
|
|
7987
7990
|
return new Date(date2);
|
|
7988
7991
|
}
|
|
7992
|
+
// @__NO_SIDE_EFFECTS__
|
|
7989
7993
|
function useDateFormat(date2, formatStr = "HH:mm:ss", options = {}) {
|
|
7990
7994
|
return vue.computed(() => formatDate(normalizeDate(vue.toValue(date2)), vue.toValue(formatStr), options));
|
|
7991
7995
|
}
|
|
@@ -8132,6 +8136,7 @@
|
|
|
8132
8136
|
return ready;
|
|
8133
8137
|
}
|
|
8134
8138
|
}
|
|
8139
|
+
// @__NO_SIDE_EFFECTS__
|
|
8135
8140
|
function useToNumber(value, options = {}) {
|
|
8136
8141
|
const {
|
|
8137
8142
|
method: method2 = "parseFloat",
|
|
@@ -8149,9 +8154,11 @@
|
|
|
8149
8154
|
return resolved;
|
|
8150
8155
|
});
|
|
8151
8156
|
}
|
|
8157
|
+
// @__NO_SIDE_EFFECTS__
|
|
8152
8158
|
function useToString(value) {
|
|
8153
8159
|
return vue.computed(() => `${vue.toValue(value)}`);
|
|
8154
8160
|
}
|
|
8161
|
+
// @__NO_SIDE_EFFECTS__
|
|
8155
8162
|
function useToggle(initialValue = false, options = {}) {
|
|
8156
8163
|
const {
|
|
8157
8164
|
truthyValue = true,
|
|
@@ -8403,6 +8410,7 @@
|
|
|
8403
8410
|
return stop;
|
|
8404
8411
|
}
|
|
8405
8412
|
function computedAsync(evaluationCallback, initialState, optionsOrRef) {
|
|
8413
|
+
var _a;
|
|
8406
8414
|
let options;
|
|
8407
8415
|
if (vue.isRef(optionsOrRef)) {
|
|
8408
8416
|
options = {
|
|
@@ -8416,7 +8424,7 @@
|
|
|
8416
8424
|
flush = "pre",
|
|
8417
8425
|
evaluating = void 0,
|
|
8418
8426
|
shallow = true,
|
|
8419
|
-
onError = noop
|
|
8427
|
+
onError = (_a = globalThis.reportError) != null ? _a : noop
|
|
8420
8428
|
} = options;
|
|
8421
8429
|
const started = vue.shallowRef(!lazy);
|
|
8422
8430
|
const current = shallow ? vue.shallowRef(initialState) : vue.ref(initialState);
|
|
@@ -8475,6 +8483,7 @@
|
|
|
8475
8483
|
});
|
|
8476
8484
|
}
|
|
8477
8485
|
}
|
|
8486
|
+
// @__NO_SIDE_EFFECTS__
|
|
8478
8487
|
function createReusableTemplate(options = {}) {
|
|
8479
8488
|
const {
|
|
8480
8489
|
inheritAttrs = true
|
|
@@ -8503,7 +8512,7 @@
|
|
|
8503
8512
|
};
|
|
8504
8513
|
}
|
|
8505
8514
|
});
|
|
8506
|
-
return makeDestructurable(
|
|
8515
|
+
return /* @__PURE__ */ makeDestructurable(
|
|
8507
8516
|
{ define: define2, reuse },
|
|
8508
8517
|
[define2, reuse]
|
|
8509
8518
|
);
|
|
@@ -8514,6 +8523,7 @@
|
|
|
8514
8523
|
newObj[camelize(key)] = obj[key];
|
|
8515
8524
|
return newObj;
|
|
8516
8525
|
}
|
|
8526
|
+
// @__NO_SIDE_EFFECTS__
|
|
8517
8527
|
function createTemplatePromise(options = {}) {
|
|
8518
8528
|
let index2 = 0;
|
|
8519
8529
|
const instances = vue.ref([]);
|
|
@@ -8561,6 +8571,7 @@
|
|
|
8561
8571
|
component.start = start;
|
|
8562
8572
|
return component;
|
|
8563
8573
|
}
|
|
8574
|
+
// @__NO_SIDE_EFFECTS__
|
|
8564
8575
|
function createUnrefFn(fn) {
|
|
8565
8576
|
return function(...args) {
|
|
8566
8577
|
return fn.apply(this, args.map((i) => vue.toValue(i)));
|
|
@@ -8713,6 +8724,7 @@
|
|
|
8713
8724
|
}
|
|
8714
8725
|
return stop;
|
|
8715
8726
|
}
|
|
8727
|
+
// @__NO_SIDE_EFFECTS__
|
|
8716
8728
|
function useMounted() {
|
|
8717
8729
|
const isMounted = vue.shallowRef(false);
|
|
8718
8730
|
const instance = vue.getCurrentInstance();
|
|
@@ -8723,8 +8735,9 @@
|
|
|
8723
8735
|
}
|
|
8724
8736
|
return isMounted;
|
|
8725
8737
|
}
|
|
8738
|
+
// @__NO_SIDE_EFFECTS__
|
|
8726
8739
|
function useSupported(callback) {
|
|
8727
|
-
const isMounted = useMounted();
|
|
8740
|
+
const isMounted = /* @__PURE__ */ useMounted();
|
|
8728
8741
|
return vue.computed(() => {
|
|
8729
8742
|
isMounted.value;
|
|
8730
8743
|
return Boolean(callback());
|
|
@@ -8733,7 +8746,7 @@
|
|
|
8733
8746
|
function useMutationObserver(target, callback, options = {}) {
|
|
8734
8747
|
const { window: window2 = defaultWindow, ...mutationOptions } = options;
|
|
8735
8748
|
let observer;
|
|
8736
|
-
const isSupported = useSupported(() => window2 && "MutationObserver" in window2);
|
|
8749
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "MutationObserver" in window2);
|
|
8737
8750
|
const cleanup = () => {
|
|
8738
8751
|
if (observer) {
|
|
8739
8752
|
observer.disconnect();
|
|
@@ -8746,12 +8759,12 @@
|
|
|
8746
8759
|
return new Set(items);
|
|
8747
8760
|
});
|
|
8748
8761
|
const stopWatch = vue.watch(
|
|
8749
|
-
|
|
8750
|
-
(
|
|
8762
|
+
targets,
|
|
8763
|
+
(newTargets) => {
|
|
8751
8764
|
cleanup();
|
|
8752
|
-
if (isSupported.value &&
|
|
8765
|
+
if (isSupported.value && newTargets.size) {
|
|
8753
8766
|
observer = new MutationObserver(callback);
|
|
8754
|
-
|
|
8767
|
+
newTargets.forEach((el) => observer.observe(el, mutationOptions));
|
|
8755
8768
|
}
|
|
8756
8769
|
},
|
|
8757
8770
|
{ immediate: true, flush: "post" }
|
|
@@ -8882,6 +8895,13 @@
|
|
|
8882
8895
|
startTimestamp = void 0;
|
|
8883
8896
|
hasLongPressed = false;
|
|
8884
8897
|
}
|
|
8898
|
+
function getDelay(ev) {
|
|
8899
|
+
const delay2 = options == null ? void 0 : options.delay;
|
|
8900
|
+
if (typeof delay2 === "function") {
|
|
8901
|
+
return delay2(ev);
|
|
8902
|
+
}
|
|
8903
|
+
return delay2 != null ? delay2 : DEFAULT_DELAY;
|
|
8904
|
+
}
|
|
8885
8905
|
function onRelease(ev) {
|
|
8886
8906
|
var _a2, _b2, _c;
|
|
8887
8907
|
const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed];
|
|
@@ -8900,7 +8920,7 @@
|
|
|
8900
8920
|
options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);
|
|
8901
8921
|
}
|
|
8902
8922
|
function onDown(ev) {
|
|
8903
|
-
var _a2, _b2, _c
|
|
8923
|
+
var _a2, _b2, _c;
|
|
8904
8924
|
if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)
|
|
8905
8925
|
return;
|
|
8906
8926
|
clear();
|
|
@@ -8918,7 +8938,7 @@
|
|
|
8918
8938
|
hasLongPressed = true;
|
|
8919
8939
|
handler(ev);
|
|
8920
8940
|
},
|
|
8921
|
-
(
|
|
8941
|
+
getDelay(ev)
|
|
8922
8942
|
);
|
|
8923
8943
|
}
|
|
8924
8944
|
function onMove(ev) {
|
|
@@ -8986,6 +9006,7 @@
|
|
|
8986
9006
|
if (document2)
|
|
8987
9007
|
useEventListener(document2, "keydown", keydown, { passive: true });
|
|
8988
9008
|
}
|
|
9009
|
+
// @__NO_SIDE_EFFECTS__
|
|
8989
9010
|
function templateRef(key, initialValue = null) {
|
|
8990
9011
|
const instance = vue.getCurrentInstance();
|
|
8991
9012
|
let _trigger = () => {
|
|
@@ -9006,6 +9027,7 @@
|
|
|
9006
9027
|
vue.onUpdated(_trigger);
|
|
9007
9028
|
return element;
|
|
9008
9029
|
}
|
|
9030
|
+
// @__NO_SIDE_EFFECTS__
|
|
9009
9031
|
function useActiveElement(options = {}) {
|
|
9010
9032
|
var _a;
|
|
9011
9033
|
const {
|
|
@@ -9131,7 +9153,7 @@
|
|
|
9131
9153
|
console.error(e);
|
|
9132
9154
|
}
|
|
9133
9155
|
} = config2;
|
|
9134
|
-
const isSupported = useSupported(() => window2 && HTMLElement && "animate" in HTMLElement.prototype);
|
|
9156
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && HTMLElement && "animate" in HTMLElement.prototype);
|
|
9135
9157
|
const animate = vue.shallowRef(void 0);
|
|
9136
9158
|
const store = vue.shallowReactive({
|
|
9137
9159
|
startTime: null,
|
|
@@ -9241,7 +9263,7 @@
|
|
|
9241
9263
|
};
|
|
9242
9264
|
vue.watch(() => unrefElement(target), (el) => {
|
|
9243
9265
|
if (el) {
|
|
9244
|
-
update2();
|
|
9266
|
+
update2(true);
|
|
9245
9267
|
} else {
|
|
9246
9268
|
animate.value = void 0;
|
|
9247
9269
|
}
|
|
@@ -9395,10 +9417,11 @@
|
|
|
9395
9417
|
});
|
|
9396
9418
|
}
|
|
9397
9419
|
function useAsyncState(promise, initialState, options) {
|
|
9420
|
+
var _a;
|
|
9398
9421
|
const {
|
|
9399
9422
|
immediate = true,
|
|
9400
9423
|
delay: delay2 = 0,
|
|
9401
|
-
onError = noop,
|
|
9424
|
+
onError = (_a = globalThis.reportError) != null ? _a : noop,
|
|
9402
9425
|
onSuccess = noop,
|
|
9403
9426
|
resetOnExecute = true,
|
|
9404
9427
|
shallow = true,
|
|
@@ -9410,7 +9433,7 @@
|
|
|
9410
9433
|
const error = vue.shallowRef(void 0);
|
|
9411
9434
|
async function execute(delay22 = 0, ...args) {
|
|
9412
9435
|
if (resetOnExecute)
|
|
9413
|
-
state.value = initialState;
|
|
9436
|
+
state.value = vue.toValue(initialState);
|
|
9414
9437
|
error.value = void 0;
|
|
9415
9438
|
isReady.value = false;
|
|
9416
9439
|
isLoading.value = true;
|
|
@@ -9552,10 +9575,11 @@
|
|
|
9552
9575
|
fr.readAsDataURL(blob);
|
|
9553
9576
|
});
|
|
9554
9577
|
}
|
|
9578
|
+
// @__NO_SIDE_EFFECTS__
|
|
9555
9579
|
function useBattery(options = {}) {
|
|
9556
9580
|
const { navigator: navigator2 = defaultNavigator } = options;
|
|
9557
9581
|
const events2 = ["chargingchange", "chargingtimechange", "dischargingtimechange", "levelchange"];
|
|
9558
|
-
const isSupported = useSupported(() => navigator2 && "getBattery" in navigator2 && typeof navigator2.getBattery === "function");
|
|
9582
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "getBattery" in navigator2 && typeof navigator2.getBattery === "function");
|
|
9559
9583
|
const charging = vue.shallowRef(false);
|
|
9560
9584
|
const chargingTime = vue.shallowRef(0);
|
|
9561
9585
|
const dischargingTime = vue.shallowRef(0);
|
|
@@ -9582,6 +9606,7 @@
|
|
|
9582
9606
|
level
|
|
9583
9607
|
};
|
|
9584
9608
|
}
|
|
9609
|
+
// @__NO_SIDE_EFFECTS__
|
|
9585
9610
|
function useBluetooth(options) {
|
|
9586
9611
|
let {
|
|
9587
9612
|
acceptAllDevices = false
|
|
@@ -9591,7 +9616,7 @@
|
|
|
9591
9616
|
optionalServices = void 0,
|
|
9592
9617
|
navigator: navigator2 = defaultNavigator
|
|
9593
9618
|
} = options || {};
|
|
9594
|
-
const isSupported = useSupported(() => navigator2 && "bluetooth" in navigator2);
|
|
9619
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "bluetooth" in navigator2);
|
|
9595
9620
|
const device = vue.shallowRef();
|
|
9596
9621
|
const error = vue.shallowRef(null);
|
|
9597
9622
|
vue.watch(device, () => {
|
|
@@ -9655,8 +9680,9 @@
|
|
|
9655
9680
|
};
|
|
9656
9681
|
}
|
|
9657
9682
|
const ssrWidthSymbol = Symbol("vueuse-ssr-width");
|
|
9683
|
+
// @__NO_SIDE_EFFECTS__
|
|
9658
9684
|
function useSSRWidth() {
|
|
9659
|
-
const ssrWidth = vue.hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
|
|
9685
|
+
const ssrWidth = vue.hasInjectionContext() ? /* @__PURE__ */ injectLocal(ssrWidthSymbol, null) : null;
|
|
9660
9686
|
return typeof ssrWidth === "number" ? ssrWidth : void 0;
|
|
9661
9687
|
}
|
|
9662
9688
|
function provideSSRWidth(width, app) {
|
|
@@ -9667,8 +9693,8 @@
|
|
|
9667
9693
|
}
|
|
9668
9694
|
}
|
|
9669
9695
|
function useMediaQuery(query, options = {}) {
|
|
9670
|
-
const { window: window2 = defaultWindow, ssrWidth = useSSRWidth() } = options;
|
|
9671
|
-
const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
|
|
9696
|
+
const { window: window2 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
|
|
9697
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
|
|
9672
9698
|
const ssrSupport = vue.shallowRef(typeof ssrWidth === "number");
|
|
9673
9699
|
const mediaQuery = vue.shallowRef();
|
|
9674
9700
|
const matches2 = vue.shallowRef(false);
|
|
@@ -9782,6 +9808,7 @@
|
|
|
9782
9808
|
lg: 1200,
|
|
9783
9809
|
xl: 1920
|
|
9784
9810
|
};
|
|
9811
|
+
// @__NO_SIDE_EFFECTS__
|
|
9785
9812
|
function useBreakpoints(breakpoints, options = {}) {
|
|
9786
9813
|
function getValue2(k, delta) {
|
|
9787
9814
|
let v = vue.toValue(breakpoints[vue.toValue(k)]);
|
|
@@ -9791,7 +9818,7 @@
|
|
|
9791
9818
|
v = `${v}px`;
|
|
9792
9819
|
return v;
|
|
9793
9820
|
}
|
|
9794
|
-
const { window: window2 = defaultWindow, strategy = "min-width", ssrWidth = useSSRWidth() } = options;
|
|
9821
|
+
const { window: window2 = defaultWindow, strategy = "min-width", ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
|
|
9795
9822
|
const ssrSupport = typeof ssrWidth === "number";
|
|
9796
9823
|
const mounted = ssrSupport ? vue.shallowRef(false) : { value: true };
|
|
9797
9824
|
if (ssrSupport) {
|
|
@@ -9862,7 +9889,7 @@
|
|
|
9862
9889
|
name,
|
|
9863
9890
|
window: window2 = defaultWindow
|
|
9864
9891
|
} = options;
|
|
9865
|
-
const isSupported = useSupported(() => window2 && "BroadcastChannel" in window2);
|
|
9892
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "BroadcastChannel" in window2);
|
|
9866
9893
|
const isClosed = vue.shallowRef(false);
|
|
9867
9894
|
const channel = vue.ref();
|
|
9868
9895
|
const data = vue.ref();
|
|
@@ -9917,6 +9944,7 @@
|
|
|
9917
9944
|
"protocol",
|
|
9918
9945
|
"search"
|
|
9919
9946
|
];
|
|
9947
|
+
// @__NO_SIDE_EFFECTS__
|
|
9920
9948
|
function useBrowserLocation(options = {}) {
|
|
9921
9949
|
const { window: window2 = defaultWindow } = options;
|
|
9922
9950
|
const refs = Object.fromEntries(
|
|
@@ -9953,19 +9981,20 @@
|
|
|
9953
9981
|
}
|
|
9954
9982
|
function useCached(refValue, comparator = (a, b) => a === b, options) {
|
|
9955
9983
|
const { deepRefs = true, ...watchOptions } = options || {};
|
|
9956
|
-
const cachedValue = createRef(refValue.value, deepRefs);
|
|
9984
|
+
const cachedValue = /* @__PURE__ */ createRef(refValue.value, deepRefs);
|
|
9957
9985
|
vue.watch(() => refValue.value, (value) => {
|
|
9958
9986
|
if (!comparator(value, cachedValue.value))
|
|
9959
9987
|
cachedValue.value = value;
|
|
9960
9988
|
}, watchOptions);
|
|
9961
9989
|
return cachedValue;
|
|
9962
9990
|
}
|
|
9991
|
+
// @__NO_SIDE_EFFECTS__
|
|
9963
9992
|
function usePermission(permissionDesc, options = {}) {
|
|
9964
9993
|
const {
|
|
9965
9994
|
controls = false,
|
|
9966
9995
|
navigator: navigator2 = defaultNavigator
|
|
9967
9996
|
} = options;
|
|
9968
|
-
const isSupported = useSupported(() => navigator2 && "permissions" in navigator2);
|
|
9997
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "permissions" in navigator2);
|
|
9969
9998
|
const permissionStatus = vue.shallowRef();
|
|
9970
9999
|
const desc = typeof permissionDesc === "string" ? { name: permissionDesc } : permissionDesc;
|
|
9971
10000
|
const state = vue.shallowRef();
|
|
@@ -10008,9 +10037,9 @@
|
|
|
10008
10037
|
copiedDuring = 1500,
|
|
10009
10038
|
legacy = false
|
|
10010
10039
|
} = options;
|
|
10011
|
-
const isClipboardApiSupported = useSupported(() => navigator2 && "clipboard" in navigator2);
|
|
10012
|
-
const permissionRead = usePermission("clipboard-read");
|
|
10013
|
-
const permissionWrite = usePermission("clipboard-write");
|
|
10040
|
+
const isClipboardApiSupported = /* @__PURE__ */ useSupported(() => navigator2 && "clipboard" in navigator2);
|
|
10041
|
+
const permissionRead = /* @__PURE__ */ usePermission("clipboard-read");
|
|
10042
|
+
const permissionWrite = /* @__PURE__ */ usePermission("clipboard-write");
|
|
10014
10043
|
const isSupported = vue.computed(() => isClipboardApiSupported.value || legacy);
|
|
10015
10044
|
const text = vue.shallowRef("");
|
|
10016
10045
|
const copied = vue.shallowRef(false);
|
|
@@ -10078,7 +10107,7 @@
|
|
|
10078
10107
|
source,
|
|
10079
10108
|
copiedDuring = 1500
|
|
10080
10109
|
} = options;
|
|
10081
|
-
const isSupported = useSupported(() => navigator2 && "clipboard" in navigator2);
|
|
10110
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "clipboard" in navigator2);
|
|
10082
10111
|
const content = vue.ref([]);
|
|
10083
10112
|
const copied = vue.shallowRef(false);
|
|
10084
10113
|
const timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });
|
|
@@ -10089,8 +10118,9 @@
|
|
|
10089
10118
|
});
|
|
10090
10119
|
}
|
|
10091
10120
|
}
|
|
10092
|
-
if (isSupported.value && read)
|
|
10121
|
+
if (isSupported.value && read) {
|
|
10093
10122
|
useEventListener(["copy", "cut"], updateContent, { passive: true });
|
|
10123
|
+
}
|
|
10094
10124
|
async function copy(value = vue.toValue(source)) {
|
|
10095
10125
|
if (isSupported.value && value != null) {
|
|
10096
10126
|
await navigator2.clipboard.write(value);
|
|
@@ -10101,9 +10131,10 @@
|
|
|
10101
10131
|
}
|
|
10102
10132
|
return {
|
|
10103
10133
|
isSupported,
|
|
10104
|
-
content,
|
|
10105
|
-
copied,
|
|
10106
|
-
copy
|
|
10134
|
+
content: vue.shallowReadonly(content),
|
|
10135
|
+
copied: vue.readonly(copied),
|
|
10136
|
+
copy,
|
|
10137
|
+
read: updateContent
|
|
10107
10138
|
};
|
|
10108
10139
|
}
|
|
10109
10140
|
function cloneFnJSON(source) {
|
|
@@ -10160,6 +10191,7 @@
|
|
|
10160
10191
|
function setSSRHandler(key, fn) {
|
|
10161
10192
|
handlers[key] = fn;
|
|
10162
10193
|
}
|
|
10194
|
+
// @__NO_SIDE_EFFECTS__
|
|
10163
10195
|
function usePreferredDark(options) {
|
|
10164
10196
|
return useMediaQuery("(prefers-color-scheme: dark)", options);
|
|
10165
10197
|
}
|
|
@@ -10236,7 +10268,7 @@
|
|
|
10236
10268
|
const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
|
|
10237
10269
|
const { pause: pauseWatch, resume: resumeWatch } = watchPausable(
|
|
10238
10270
|
data,
|
|
10239
|
-
() => write(
|
|
10271
|
+
(newValue) => write(newValue),
|
|
10240
10272
|
{ flush, deep, eventFilter }
|
|
10241
10273
|
);
|
|
10242
10274
|
vue.watch(keyComputed, () => update2(), { flush });
|
|
@@ -10323,12 +10355,15 @@
|
|
|
10323
10355
|
data.value = rawInit;
|
|
10324
10356
|
return;
|
|
10325
10357
|
}
|
|
10326
|
-
if (event && event.key !== keyComputed.value)
|
|
10358
|
+
if (event && event.key !== keyComputed.value) {
|
|
10327
10359
|
return;
|
|
10360
|
+
}
|
|
10328
10361
|
pauseWatch();
|
|
10329
10362
|
try {
|
|
10330
|
-
|
|
10363
|
+
const serializedData = serializer.write(data.value);
|
|
10364
|
+
if (event === void 0 || (event == null ? void 0 : event.newValue) !== serializedData) {
|
|
10331
10365
|
data.value = read(event);
|
|
10366
|
+
}
|
|
10332
10367
|
} catch (e) {
|
|
10333
10368
|
onError(e);
|
|
10334
10369
|
} finally {
|
|
@@ -10363,7 +10398,7 @@
|
|
|
10363
10398
|
dark: "dark",
|
|
10364
10399
|
...options.modes || {}
|
|
10365
10400
|
};
|
|
10366
|
-
const preferredDark = usePreferredDark({ window: window2 });
|
|
10401
|
+
const preferredDark = /* @__PURE__ */ usePreferredDark({ window: window2 });
|
|
10367
10402
|
const system = vue.computed(() => preferredDark.value ? "dark" : "light");
|
|
10368
10403
|
const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window: window2, listenToStorageChanges }));
|
|
10369
10404
|
const state = vue.computed(() => store.value === "auto" ? system.value : store.value);
|
|
@@ -10432,10 +10467,11 @@
|
|
|
10432
10467
|
});
|
|
10433
10468
|
return Object.assign(auto, { store, system, state });
|
|
10434
10469
|
}
|
|
10470
|
+
// @__NO_SIDE_EFFECTS__
|
|
10435
10471
|
function useConfirmDialog(revealed = vue.shallowRef(false)) {
|
|
10436
|
-
const confirmHook = createEventHook();
|
|
10437
|
-
const cancelHook = createEventHook();
|
|
10438
|
-
const revealHook = createEventHook();
|
|
10472
|
+
const confirmHook = /* @__PURE__ */ createEventHook();
|
|
10473
|
+
const cancelHook = /* @__PURE__ */ createEventHook();
|
|
10474
|
+
const revealHook = /* @__PURE__ */ createEventHook();
|
|
10439
10475
|
let _resolve = noop;
|
|
10440
10476
|
const reveal = (data) => {
|
|
10441
10477
|
revealHook.trigger(data);
|
|
@@ -10801,8 +10837,8 @@
|
|
|
10801
10837
|
requestPermissions = false,
|
|
10802
10838
|
eventFilter = bypassFilter
|
|
10803
10839
|
} = options;
|
|
10804
|
-
const isSupported = useSupported(() => typeof DeviceMotionEvent !== "undefined");
|
|
10805
|
-
const requirePermissions = useSupported(() => isSupported.value && "requestPermission" in DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission === "function");
|
|
10840
|
+
const isSupported = /* @__PURE__ */ useSupported(() => typeof DeviceMotionEvent !== "undefined");
|
|
10841
|
+
const requirePermissions = /* @__PURE__ */ useSupported(() => isSupported.value && "requestPermission" in DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission === "function");
|
|
10806
10842
|
const permissionGranted = vue.shallowRef(false);
|
|
10807
10843
|
const acceleration = vue.ref({ x: null, y: null, z: null });
|
|
10808
10844
|
const rotationRate = vue.ref({ alpha: null, beta: null, gamma: null });
|
|
@@ -10875,9 +10911,10 @@
|
|
|
10875
10911
|
permissionGranted
|
|
10876
10912
|
};
|
|
10877
10913
|
}
|
|
10914
|
+
// @__NO_SIDE_EFFECTS__
|
|
10878
10915
|
function useDeviceOrientation(options = {}) {
|
|
10879
10916
|
const { window: window2 = defaultWindow } = options;
|
|
10880
|
-
const isSupported = useSupported(() => window2 && "DeviceOrientationEvent" in window2);
|
|
10917
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "DeviceOrientationEvent" in window2);
|
|
10881
10918
|
const isAbsolute = vue.shallowRef(false);
|
|
10882
10919
|
const alpha = vue.shallowRef(null);
|
|
10883
10920
|
const beta = vue.shallowRef(null);
|
|
@@ -10898,6 +10935,7 @@
|
|
|
10898
10935
|
gamma
|
|
10899
10936
|
};
|
|
10900
10937
|
}
|
|
10938
|
+
// @__NO_SIDE_EFFECTS__
|
|
10901
10939
|
function useDevicePixelRatio(options = {}) {
|
|
10902
10940
|
const {
|
|
10903
10941
|
window: window2 = defaultWindow
|
|
@@ -10924,7 +10962,7 @@
|
|
|
10924
10962
|
const videoInputs = vue.computed(() => devices.value.filter((i) => i.kind === "videoinput"));
|
|
10925
10963
|
const audioInputs = vue.computed(() => devices.value.filter((i) => i.kind === "audioinput"));
|
|
10926
10964
|
const audioOutputs = vue.computed(() => devices.value.filter((i) => i.kind === "audiooutput"));
|
|
10927
|
-
const isSupported = useSupported(() => navigator2 && navigator2.mediaDevices && navigator2.mediaDevices.enumerateDevices);
|
|
10965
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && navigator2.mediaDevices && navigator2.mediaDevices.enumerateDevices);
|
|
10928
10966
|
const permissionGranted = vue.shallowRef(false);
|
|
10929
10967
|
let stream;
|
|
10930
10968
|
async function update2() {
|
|
@@ -10943,7 +10981,7 @@
|
|
|
10943
10981
|
return false;
|
|
10944
10982
|
if (permissionGranted.value)
|
|
10945
10983
|
return true;
|
|
10946
|
-
const { state, query } = usePermission(deviceName, { controls: true });
|
|
10984
|
+
const { state, query } = /* @__PURE__ */ usePermission(deviceName, { controls: true });
|
|
10947
10985
|
await query();
|
|
10948
10986
|
if (state.value !== "granted") {
|
|
10949
10987
|
let granted = true;
|
|
@@ -10987,7 +11025,7 @@
|
|
|
10987
11025
|
const video = options.video;
|
|
10988
11026
|
const audio = options.audio;
|
|
10989
11027
|
const { navigator: navigator2 = defaultNavigator } = options;
|
|
10990
|
-
const isSupported = useSupported(() => {
|
|
11028
|
+
const isSupported = /* @__PURE__ */ useSupported(() => {
|
|
10991
11029
|
var _a2;
|
|
10992
11030
|
return (_a2 = navigator2 == null ? void 0 : navigator2.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;
|
|
10993
11031
|
});
|
|
@@ -11034,6 +11072,7 @@
|
|
|
11034
11072
|
enabled
|
|
11035
11073
|
};
|
|
11036
11074
|
}
|
|
11075
|
+
// @__NO_SIDE_EFFECTS__
|
|
11037
11076
|
function useDocumentVisibility(options = {}) {
|
|
11038
11077
|
const { document: document2 = defaultDocument } = options;
|
|
11039
11078
|
if (!document2)
|
|
@@ -11241,7 +11280,7 @@
|
|
|
11241
11280
|
function useResizeObserver(target, callback, options = {}) {
|
|
11242
11281
|
const { window: window2 = defaultWindow, ...observerOptions } = options;
|
|
11243
11282
|
let observer;
|
|
11244
|
-
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
|
11283
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "ResizeObserver" in window2);
|
|
11245
11284
|
const cleanup = () => {
|
|
11246
11285
|
if (observer) {
|
|
11247
11286
|
observer.disconnect();
|
|
@@ -11357,7 +11396,7 @@
|
|
|
11357
11396
|
interval = "requestAnimationFrame",
|
|
11358
11397
|
immediate = true
|
|
11359
11398
|
} = options;
|
|
11360
|
-
const isSupported = useSupported(() => {
|
|
11399
|
+
const isSupported = /* @__PURE__ */ useSupported(() => {
|
|
11361
11400
|
if (vue.toValue(multiple))
|
|
11362
11401
|
return document2 && "elementsFromPoint" in document2;
|
|
11363
11402
|
return document2 && "elementFromPoint" in document2;
|
|
@@ -11470,7 +11509,7 @@
|
|
|
11470
11509
|
window: window2 = defaultWindow,
|
|
11471
11510
|
immediate = true
|
|
11472
11511
|
} = options;
|
|
11473
|
-
const isSupported = useSupported(() => window2 && "IntersectionObserver" in window2);
|
|
11512
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "IntersectionObserver" in window2);
|
|
11474
11513
|
const targets = vue.computed(() => {
|
|
11475
11514
|
const _target = vue.toValue(target);
|
|
11476
11515
|
return toArray(_target).map(unrefElement).filter(notNullish);
|
|
@@ -11557,6 +11596,7 @@
|
|
|
11557
11596
|
return elementIsVisible;
|
|
11558
11597
|
}
|
|
11559
11598
|
const events = /* @__PURE__ */ new Map();
|
|
11599
|
+
// @__NO_SIDE_EFFECTS__
|
|
11560
11600
|
function useEventBus(key) {
|
|
11561
11601
|
const scope = vue.getCurrentScope();
|
|
11562
11602
|
function on2(listener) {
|
|
@@ -11611,7 +11651,10 @@
|
|
|
11611
11651
|
withCredentials = false,
|
|
11612
11652
|
immediate = true,
|
|
11613
11653
|
autoConnect = true,
|
|
11614
|
-
autoReconnect
|
|
11654
|
+
autoReconnect,
|
|
11655
|
+
serializer = {
|
|
11656
|
+
read: (v) => v
|
|
11657
|
+
}
|
|
11615
11658
|
} = options;
|
|
11616
11659
|
const close = () => {
|
|
11617
11660
|
if (isClient && eventSource.value) {
|
|
@@ -11651,15 +11694,17 @@
|
|
|
11651
11694
|
}
|
|
11652
11695
|
};
|
|
11653
11696
|
es.onmessage = (e) => {
|
|
11697
|
+
var _a;
|
|
11654
11698
|
event.value = null;
|
|
11655
|
-
data.value = e.data;
|
|
11699
|
+
data.value = (_a = serializer.read(e.data)) != null ? _a : null;
|
|
11656
11700
|
lastEventId.value = e.lastEventId;
|
|
11657
11701
|
};
|
|
11658
11702
|
for (const event_name of events2) {
|
|
11659
11703
|
useEventListener(es, event_name, (e) => {
|
|
11704
|
+
var _a, _b;
|
|
11660
11705
|
event.value = event_name;
|
|
11661
|
-
data.value = e.data
|
|
11662
|
-
lastEventId.value = e.lastEventId
|
|
11706
|
+
data.value = (_a = serializer.read(e.data)) != null ? _a : null;
|
|
11707
|
+
lastEventId.value = (_b = e.lastEventId) != null ? _b : null;
|
|
11663
11708
|
}, { passive: true });
|
|
11664
11709
|
}
|
|
11665
11710
|
};
|
|
@@ -11687,9 +11732,10 @@
|
|
|
11687
11732
|
lastEventId
|
|
11688
11733
|
};
|
|
11689
11734
|
}
|
|
11735
|
+
// @__NO_SIDE_EFFECTS__
|
|
11690
11736
|
function useEyeDropper(options = {}) {
|
|
11691
11737
|
const { initialValue = "" } = options;
|
|
11692
|
-
const isSupported = useSupported(() => typeof window !== "undefined" && "EyeDropper" in window);
|
|
11738
|
+
const isSupported = /* @__PURE__ */ useSupported(() => typeof window !== "undefined" && "EyeDropper" in window);
|
|
11693
11739
|
const sRGBHex = vue.shallowRef(initialValue);
|
|
11694
11740
|
async function open(openOptions) {
|
|
11695
11741
|
if (!isSupported.value)
|
|
@@ -11847,9 +11893,9 @@
|
|
|
11847
11893
|
initialData,
|
|
11848
11894
|
timeout
|
|
11849
11895
|
} = options;
|
|
11850
|
-
const responseEvent = createEventHook();
|
|
11851
|
-
const errorEvent = createEventHook();
|
|
11852
|
-
const finallyEvent = createEventHook();
|
|
11896
|
+
const responseEvent = /* @__PURE__ */ createEventHook();
|
|
11897
|
+
const errorEvent = /* @__PURE__ */ createEventHook();
|
|
11898
|
+
const finallyEvent = /* @__PURE__ */ createEventHook();
|
|
11853
11899
|
const isFinished = vue.shallowRef(false);
|
|
11854
11900
|
const isFetching = vue.shallowRef(false);
|
|
11855
11901
|
const aborted = vue.shallowRef(false);
|
|
@@ -12099,45 +12145,58 @@
|
|
|
12099
12145
|
document: document2 = defaultDocument
|
|
12100
12146
|
} = options;
|
|
12101
12147
|
const files = vue.ref(prepareInitialFiles(options.initialFiles));
|
|
12102
|
-
const { on: onChange, trigger: changeTrigger } = createEventHook();
|
|
12103
|
-
const { on: onCancel, trigger: cancelTrigger } = createEventHook();
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
input = unrefElement(options.input)
|
|
12107
|
-
input
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12148
|
+
const { on: onChange, trigger: changeTrigger } = /* @__PURE__ */ createEventHook();
|
|
12149
|
+
const { on: onCancel, trigger: cancelTrigger } = /* @__PURE__ */ createEventHook();
|
|
12150
|
+
const inputRef = vue.computed(() => {
|
|
12151
|
+
var _a;
|
|
12152
|
+
const input = (_a = unrefElement(options.input)) != null ? _a : document2 ? document2.createElement("input") : void 0;
|
|
12153
|
+
if (input) {
|
|
12154
|
+
input.type = "file";
|
|
12155
|
+
input.onchange = (event) => {
|
|
12156
|
+
const result2 = event.target;
|
|
12157
|
+
files.value = result2.files;
|
|
12158
|
+
changeTrigger(files.value);
|
|
12159
|
+
};
|
|
12160
|
+
input.oncancel = () => {
|
|
12161
|
+
cancelTrigger();
|
|
12162
|
+
};
|
|
12163
|
+
}
|
|
12164
|
+
return input;
|
|
12165
|
+
});
|
|
12117
12166
|
const reset = () => {
|
|
12118
12167
|
files.value = null;
|
|
12119
|
-
if (
|
|
12120
|
-
|
|
12168
|
+
if (inputRef.value && inputRef.value.value) {
|
|
12169
|
+
inputRef.value.value = "";
|
|
12121
12170
|
changeTrigger(null);
|
|
12122
12171
|
}
|
|
12123
12172
|
};
|
|
12173
|
+
const applyOptions = (options2) => {
|
|
12174
|
+
const el = inputRef.value;
|
|
12175
|
+
if (!el)
|
|
12176
|
+
return;
|
|
12177
|
+
el.multiple = vue.toValue(options2.multiple);
|
|
12178
|
+
el.accept = vue.toValue(options2.accept);
|
|
12179
|
+
el.webkitdirectory = vue.toValue(options2.directory);
|
|
12180
|
+
if (hasOwn(options2, "capture"))
|
|
12181
|
+
el.capture = vue.toValue(options2.capture);
|
|
12182
|
+
};
|
|
12124
12183
|
const open = (localOptions) => {
|
|
12125
|
-
|
|
12184
|
+
const el = inputRef.value;
|
|
12185
|
+
if (!el)
|
|
12126
12186
|
return;
|
|
12127
|
-
const
|
|
12187
|
+
const mergedOptions = {
|
|
12128
12188
|
...DEFAULT_OPTIONS,
|
|
12129
12189
|
...options,
|
|
12130
12190
|
...localOptions
|
|
12131
12191
|
};
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
input.webkitdirectory = _options.directory;
|
|
12135
|
-
if (hasOwn(_options, "capture"))
|
|
12136
|
-
input.capture = _options.capture;
|
|
12137
|
-
if (_options.reset)
|
|
12192
|
+
applyOptions(mergedOptions);
|
|
12193
|
+
if (vue.toValue(mergedOptions.reset))
|
|
12138
12194
|
reset();
|
|
12139
|
-
|
|
12195
|
+
el.click();
|
|
12140
12196
|
};
|
|
12197
|
+
vue.watchEffect(() => {
|
|
12198
|
+
applyOptions(options);
|
|
12199
|
+
});
|
|
12141
12200
|
return {
|
|
12142
12201
|
files: vue.readonly(files),
|
|
12143
12202
|
open,
|
|
@@ -12152,7 +12211,7 @@
|
|
|
12152
12211
|
dataType = "Text"
|
|
12153
12212
|
} = options;
|
|
12154
12213
|
const window2 = _window;
|
|
12155
|
-
const isSupported = useSupported(() => window2 && "showSaveFilePicker" in window2 && "showOpenFilePicker" in window2);
|
|
12214
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "showSaveFilePicker" in window2 && "showOpenFilePicker" in window2);
|
|
12156
12215
|
const fileHandle = vue.shallowRef();
|
|
12157
12216
|
const data = vue.shallowRef();
|
|
12158
12217
|
const file = vue.shallowRef();
|
|
@@ -12278,7 +12337,7 @@
|
|
|
12278
12337
|
const targetElement = vue.computed(() => unrefElement(target));
|
|
12279
12338
|
const _focused = vue.shallowRef(false);
|
|
12280
12339
|
const focused = vue.computed(() => _focused.value);
|
|
12281
|
-
const activeElement = useActiveElement(options);
|
|
12340
|
+
const activeElement = /* @__PURE__ */ useActiveElement(options);
|
|
12282
12341
|
if (!window2 || !activeElement.value) {
|
|
12283
12342
|
return { focused };
|
|
12284
12343
|
}
|
|
@@ -12290,6 +12349,7 @@
|
|
|
12290
12349
|
}, listenerOptions);
|
|
12291
12350
|
return { focused };
|
|
12292
12351
|
}
|
|
12352
|
+
// @__NO_SIDE_EFFECTS__
|
|
12293
12353
|
function useFps(options) {
|
|
12294
12354
|
var _a;
|
|
12295
12355
|
const fps = vue.shallowRef(0);
|
|
@@ -12363,7 +12423,7 @@
|
|
|
12363
12423
|
"mozFullScreenElement",
|
|
12364
12424
|
"msFullscreenElement"
|
|
12365
12425
|
].find((m) => document2 && m in document2);
|
|
12366
|
-
const isSupported = useSupported(() => targetRef.value && document2 && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);
|
|
12426
|
+
const isSupported = /* @__PURE__ */ useSupported(() => targetRef.value && document2 && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);
|
|
12367
12427
|
const isCurrentElementFullScreen = () => {
|
|
12368
12428
|
if (fullscreenElementMethod)
|
|
12369
12429
|
return (document2 == null ? void 0 : document2[fullscreenElementMethod]) === targetRef.value;
|
|
@@ -12472,14 +12532,15 @@
|
|
|
12472
12532
|
return null;
|
|
12473
12533
|
});
|
|
12474
12534
|
}
|
|
12535
|
+
// @__NO_SIDE_EFFECTS__
|
|
12475
12536
|
function useGamepad(options = {}) {
|
|
12476
12537
|
const {
|
|
12477
12538
|
navigator: navigator2 = defaultNavigator
|
|
12478
12539
|
} = options;
|
|
12479
|
-
const isSupported = useSupported(() => navigator2 && "getGamepads" in navigator2);
|
|
12540
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "getGamepads" in navigator2);
|
|
12480
12541
|
const gamepads = vue.ref([]);
|
|
12481
|
-
const onConnectedHook = createEventHook();
|
|
12482
|
-
const onDisconnectedHook = createEventHook();
|
|
12542
|
+
const onConnectedHook = /* @__PURE__ */ createEventHook();
|
|
12543
|
+
const onDisconnectedHook = /* @__PURE__ */ createEventHook();
|
|
12483
12544
|
const stateFromGamepad = (gamepad) => {
|
|
12484
12545
|
const hapticActuators = [];
|
|
12485
12546
|
const vibrationActuator = "vibrationActuator" in gamepad ? gamepad.vibrationActuator : null;
|
|
@@ -12547,7 +12608,7 @@
|
|
|
12547
12608
|
navigator: navigator2 = defaultNavigator,
|
|
12548
12609
|
immediate = true
|
|
12549
12610
|
} = options;
|
|
12550
|
-
const isSupported = useSupported(() => navigator2 && "geolocation" in navigator2);
|
|
12611
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "geolocation" in navigator2);
|
|
12551
12612
|
const locatedAt = vue.shallowRef(null);
|
|
12552
12613
|
const error = vue.shallowRef(null);
|
|
12553
12614
|
const coords = vue.ref({
|
|
@@ -12785,7 +12846,7 @@
|
|
|
12785
12846
|
directions.bottom = false;
|
|
12786
12847
|
onStop(e);
|
|
12787
12848
|
};
|
|
12788
|
-
const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle2 + idle);
|
|
12849
|
+
const onScrollEndDebounced = /* @__PURE__ */ useDebounceFn(onScrollEnd, throttle2 + idle);
|
|
12789
12850
|
const setArrivedState = (target) => {
|
|
12790
12851
|
var _a;
|
|
12791
12852
|
if (!window2)
|
|
@@ -12835,7 +12896,7 @@
|
|
|
12835
12896
|
useEventListener(
|
|
12836
12897
|
element,
|
|
12837
12898
|
"scroll",
|
|
12838
|
-
throttle2 ? useThrottleFn(onScrollHandler, throttle2, true, false) : onScrollHandler,
|
|
12899
|
+
throttle2 ? /* @__PURE__ */ useThrottleFn(onScrollHandler, throttle2, true, false) : onScrollHandler,
|
|
12839
12900
|
eventListenerOptions
|
|
12840
12901
|
);
|
|
12841
12902
|
tryOnMounted(() => {
|
|
@@ -12938,6 +12999,7 @@
|
|
|
12938
12999
|
};
|
|
12939
13000
|
}
|
|
12940
13001
|
const defaultEvents = ["mousedown", "mouseup", "keydown", "keyup"];
|
|
13002
|
+
// @__NO_SIDE_EFFECTS__
|
|
12941
13003
|
function useKeyModifier(modifier, options = {}) {
|
|
12942
13004
|
const {
|
|
12943
13005
|
events: events2 = defaultEvents,
|
|
@@ -13017,9 +13079,13 @@
|
|
|
13017
13079
|
setRefs(key2, value);
|
|
13018
13080
|
}
|
|
13019
13081
|
if (key === "shift" && !value) {
|
|
13020
|
-
|
|
13021
|
-
|
|
13022
|
-
|
|
13082
|
+
const shiftDepsArray = Array.from(shiftDeps);
|
|
13083
|
+
const shiftIndex = shiftDepsArray.indexOf("shift");
|
|
13084
|
+
shiftDepsArray.forEach((key2, index2) => {
|
|
13085
|
+
if (index2 >= shiftIndex) {
|
|
13086
|
+
current.delete(key2);
|
|
13087
|
+
setRefs(key2, false);
|
|
13088
|
+
}
|
|
13023
13089
|
});
|
|
13024
13090
|
shiftDeps.clear();
|
|
13025
13091
|
} else if (typeof e.getModifierState === "function" && e.getModifierState("Shift") && value) {
|
|
@@ -13111,8 +13177,8 @@
|
|
|
13111
13177
|
const isPictureInPicture = vue.shallowRef(false);
|
|
13112
13178
|
const muted = vue.shallowRef(false);
|
|
13113
13179
|
const supportsPictureInPicture = document2 && "pictureInPictureEnabled" in document2;
|
|
13114
|
-
const sourceErrorEvent = createEventHook();
|
|
13115
|
-
const playbackErrorEvent = createEventHook();
|
|
13180
|
+
const sourceErrorEvent = /* @__PURE__ */ createEventHook();
|
|
13181
|
+
const playbackErrorEvent = /* @__PURE__ */ createEventHook();
|
|
13116
13182
|
const disableTrack = (track) => {
|
|
13117
13183
|
usingElRef(target, (el) => {
|
|
13118
13184
|
if (track) {
|
|
@@ -13380,6 +13446,7 @@
|
|
|
13380
13446
|
onPlaybackError: playbackErrorEvent.on
|
|
13381
13447
|
};
|
|
13382
13448
|
}
|
|
13449
|
+
// @__NO_SIDE_EFFECTS__
|
|
13383
13450
|
function useMemoize(resolver, options) {
|
|
13384
13451
|
const initCache = () => {
|
|
13385
13452
|
if (options == null ? void 0 : options.cache)
|
|
@@ -13412,9 +13479,10 @@
|
|
|
13412
13479
|
memoized.cache = cache;
|
|
13413
13480
|
return memoized;
|
|
13414
13481
|
}
|
|
13482
|
+
// @__NO_SIDE_EFFECTS__
|
|
13415
13483
|
function useMemory(options = {}) {
|
|
13416
13484
|
const memory = vue.ref();
|
|
13417
|
-
const isSupported = useSupported(() => typeof performance !== "undefined" && "memory" in performance);
|
|
13485
|
+
const isSupported = /* @__PURE__ */ useSupported(() => typeof performance !== "undefined" && "memory" in performance);
|
|
13418
13486
|
if (isSupported.value) {
|
|
13419
13487
|
const { interval = 1e3 } = options;
|
|
13420
13488
|
useIntervalFn(() => {
|
|
@@ -13537,7 +13605,7 @@
|
|
|
13537
13605
|
const elX = x.value - elementPositionX.value;
|
|
13538
13606
|
const elY = y.value - elementPositionY.value;
|
|
13539
13607
|
isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;
|
|
13540
|
-
if (handleOutside) {
|
|
13608
|
+
if (handleOutside || !isOutside.value) {
|
|
13541
13609
|
elementX.value = elX;
|
|
13542
13610
|
elementY.value = elY;
|
|
13543
13611
|
}
|
|
@@ -13647,10 +13715,11 @@
|
|
|
13647
13715
|
sourceType
|
|
13648
13716
|
};
|
|
13649
13717
|
}
|
|
13718
|
+
// @__NO_SIDE_EFFECTS__
|
|
13650
13719
|
function useNavigatorLanguage(options = {}) {
|
|
13651
13720
|
const { window: window2 = defaultWindow } = options;
|
|
13652
13721
|
const navigator2 = window2 == null ? void 0 : window2.navigator;
|
|
13653
|
-
const isSupported = useSupported(() => navigator2 && "language" in navigator2);
|
|
13722
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "language" in navigator2);
|
|
13654
13723
|
const language = vue.shallowRef(navigator2 == null ? void 0 : navigator2.language);
|
|
13655
13724
|
useEventListener(window2, "languagechange", () => {
|
|
13656
13725
|
if (navigator2)
|
|
@@ -13661,10 +13730,11 @@
|
|
|
13661
13730
|
language
|
|
13662
13731
|
};
|
|
13663
13732
|
}
|
|
13733
|
+
// @__NO_SIDE_EFFECTS__
|
|
13664
13734
|
function useNetwork(options = {}) {
|
|
13665
13735
|
const { window: window2 = defaultWindow } = options;
|
|
13666
13736
|
const navigator2 = window2 == null ? void 0 : window2.navigator;
|
|
13667
|
-
const isSupported = useSupported(() => navigator2 && "connection" in navigator2);
|
|
13737
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "connection" in navigator2);
|
|
13668
13738
|
const isOnline = vue.shallowRef(true);
|
|
13669
13739
|
const saveData = vue.shallowRef(false);
|
|
13670
13740
|
const offlineAt = vue.shallowRef(void 0);
|
|
@@ -13717,6 +13787,7 @@
|
|
|
13717
13787
|
type: vue.readonly(type)
|
|
13718
13788
|
};
|
|
13719
13789
|
}
|
|
13790
|
+
// @__NO_SIDE_EFFECTS__
|
|
13720
13791
|
function useNow(options = {}) {
|
|
13721
13792
|
const {
|
|
13722
13793
|
controls: exposeControls = false,
|
|
@@ -13754,6 +13825,7 @@
|
|
|
13754
13825
|
tryOnScopeDispose(release);
|
|
13755
13826
|
return vue.readonly(url);
|
|
13756
13827
|
}
|
|
13828
|
+
// @__NO_SIDE_EFFECTS__
|
|
13757
13829
|
function useClamp(value, min2, max2) {
|
|
13758
13830
|
if (typeof value === "function" || vue.isReadonly(value))
|
|
13759
13831
|
return vue.computed(() => clamp$1(vue.toValue(value), vue.toValue(min2), vue.toValue(max2)));
|
|
@@ -13776,12 +13848,12 @@
|
|
|
13776
13848
|
onPageSizeChange = noop,
|
|
13777
13849
|
onPageCountChange = noop
|
|
13778
13850
|
} = options;
|
|
13779
|
-
const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);
|
|
13851
|
+
const currentPageSize = /* @__PURE__ */ useClamp(pageSize, 1, Number.POSITIVE_INFINITY);
|
|
13780
13852
|
const pageCount = vue.computed(() => Math.max(
|
|
13781
13853
|
1,
|
|
13782
13854
|
Math.ceil(vue.toValue(total) / vue.toValue(currentPageSize))
|
|
13783
13855
|
));
|
|
13784
|
-
const currentPage = useClamp(page, 1, pageCount);
|
|
13856
|
+
const currentPage = /* @__PURE__ */ useClamp(page, 1, pageCount);
|
|
13785
13857
|
const isFirstPage = vue.computed(() => currentPage.value === 1);
|
|
13786
13858
|
const isLastPage = vue.computed(() => currentPage.value === pageCount.value);
|
|
13787
13859
|
if (vue.isRef(page)) {
|
|
@@ -13820,10 +13892,12 @@
|
|
|
13820
13892
|
});
|
|
13821
13893
|
return returnValue;
|
|
13822
13894
|
}
|
|
13895
|
+
// @__NO_SIDE_EFFECTS__
|
|
13823
13896
|
function useOnline(options = {}) {
|
|
13824
|
-
const { isOnline } = useNetwork(options);
|
|
13897
|
+
const { isOnline } = /* @__PURE__ */ useNetwork(options);
|
|
13825
13898
|
return isOnline;
|
|
13826
13899
|
}
|
|
13900
|
+
// @__NO_SIDE_EFFECTS__
|
|
13827
13901
|
function usePageLeave(options = {}) {
|
|
13828
13902
|
const { window: window2 = defaultWindow } = options;
|
|
13829
13903
|
const isLeft = vue.shallowRef(false);
|
|
@@ -13842,11 +13916,12 @@
|
|
|
13842
13916
|
}
|
|
13843
13917
|
return isLeft;
|
|
13844
13918
|
}
|
|
13919
|
+
// @__NO_SIDE_EFFECTS__
|
|
13845
13920
|
function useScreenOrientation(options = {}) {
|
|
13846
13921
|
const {
|
|
13847
13922
|
window: window2 = defaultWindow
|
|
13848
13923
|
} = options;
|
|
13849
|
-
const isSupported = useSupported(() => window2 && "screen" in window2 && "orientation" in window2.screen);
|
|
13924
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "screen" in window2 && "orientation" in window2.screen);
|
|
13850
13925
|
const screenOrientation = isSupported.value ? window2.screen.orientation : {};
|
|
13851
13926
|
const orientation = vue.ref(screenOrientation.type);
|
|
13852
13927
|
const angle = vue.shallowRef(screenOrientation.angle || 0);
|
|
@@ -13881,8 +13956,8 @@
|
|
|
13881
13956
|
mouseRollAdjust = (i) => i,
|
|
13882
13957
|
window: window2 = defaultWindow
|
|
13883
13958
|
} = options;
|
|
13884
|
-
const orientation = vue.reactive(useDeviceOrientation({ window: window2 }));
|
|
13885
|
-
const screenOrientation = vue.reactive(useScreenOrientation({ window: window2 }));
|
|
13959
|
+
const orientation = vue.reactive(/* @__PURE__ */ useDeviceOrientation({ window: window2 }));
|
|
13960
|
+
const screenOrientation = vue.reactive(/* @__PURE__ */ useScreenOrientation({ window: window2 }));
|
|
13886
13961
|
const {
|
|
13887
13962
|
elementX: x,
|
|
13888
13963
|
elementY: y,
|
|
@@ -13964,7 +14039,7 @@
|
|
|
13964
14039
|
immediate = true,
|
|
13965
14040
|
...performanceOptions
|
|
13966
14041
|
} = options;
|
|
13967
|
-
const isSupported = useSupported(() => window2 && "PerformanceObserver" in window2);
|
|
14042
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window2 && "PerformanceObserver" in window2);
|
|
13968
14043
|
let observer;
|
|
13969
14044
|
const stop = () => {
|
|
13970
14045
|
observer == null ? void 0 : observer.disconnect();
|
|
@@ -14003,7 +14078,7 @@
|
|
|
14003
14078
|
target = defaultWindow
|
|
14004
14079
|
} = options;
|
|
14005
14080
|
const isInside = vue.shallowRef(false);
|
|
14006
|
-
const state = vue.
|
|
14081
|
+
const state = vue.shallowRef(options.initialValue || {});
|
|
14007
14082
|
Object.assign(state.value, defaultState, state.value);
|
|
14008
14083
|
const handler = (event) => {
|
|
14009
14084
|
isInside.value = true;
|
|
@@ -14021,9 +14096,10 @@
|
|
|
14021
14096
|
isInside
|
|
14022
14097
|
};
|
|
14023
14098
|
}
|
|
14099
|
+
// @__NO_SIDE_EFFECTS__
|
|
14024
14100
|
function usePointerLock(target, options = {}) {
|
|
14025
14101
|
const { document: document2 = defaultDocument } = options;
|
|
14026
|
-
const isSupported = useSupported(() => document2 && "pointerLockElement" in document2);
|
|
14102
|
+
const isSupported = /* @__PURE__ */ useSupported(() => document2 && "pointerLockElement" in document2);
|
|
14027
14103
|
const element = vue.shallowRef();
|
|
14028
14104
|
const triggerElement = vue.shallowRef();
|
|
14029
14105
|
let targetElement;
|
|
@@ -14167,6 +14243,7 @@
|
|
|
14167
14243
|
stop
|
|
14168
14244
|
};
|
|
14169
14245
|
}
|
|
14246
|
+
// @__NO_SIDE_EFFECTS__
|
|
14170
14247
|
function usePreferredColorScheme(options) {
|
|
14171
14248
|
const isLight = useMediaQuery("(prefers-color-scheme: light)", options);
|
|
14172
14249
|
const isDark = useMediaQuery("(prefers-color-scheme: dark)", options);
|
|
@@ -14178,6 +14255,7 @@
|
|
|
14178
14255
|
return "no-preference";
|
|
14179
14256
|
});
|
|
14180
14257
|
}
|
|
14258
|
+
// @__NO_SIDE_EFFECTS__
|
|
14181
14259
|
function usePreferredContrast(options) {
|
|
14182
14260
|
const isMore = useMediaQuery("(prefers-contrast: more)", options);
|
|
14183
14261
|
const isLess = useMediaQuery("(prefers-contrast: less)", options);
|
|
@@ -14192,17 +14270,19 @@
|
|
|
14192
14270
|
return "no-preference";
|
|
14193
14271
|
});
|
|
14194
14272
|
}
|
|
14273
|
+
// @__NO_SIDE_EFFECTS__
|
|
14195
14274
|
function usePreferredLanguages(options = {}) {
|
|
14196
14275
|
const { window: window2 = defaultWindow } = options;
|
|
14197
14276
|
if (!window2)
|
|
14198
|
-
return vue.
|
|
14277
|
+
return vue.shallowRef(["en"]);
|
|
14199
14278
|
const navigator2 = window2.navigator;
|
|
14200
|
-
const value = vue.
|
|
14279
|
+
const value = vue.shallowRef(navigator2.languages);
|
|
14201
14280
|
useEventListener(window2, "languagechange", () => {
|
|
14202
14281
|
value.value = navigator2.languages;
|
|
14203
14282
|
}, { passive: true });
|
|
14204
14283
|
return value;
|
|
14205
14284
|
}
|
|
14285
|
+
// @__NO_SIDE_EFFECTS__
|
|
14206
14286
|
function usePreferredReducedMotion(options) {
|
|
14207
14287
|
const isReduced = useMediaQuery("(prefers-reduced-motion: reduce)", options);
|
|
14208
14288
|
return vue.computed(() => {
|
|
@@ -14211,6 +14291,7 @@
|
|
|
14211
14291
|
return "no-preference";
|
|
14212
14292
|
});
|
|
14213
14293
|
}
|
|
14294
|
+
// @__NO_SIDE_EFFECTS__
|
|
14214
14295
|
function usePreferredReducedTransparency(options) {
|
|
14215
14296
|
const isReduced = useMediaQuery("(prefers-reduced-transparency: reduce)", options);
|
|
14216
14297
|
return vue.computed(() => {
|
|
@@ -14249,7 +14330,7 @@
|
|
|
14249
14330
|
bottomCssVar.value = "env(safe-area-inset-bottom, 0px)";
|
|
14250
14331
|
leftCssVar.value = "env(safe-area-inset-left, 0px)";
|
|
14251
14332
|
tryOnMounted(update2);
|
|
14252
|
-
useEventListener("resize", useDebounceFn(update2), { passive: true });
|
|
14333
|
+
useEventListener("resize", /* @__PURE__ */ useDebounceFn(update2), { passive: true });
|
|
14253
14334
|
}
|
|
14254
14335
|
function update2() {
|
|
14255
14336
|
top.value = getValue(topVarName);
|
|
@@ -14439,10 +14520,11 @@
|
|
|
14439
14520
|
const { window: window2 = defaultWindow } = options;
|
|
14440
14521
|
return useStorage(key, initialValue, window2 == null ? void 0 : window2.sessionStorage, options);
|
|
14441
14522
|
}
|
|
14523
|
+
// @__NO_SIDE_EFFECTS__
|
|
14442
14524
|
function useShare(shareOptions = {}, options = {}) {
|
|
14443
14525
|
const { navigator: navigator2 = defaultNavigator } = options;
|
|
14444
14526
|
const _navigator = navigator2;
|
|
14445
|
-
const isSupported = useSupported(() => _navigator && "canShare" in _navigator);
|
|
14527
|
+
const isSupported = /* @__PURE__ */ useSupported(() => _navigator && "canShare" in _navigator);
|
|
14446
14528
|
const share = async (overrideOptions = {}) => {
|
|
14447
14529
|
if (isSupported.value) {
|
|
14448
14530
|
const data = {
|
|
@@ -14521,7 +14603,7 @@
|
|
|
14521
14603
|
}
|
|
14522
14604
|
};
|
|
14523
14605
|
const SpeechRecognition = window2 && (window2.SpeechRecognition || window2.webkitSpeechRecognition);
|
|
14524
|
-
const isSupported = useSupported(() => SpeechRecognition);
|
|
14606
|
+
const isSupported = /* @__PURE__ */ useSupported(() => SpeechRecognition);
|
|
14525
14607
|
if (isSupported.value) {
|
|
14526
14608
|
recognition = new SpeechRecognition();
|
|
14527
14609
|
recognition.continuous = continuous;
|
|
@@ -14579,10 +14661,11 @@
|
|
|
14579
14661
|
pitch = 1,
|
|
14580
14662
|
rate = 1,
|
|
14581
14663
|
volume = 1,
|
|
14582
|
-
window: window2 = defaultWindow
|
|
14664
|
+
window: window2 = defaultWindow,
|
|
14665
|
+
onBoundary
|
|
14583
14666
|
} = options;
|
|
14584
14667
|
const synth = window2 && window2.speechSynthesis;
|
|
14585
|
-
const isSupported = useSupported(() => synth);
|
|
14668
|
+
const isSupported = /* @__PURE__ */ useSupported(() => synth);
|
|
14586
14669
|
const isPlaying = vue.shallowRef(false);
|
|
14587
14670
|
const status = vue.shallowRef("init");
|
|
14588
14671
|
const spokenText = toRef(text || "");
|
|
@@ -14616,6 +14699,9 @@
|
|
|
14616
14699
|
utterance2.onerror = (event) => {
|
|
14617
14700
|
error.value = event;
|
|
14618
14701
|
};
|
|
14702
|
+
utterance2.onboundary = (event) => {
|
|
14703
|
+
onBoundary == null ? void 0 : onBoundary(event);
|
|
14704
|
+
};
|
|
14619
14705
|
};
|
|
14620
14706
|
const utterance = vue.computed(() => {
|
|
14621
14707
|
isPlaying.value = false;
|
|
@@ -14665,6 +14751,7 @@
|
|
|
14665
14751
|
speak
|
|
14666
14752
|
};
|
|
14667
14753
|
}
|
|
14754
|
+
// @__NO_SIDE_EFFECTS__
|
|
14668
14755
|
function useStepper(steps, initialStep) {
|
|
14669
14756
|
const stepsRef = vue.ref(steps);
|
|
14670
14757
|
const stepNames = vue.computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));
|
|
@@ -14752,7 +14839,8 @@
|
|
|
14752
14839
|
eventFilter,
|
|
14753
14840
|
onError = (e) => {
|
|
14754
14841
|
console.error(e);
|
|
14755
|
-
}
|
|
14842
|
+
},
|
|
14843
|
+
onReady
|
|
14756
14844
|
} = options;
|
|
14757
14845
|
const rawInit = vue.toValue(initialValue);
|
|
14758
14846
|
const type = guessSerializerType(rawInit);
|
|
@@ -14791,7 +14879,12 @@
|
|
|
14791
14879
|
onError(e);
|
|
14792
14880
|
}
|
|
14793
14881
|
}
|
|
14794
|
-
|
|
14882
|
+
const promise = new Promise((resolve) => {
|
|
14883
|
+
read().then(() => {
|
|
14884
|
+
onReady == null ? void 0 : onReady(data.value);
|
|
14885
|
+
resolve(data);
|
|
14886
|
+
});
|
|
14887
|
+
});
|
|
14795
14888
|
if (window2 && listenToStorageChanges)
|
|
14796
14889
|
useEventListener(window2, "storage", (e) => Promise.resolve().then(() => read(e)), { passive: true });
|
|
14797
14890
|
if (storage) {
|
|
@@ -14814,6 +14907,10 @@
|
|
|
14814
14907
|
}
|
|
14815
14908
|
);
|
|
14816
14909
|
}
|
|
14910
|
+
Object.assign(data, {
|
|
14911
|
+
then: promise.then.bind(promise),
|
|
14912
|
+
catch: promise.catch.bind(promise)
|
|
14913
|
+
});
|
|
14817
14914
|
return data;
|
|
14818
14915
|
}
|
|
14819
14916
|
let _id = 0;
|
|
@@ -14945,6 +15042,7 @@
|
|
|
14945
15042
|
isPassiveEventSupported: true
|
|
14946
15043
|
};
|
|
14947
15044
|
}
|
|
15045
|
+
// @__NO_SIDE_EFFECTS__
|
|
14948
15046
|
function useTemplateRefsList() {
|
|
14949
15047
|
const refs = vue.ref([]);
|
|
14950
15048
|
refs.value.set = (el) => {
|
|
@@ -14956,6 +15054,7 @@
|
|
|
14956
15054
|
});
|
|
14957
15055
|
return refs;
|
|
14958
15056
|
}
|
|
15057
|
+
// @__NO_SIDE_EFFECTS__
|
|
14959
15058
|
function useTextDirection(options = {}) {
|
|
14960
15059
|
const {
|
|
14961
15060
|
document: document2 = defaultDocument,
|
|
@@ -14997,6 +15096,7 @@
|
|
|
14997
15096
|
const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;
|
|
14998
15097
|
return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));
|
|
14999
15098
|
}
|
|
15099
|
+
// @__NO_SIDE_EFFECTS__
|
|
15000
15100
|
function useTextSelection(options = {}) {
|
|
15001
15101
|
const {
|
|
15002
15102
|
window: window2 = defaultWindow
|
|
@@ -15105,12 +15205,13 @@
|
|
|
15105
15205
|
function DEFAULT_FORMATTER(date2) {
|
|
15106
15206
|
return date2.toISOString().slice(0, 10);
|
|
15107
15207
|
}
|
|
15208
|
+
// @__NO_SIDE_EFFECTS__
|
|
15108
15209
|
function useTimeAgo(time, options = {}) {
|
|
15109
15210
|
const {
|
|
15110
15211
|
controls: exposeControls = false,
|
|
15111
15212
|
updateInterval = 3e4
|
|
15112
15213
|
} = options;
|
|
15113
|
-
const { now: now2, ...controls } = useNow({ interval: updateInterval, controls: true });
|
|
15214
|
+
const { now: now2, ...controls } = /* @__PURE__ */ useNow({ interval: updateInterval, controls: true });
|
|
15114
15215
|
const timeAgo = vue.computed(() => formatTimeAgo(new Date(vue.toValue(time)), options, vue.toValue(now2)));
|
|
15115
15216
|
if (exposeControls) {
|
|
15116
15217
|
return {
|
|
@@ -15167,6 +15268,74 @@
|
|
|
15167
15268
|
}
|
|
15168
15269
|
return messages.invalid;
|
|
15169
15270
|
}
|
|
15271
|
+
const UNITS = [
|
|
15272
|
+
{ name: "year", ms: 31536e6 },
|
|
15273
|
+
{ name: "month", ms: 2592e6 },
|
|
15274
|
+
{ name: "week", ms: 6048e5 },
|
|
15275
|
+
{ name: "day", ms: 864e5 },
|
|
15276
|
+
{ name: "hour", ms: 36e5 },
|
|
15277
|
+
{ name: "minute", ms: 6e4 },
|
|
15278
|
+
{ name: "second", ms: 1e3 }
|
|
15279
|
+
];
|
|
15280
|
+
function useTimeAgoIntl(time, options = {}) {
|
|
15281
|
+
const {
|
|
15282
|
+
controls: exposeControls = false,
|
|
15283
|
+
updateInterval = 3e4
|
|
15284
|
+
} = options;
|
|
15285
|
+
const { now: now2, ...controls } = /* @__PURE__ */ useNow({ interval: updateInterval, controls: true });
|
|
15286
|
+
const result2 = vue.computed(
|
|
15287
|
+
() => getTimeAgoIntlResult(new Date(vue.toValue(time)), options, vue.toValue(now2))
|
|
15288
|
+
);
|
|
15289
|
+
const parts = vue.computed(() => result2.value.parts);
|
|
15290
|
+
const timeAgoIntl = vue.computed(
|
|
15291
|
+
() => formatTimeAgoIntlParts(parts.value, {
|
|
15292
|
+
...options,
|
|
15293
|
+
locale: result2.value.resolvedLocale
|
|
15294
|
+
})
|
|
15295
|
+
);
|
|
15296
|
+
return exposeControls ? { timeAgoIntl, parts, ...controls } : timeAgoIntl;
|
|
15297
|
+
}
|
|
15298
|
+
function formatTimeAgoIntl(from, options = {}, now2 = Date.now()) {
|
|
15299
|
+
const { parts, resolvedLocale } = getTimeAgoIntlResult(from, options, now2);
|
|
15300
|
+
return formatTimeAgoIntlParts(parts, {
|
|
15301
|
+
...options,
|
|
15302
|
+
locale: resolvedLocale
|
|
15303
|
+
});
|
|
15304
|
+
}
|
|
15305
|
+
function getTimeAgoIntlResult(from, options = {}, now2 = Date.now()) {
|
|
15306
|
+
const {
|
|
15307
|
+
locale,
|
|
15308
|
+
relativeTimeFormatOptions = { numeric: "auto" }
|
|
15309
|
+
} = options;
|
|
15310
|
+
const rtf = new Intl.RelativeTimeFormat(locale, relativeTimeFormatOptions);
|
|
15311
|
+
const { locale: resolvedLocale } = rtf.resolvedOptions();
|
|
15312
|
+
const diff = +from - +now2;
|
|
15313
|
+
const absDiff = Math.abs(diff);
|
|
15314
|
+
for (const { name, ms } of UNITS) {
|
|
15315
|
+
if (absDiff >= ms) {
|
|
15316
|
+
return {
|
|
15317
|
+
resolvedLocale,
|
|
15318
|
+
parts: rtf.formatToParts(Math.round(diff / ms), name)
|
|
15319
|
+
};
|
|
15320
|
+
}
|
|
15321
|
+
}
|
|
15322
|
+
return {
|
|
15323
|
+
resolvedLocale,
|
|
15324
|
+
parts: rtf.formatToParts(0, "second")
|
|
15325
|
+
};
|
|
15326
|
+
}
|
|
15327
|
+
function formatTimeAgoIntlParts(parts, options = {}) {
|
|
15328
|
+
const {
|
|
15329
|
+
insertSpace = true,
|
|
15330
|
+
joinParts,
|
|
15331
|
+
locale
|
|
15332
|
+
} = options;
|
|
15333
|
+
if (typeof joinParts === "function")
|
|
15334
|
+
return joinParts(parts, locale);
|
|
15335
|
+
if (!insertSpace)
|
|
15336
|
+
return parts.map((part) => part.value).join("");
|
|
15337
|
+
return parts.map((part) => part.value.trim()).join(" ");
|
|
15338
|
+
}
|
|
15170
15339
|
function useTimeoutPoll(fn, interval, options = {}) {
|
|
15171
15340
|
const {
|
|
15172
15341
|
immediate = true,
|
|
@@ -15320,6 +15489,9 @@
|
|
|
15320
15489
|
}
|
|
15321
15490
|
function executeTransition(source, from, to, options = {}) {
|
|
15322
15491
|
var _a, _b;
|
|
15492
|
+
const {
|
|
15493
|
+
window: window2 = defaultWindow
|
|
15494
|
+
} = options;
|
|
15323
15495
|
const fromVal = vue.toValue(from);
|
|
15324
15496
|
const toVal = vue.toValue(to);
|
|
15325
15497
|
const v1 = toVec(fromVal);
|
|
@@ -15348,7 +15520,7 @@
|
|
|
15348
15520
|
else if (typeof source.value === "number")
|
|
15349
15521
|
source.value = arr[0];
|
|
15350
15522
|
if (now2 < endAt) {
|
|
15351
|
-
requestAnimationFrame(tick);
|
|
15523
|
+
window2 == null ? void 0 : window2.requestAnimationFrame(tick);
|
|
15352
15524
|
} else {
|
|
15353
15525
|
source.value = toVal;
|
|
15354
15526
|
resolve();
|
|
@@ -15462,7 +15634,7 @@
|
|
|
15462
15634
|
},
|
|
15463
15635
|
{ deep: true }
|
|
15464
15636
|
);
|
|
15465
|
-
function write(params, shouldUpdate) {
|
|
15637
|
+
function write(params, shouldUpdate, shouldWriteHistory = true) {
|
|
15466
15638
|
pause();
|
|
15467
15639
|
if (shouldUpdate)
|
|
15468
15640
|
updateState(params);
|
|
@@ -15473,18 +15645,20 @@
|
|
|
15473
15645
|
window2.location.pathname + constructQuery(params)
|
|
15474
15646
|
);
|
|
15475
15647
|
} else {
|
|
15476
|
-
|
|
15477
|
-
window2.history.
|
|
15478
|
-
|
|
15479
|
-
|
|
15480
|
-
|
|
15648
|
+
if (shouldWriteHistory) {
|
|
15649
|
+
window2.history.pushState(
|
|
15650
|
+
window2.history.state,
|
|
15651
|
+
window2.document.title,
|
|
15652
|
+
window2.location.pathname + constructQuery(params)
|
|
15653
|
+
);
|
|
15654
|
+
}
|
|
15481
15655
|
}
|
|
15482
|
-
resume();
|
|
15656
|
+
vue.nextTick(() => resume());
|
|
15483
15657
|
}
|
|
15484
15658
|
function onChanged() {
|
|
15485
15659
|
if (!enableWrite)
|
|
15486
15660
|
return;
|
|
15487
|
-
write(read(), true);
|
|
15661
|
+
write(read(), true, false);
|
|
15488
15662
|
}
|
|
15489
15663
|
const listenerOptions = { passive: true };
|
|
15490
15664
|
useEventListener(window2, "popstate", onChanged, listenerOptions);
|
|
@@ -15503,7 +15677,7 @@
|
|
|
15503
15677
|
const autoSwitch = vue.shallowRef((_b = options.autoSwitch) != null ? _b : true);
|
|
15504
15678
|
const constraints = vue.ref(options.constraints);
|
|
15505
15679
|
const { navigator: navigator2 = defaultNavigator } = options;
|
|
15506
|
-
const isSupported = useSupported(() => {
|
|
15680
|
+
const isSupported = /* @__PURE__ */ useSupported(() => {
|
|
15507
15681
|
var _a2;
|
|
15508
15682
|
return (_a2 = navigator2 == null ? void 0 : navigator2.mediaDevices) == null ? void 0 : _a2.getUserMedia;
|
|
15509
15683
|
});
|
|
@@ -15581,6 +15755,7 @@
|
|
|
15581
15755
|
autoSwitch
|
|
15582
15756
|
};
|
|
15583
15757
|
}
|
|
15758
|
+
// @__NO_SIDE_EFFECTS__
|
|
15584
15759
|
function useVModel(props, key, emit, options = {}) {
|
|
15585
15760
|
var _a, _b, _c;
|
|
15586
15761
|
const {
|
|
@@ -15642,10 +15817,11 @@
|
|
|
15642
15817
|
});
|
|
15643
15818
|
}
|
|
15644
15819
|
}
|
|
15820
|
+
// @__NO_SIDE_EFFECTS__
|
|
15645
15821
|
function useVModels(props, emit, options = {}) {
|
|
15646
15822
|
const ret = {};
|
|
15647
15823
|
for (const key in props) {
|
|
15648
|
-
ret[key] = useVModel(
|
|
15824
|
+
ret[key] = /* @__PURE__ */ useVModel(
|
|
15649
15825
|
props,
|
|
15650
15826
|
key,
|
|
15651
15827
|
emit,
|
|
@@ -15654,13 +15830,14 @@
|
|
|
15654
15830
|
}
|
|
15655
15831
|
return ret;
|
|
15656
15832
|
}
|
|
15833
|
+
// @__NO_SIDE_EFFECTS__
|
|
15657
15834
|
function useVibrate(options) {
|
|
15658
15835
|
const {
|
|
15659
15836
|
pattern = [],
|
|
15660
15837
|
interval = 0,
|
|
15661
15838
|
navigator: navigator2 = defaultNavigator
|
|
15662
15839
|
} = options || {};
|
|
15663
|
-
const isSupported = useSupported(() => typeof navigator2 !== "undefined" && "vibrate" in navigator2);
|
|
15840
|
+
const isSupported = /* @__PURE__ */ useSupported(() => typeof navigator2 !== "undefined" && "vibrate" in navigator2);
|
|
15664
15841
|
const patternRef = toRef(pattern);
|
|
15665
15842
|
let intervalControls;
|
|
15666
15843
|
const vibrate = (pattern2 = patternRef.value) => {
|
|
@@ -15777,7 +15954,7 @@
|
|
|
15777
15954
|
};
|
|
15778
15955
|
}
|
|
15779
15956
|
function useWatchForSizes(size2, list, containerRef, calculateRange) {
|
|
15780
|
-
vue.watch([size2.width, size2.height, list, containerRef], () => {
|
|
15957
|
+
vue.watch([size2.width, size2.height, () => vue.toValue(list), containerRef], () => {
|
|
15781
15958
|
calculateRange();
|
|
15782
15959
|
});
|
|
15783
15960
|
}
|
|
@@ -15863,6 +16040,7 @@
|
|
|
15863
16040
|
containerRef
|
|
15864
16041
|
};
|
|
15865
16042
|
}
|
|
16043
|
+
// @__NO_SIDE_EFFECTS__
|
|
15866
16044
|
function useWakeLock(options = {}) {
|
|
15867
16045
|
const {
|
|
15868
16046
|
navigator: navigator2 = defaultNavigator,
|
|
@@ -15870,8 +16048,8 @@
|
|
|
15870
16048
|
} = options;
|
|
15871
16049
|
const requestedType = vue.shallowRef(false);
|
|
15872
16050
|
const sentinel = vue.shallowRef(null);
|
|
15873
|
-
const documentVisibility = useDocumentVisibility({ document: document2 });
|
|
15874
|
-
const isSupported = useSupported(() => navigator2 && "wakeLock" in navigator2);
|
|
16051
|
+
const documentVisibility = /* @__PURE__ */ useDocumentVisibility({ document: document2 });
|
|
16052
|
+
const isSupported = /* @__PURE__ */ useSupported(() => navigator2 && "wakeLock" in navigator2);
|
|
15875
16053
|
const isActive = vue.computed(() => !!sentinel.value && documentVisibility.value === "visible");
|
|
15876
16054
|
if (isSupported.value) {
|
|
15877
16055
|
useEventListener(sentinel, "release", () => {
|
|
@@ -15918,7 +16096,7 @@
|
|
|
15918
16096
|
requestPermissions: _requestForPermissions = true
|
|
15919
16097
|
} = options;
|
|
15920
16098
|
const defaultWebNotificationOptions = options;
|
|
15921
|
-
const isSupported = useSupported(() => {
|
|
16099
|
+
const isSupported = /* @__PURE__ */ useSupported(() => {
|
|
15922
16100
|
if (!window2 || !("Notification" in window2))
|
|
15923
16101
|
return false;
|
|
15924
16102
|
if (Notification.permission === "granted")
|
|
@@ -15946,10 +16124,10 @@
|
|
|
15946
16124
|
}
|
|
15947
16125
|
return permissionGranted.value;
|
|
15948
16126
|
};
|
|
15949
|
-
const { on: onClick, trigger: clickTrigger } = createEventHook();
|
|
15950
|
-
const { on: onShow, trigger: showTrigger } = createEventHook();
|
|
15951
|
-
const { on: onError, trigger: errorTrigger } = createEventHook();
|
|
15952
|
-
const { on: onClose, trigger: closeTrigger } = createEventHook();
|
|
16127
|
+
const { on: onClick, trigger: clickTrigger } = /* @__PURE__ */ createEventHook();
|
|
16128
|
+
const { on: onShow, trigger: showTrigger } = /* @__PURE__ */ createEventHook();
|
|
16129
|
+
const { on: onError, trigger: errorTrigger } = /* @__PURE__ */ createEventHook();
|
|
16130
|
+
const { on: onClose, trigger: closeTrigger } = /* @__PURE__ */ createEventHook();
|
|
15953
16131
|
const show = async (overrides) => {
|
|
15954
16132
|
if (!isSupported.value || !permissionGranted.value)
|
|
15955
16133
|
return;
|
|
@@ -16307,6 +16485,7 @@
|
|
|
16307
16485
|
workerTerminate
|
|
16308
16486
|
};
|
|
16309
16487
|
}
|
|
16488
|
+
// @__NO_SIDE_EFFECTS__
|
|
16310
16489
|
function useWindowFocus(options = {}) {
|
|
16311
16490
|
const { window: window2 = defaultWindow } = options;
|
|
16312
16491
|
if (!window2)
|
|
@@ -16325,6 +16504,7 @@
|
|
|
16325
16504
|
const { window: window2 = defaultWindow, ...rest2 } = options;
|
|
16326
16505
|
return useScroll(window2, rest2);
|
|
16327
16506
|
}
|
|
16507
|
+
// @__NO_SIDE_EFFECTS__
|
|
16328
16508
|
function useWindowSize(options = {}) {
|
|
16329
16509
|
const {
|
|
16330
16510
|
window: window2 = defaultWindow,
|
|
@@ -16393,8 +16573,8 @@
|
|
|
16393
16573
|
}
|
|
16394
16574
|
});
|
|
16395
16575
|
const handleClick = (event, data) => {
|
|
16396
|
-
if (data
|
|
16397
|
-
|
|
16576
|
+
if (data?.disabled) return;
|
|
16577
|
+
data?.click && data.click(event, data);
|
|
16398
16578
|
emit("click", event, data);
|
|
16399
16579
|
};
|
|
16400
16580
|
const open = (axis = {
|
|
@@ -16423,13 +16603,13 @@
|
|
|
16423
16603
|
}, [vue.createVNode("ul", {
|
|
16424
16604
|
"class": "el-dropdown-menu"
|
|
16425
16605
|
}, [props.data.filter((f) => !f.hide).map((item) => vue.createVNode("li", {
|
|
16426
|
-
"class": ["el-dropdown-menu__item",
|
|
16606
|
+
"class": ["el-dropdown-menu__item", item?.disabled === true ? "is-disabled" : ""],
|
|
16427
16607
|
"tabIndex": "-1",
|
|
16428
16608
|
"onClick": (event) => {
|
|
16429
16609
|
handleClick(event, item);
|
|
16430
16610
|
}
|
|
16431
|
-
}, [
|
|
16432
|
-
"name": item
|
|
16611
|
+
}, [item?.icon ? vue.createVNode(FaIcon, {
|
|
16612
|
+
"name": item?.icon
|
|
16433
16613
|
}, null) : null, vue.createVNode("span", null, [item.label])]))])]), [[vue.vShow, state.visible]])]
|
|
16434
16614
|
}));
|
|
16435
16615
|
return utils.useExpose(expose, {
|
|
@@ -16633,9 +16813,9 @@
|
|
|
16633
16813
|
const elDialogProps = utils.useProps(props, ElementPlus.dialogProps, ["modelValue", "fullscreen", "showClose", "beforeClose"]);
|
|
16634
16814
|
utils.useRender(() => vue.createVNode(ElementPlus.ElDialog, vue.mergeProps(elDialogProps.value, {
|
|
16635
16815
|
"ref": dialogRef,
|
|
16636
|
-
"class": ["fa-dialog", `fa-
|
|
16637
|
-
"fa-
|
|
16638
|
-
"fa-
|
|
16816
|
+
"class": ["fa-dialog", `fa-dialog-${_globalSize.value}`, {
|
|
16817
|
+
"fa-dialog__fill-height": props.fillHeight,
|
|
16818
|
+
"fa-dialog__fullscreen": state.fullscreen
|
|
16639
16819
|
}],
|
|
16640
16820
|
"modelValue": state.visible,
|
|
16641
16821
|
"onUpdate:modelValue": ($event) => state.visible = $event,
|
|
@@ -16648,25 +16828,25 @@
|
|
|
16648
16828
|
"onCloseAutoFocus": () => emit("closeAutoFocus")
|
|
16649
16829
|
}), {
|
|
16650
16830
|
header: () => vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
|
|
16651
|
-
"class": "fa-
|
|
16831
|
+
"class": "fa-dialog__header-title"
|
|
16652
16832
|
}, [props.title, slots.header && slots.header({
|
|
16653
16833
|
loading: state.loading,
|
|
16654
16834
|
close: handleCloseClick
|
|
16655
16835
|
})]), props.showRefresh && vue.createVNode("div", {
|
|
16656
16836
|
"title": "刷新",
|
|
16657
|
-
"class": ["fa-
|
|
16837
|
+
"class": ["fa-dialog__header-icon", state.loading ? "fa__click__disabled fa__click__disabled__cursor " : "fa__hover__twinkle"],
|
|
16658
16838
|
"onClick": handleRefresh
|
|
16659
16839
|
}, [vue.createVNode(ElementPlus.ElIcon, null, {
|
|
16660
16840
|
default: () => [vue.createVNode(ElementPlusIconsVue.Refresh, null, null)]
|
|
16661
16841
|
})]), props.showFullscreen && vue.createVNode("div", {
|
|
16662
16842
|
"title": state.fullscreen ? "关闭全屏显示" : "全屏显示",
|
|
16663
|
-
"class": ["fa-
|
|
16843
|
+
"class": ["fa-dialog__header-icon", state.loading ? "fa__click__disabled fa__click__disabled__cursor " : "fa__hover__twinkle"],
|
|
16664
16844
|
"onClick": handleFullscreen
|
|
16665
16845
|
}, [vue.createVNode(ElementPlus.ElIcon, null, {
|
|
16666
16846
|
default: () => [state.fullscreen ? vue.createVNode(FastElementPlusIconsVue.FullScreenExit, null, null) : vue.createVNode(ElementPlusIconsVue.FullScreen, null, null)]
|
|
16667
16847
|
})]), props.showClose && vue.createVNode("div", {
|
|
16668
16848
|
"title": "关闭",
|
|
16669
|
-
"class": ["fa-
|
|
16849
|
+
"class": ["fa-dialog__header-icon", state.loading ? "fa__click__disabled fa__click__disabled__cursor " : "fa__hover__twinkle"],
|
|
16670
16850
|
"onClick": handleCloseClick
|
|
16671
16851
|
}, [vue.createVNode(ElementPlus.ElIcon, null, {
|
|
16672
16852
|
default: () => [vue.createVNode(ElementPlusIconsVue.Close, null, null)]
|
|
@@ -16698,15 +16878,9 @@
|
|
|
16698
16878
|
}));
|
|
16699
16879
|
return utils.useExpose(expose, {
|
|
16700
16880
|
/** @description 弹窗内容引用 */
|
|
16701
|
-
dialogContentRef: vue.computed(() =>
|
|
16702
|
-
var _a;
|
|
16703
|
-
return (_a = dialogRef.value) == null ? void 0 : _a.dialogContentRef;
|
|
16704
|
-
}),
|
|
16881
|
+
dialogContentRef: vue.computed(() => dialogRef.value?.dialogContentRef),
|
|
16705
16882
|
/** @description 重置位置 */
|
|
16706
|
-
resetPosition: vue.computed(() =>
|
|
16707
|
-
var _a;
|
|
16708
|
-
return (_a = dialogRef.value) == null ? void 0 : _a.resetPosition;
|
|
16709
|
-
}),
|
|
16883
|
+
resetPosition: vue.computed(() => dialogRef.value?.resetPosition),
|
|
16710
16884
|
/** @description 加载状态 */
|
|
16711
16885
|
loading: vue.computed(() => state.loading),
|
|
16712
16886
|
/** @description 是否显示 */
|
|
@@ -16975,20 +17149,11 @@
|
|
|
16975
17149
|
}));
|
|
16976
17150
|
return utils.useExpose(expose, {
|
|
16977
17151
|
/** @description 用于关闭 Drawer, 该方法会调用传入的 before-close 方法 */
|
|
16978
|
-
handleClose: vue.computed(() =>
|
|
16979
|
-
var _a;
|
|
16980
|
-
return (_a = drawerRef.value) == null ? void 0 : _a.handleClose;
|
|
16981
|
-
}),
|
|
17152
|
+
handleClose: vue.computed(() => drawerRef.value?.handleClose),
|
|
16982
17153
|
/** @description 进入动画后的回调 */
|
|
16983
|
-
afterEnter: vue.computed(() =>
|
|
16984
|
-
var _a;
|
|
16985
|
-
return (_a = drawerRef.value) == null ? void 0 : _a.afterEnter;
|
|
16986
|
-
}),
|
|
17154
|
+
afterEnter: vue.computed(() => drawerRef.value?.afterEnter),
|
|
16987
17155
|
/** @description 离开动画后的回调 */
|
|
16988
|
-
afterLeave: vue.computed(() =>
|
|
16989
|
-
var _a;
|
|
16990
|
-
return (_a = drawerRef.value) == null ? void 0 : _a.afterLeave;
|
|
16991
|
-
}),
|
|
17156
|
+
afterLeave: vue.computed(() => drawerRef.value?.afterLeave),
|
|
16992
17157
|
/** @description 加载状态 */
|
|
16993
17158
|
loading: vue.computed(() => state.loading),
|
|
16994
17159
|
/** @description 是否显示 */
|
|
@@ -17118,10 +17283,10 @@
|
|
|
17118
17283
|
});
|
|
17119
17284
|
});
|
|
17120
17285
|
vue.onUnmounted(() => {
|
|
17121
|
-
resizeObserver
|
|
17286
|
+
resizeObserver?.disconnect();
|
|
17122
17287
|
});
|
|
17123
17288
|
vue.onDeactivated(() => {
|
|
17124
|
-
resizeObserver
|
|
17289
|
+
resizeObserver?.disconnect();
|
|
17125
17290
|
});
|
|
17126
17291
|
const gap = vue.computed(() => {
|
|
17127
17292
|
if (isNumber(props.gap)) return `${props.gap}px`;
|
|
@@ -17136,25 +17301,22 @@
|
|
|
17136
17301
|
};
|
|
17137
17302
|
});
|
|
17138
17303
|
utils.useRender(() => {
|
|
17139
|
-
|
|
17140
|
-
const defaultSlot = (slots == null ? void 0 : slots.default()) ?? [];
|
|
17304
|
+
const defaultSlot = slots?.default() ?? [];
|
|
17141
17305
|
if (props.collapsed) {
|
|
17142
17306
|
const fields = [];
|
|
17143
17307
|
let suffix = null;
|
|
17144
17308
|
defaultSlot.forEach((slot) => {
|
|
17145
|
-
|
|
17146
|
-
if (typeof slot.type === "
|
|
17147
|
-
if (typeof slot.type === "symbol" && Array.isArray(slot == null ? void 0 : slot.children)) fields.push(...slot.children);
|
|
17309
|
+
if (typeof slot.type === "object" && slot.type.name === "FaLayoutGridItem" && slot.props?.suffix !== void 0) suffix = slot;
|
|
17310
|
+
if (typeof slot.type === "symbol" && Array.isArray(slot?.children)) fields.push(...slot.children);
|
|
17148
17311
|
});
|
|
17149
17312
|
let suffixCols = 0;
|
|
17150
17313
|
if (suffix) {
|
|
17151
|
-
suffixCols = (
|
|
17314
|
+
suffixCols = (suffix.props[breakPoint.value]?.span ?? suffix.props?.span ?? 1) + (suffix.props[breakPoint.value]?.offset ?? suffix.props?.offset ?? 0);
|
|
17152
17315
|
}
|
|
17153
17316
|
try {
|
|
17154
17317
|
let find2 = false;
|
|
17155
17318
|
fields.reduce((prev = 0, current, index2) => {
|
|
17156
|
-
|
|
17157
|
-
prev += (((_a2 = current.props[breakPoint.value]) == null ? void 0 : _a2.span) ?? ((_b2 = current.props) == null ? void 0 : _b2.span) ?? 1) + (((_c2 = current.props[breakPoint.value]) == null ? void 0 : _c2.offset) ?? ((_d2 = current.props) == null ? void 0 : _d2.offset) ?? 0);
|
|
17319
|
+
prev += (current.props[breakPoint.value]?.span ?? current.props?.span ?? 1) + (current.props[breakPoint.value]?.offset ?? current.props?.offset ?? 0);
|
|
17158
17320
|
if (Number(prev) > collapsedRows * Number(cols.value) - suffixCols) {
|
|
17159
17321
|
hiddenIndex.value = index2;
|
|
17160
17322
|
find2 = true;
|
|
@@ -17247,8 +17409,8 @@
|
|
|
17247
17409
|
const cols = vue.inject("cols", vue.ref(5));
|
|
17248
17410
|
const style = vue.computed(() => {
|
|
17249
17411
|
const breakPointObk = props[breakPoint.value];
|
|
17250
|
-
const span =
|
|
17251
|
-
const offset =
|
|
17412
|
+
const span = breakPointObk?.span ?? props.span;
|
|
17413
|
+
const offset = breakPointObk?.offset ?? props.offset;
|
|
17252
17414
|
if (props.suffix) {
|
|
17253
17415
|
return {
|
|
17254
17416
|
gridColumnStart: cols.value - span - offset + 1,
|
|
@@ -17363,9 +17525,9 @@
|
|
|
17363
17525
|
*/
|
|
17364
17526
|
carNumber(rule, value, callback) {
|
|
17365
17527
|
let success = false;
|
|
17366
|
-
if (
|
|
17528
|
+
if (value?.length === 7) {
|
|
17367
17529
|
success = RegExps.CarNumber.test(value);
|
|
17368
|
-
} else if (
|
|
17530
|
+
} else if (value?.length === 8) {
|
|
17369
17531
|
success = RegExps.NewEnergyCarNumber.test(value);
|
|
17370
17532
|
}
|
|
17371
17533
|
if (success) {
|
|
@@ -17568,30 +17730,15 @@
|
|
|
17568
17730
|
/** @description 对整个表单的内容进行验证。 接收一个回调函数,或返回 Promise。 */
|
|
17569
17731
|
validate: () => formUtil.validate(formRef),
|
|
17570
17732
|
/** @description 验证具体的某个字段。 */
|
|
17571
|
-
validateField: vue.computed(() =>
|
|
17572
|
-
var _a;
|
|
17573
|
-
return (_a = formRef.value) == null ? void 0 : _a.validateField;
|
|
17574
|
-
}),
|
|
17733
|
+
validateField: vue.computed(() => formRef.value?.validateField),
|
|
17575
17734
|
/** @description 重置该表单项,将其值重置为初始值,并移除校验结果 */
|
|
17576
|
-
resetFields: vue.computed(() =>
|
|
17577
|
-
var _a;
|
|
17578
|
-
return (_a = formRef.value) == null ? void 0 : _a.resetFields;
|
|
17579
|
-
}),
|
|
17735
|
+
resetFields: vue.computed(() => formRef.value?.resetFields),
|
|
17580
17736
|
/** @description 清理某个字段的表单验证信息。 */
|
|
17581
|
-
clearValidate: vue.computed(() =>
|
|
17582
|
-
var _a;
|
|
17583
|
-
return (_a = formRef.value) == null ? void 0 : _a.clearValidate;
|
|
17584
|
-
}),
|
|
17737
|
+
clearValidate: vue.computed(() => formRef.value?.clearValidate),
|
|
17585
17738
|
/** @description 滚动到指定的字段 */
|
|
17586
|
-
scrollToField: vue.computed(() =>
|
|
17587
|
-
var _a;
|
|
17588
|
-
return (_a = formRef.value) == null ? void 0 : _a.scrollToField;
|
|
17589
|
-
}),
|
|
17739
|
+
scrollToField: vue.computed(() => formRef.value?.scrollToField),
|
|
17590
17740
|
/** @description 获取所有字段的 context */
|
|
17591
|
-
fields: vue.computed(() =>
|
|
17592
|
-
var _a;
|
|
17593
|
-
return (_a = formRef.value) == null ? void 0 : _a.fields;
|
|
17594
|
-
}),
|
|
17741
|
+
fields: vue.computed(() => formRef.value?.fields),
|
|
17595
17742
|
/** @description 对整个表单的内容进行验证,带滚动。 接收一个回调函数,或返回 Promise。 */
|
|
17596
17743
|
validateScrollToField: () => formUtil.validateScrollToField(formRef)
|
|
17597
17744
|
});
|
|
@@ -17719,35 +17866,17 @@
|
|
|
17719
17866
|
}));
|
|
17720
17867
|
return utils.useExpose(expose, {
|
|
17721
17868
|
/** @description 表单项大小 */
|
|
17722
|
-
size: vue.computed(() =>
|
|
17723
|
-
var _a;
|
|
17724
|
-
return (_a = formItemRef.value) == null ? void 0 : _a.size;
|
|
17725
|
-
}),
|
|
17869
|
+
size: vue.computed(() => formItemRef.value?.size),
|
|
17726
17870
|
/** @description 校验消息 */
|
|
17727
|
-
validateMessage: vue.computed(() =>
|
|
17728
|
-
var _a;
|
|
17729
|
-
return (_a = formItemRef.value) == null ? void 0 : _a.validateMessage;
|
|
17730
|
-
}),
|
|
17871
|
+
validateMessage: vue.computed(() => formItemRef.value?.validateMessage),
|
|
17731
17872
|
/** @description 校验状态 */
|
|
17732
|
-
validateState: vue.computed(() =>
|
|
17733
|
-
var _a;
|
|
17734
|
-
return (_a = formItemRef.value) == null ? void 0 : _a.validateState;
|
|
17735
|
-
}),
|
|
17873
|
+
validateState: vue.computed(() => formItemRef.value?.validateState),
|
|
17736
17874
|
/** @description 验证表单项 */
|
|
17737
|
-
validate: vue.computed(() =>
|
|
17738
|
-
var _a;
|
|
17739
|
-
return (_a = formItemRef.value) == null ? void 0 : _a.validate;
|
|
17740
|
-
}),
|
|
17875
|
+
validate: vue.computed(() => formItemRef.value?.validate),
|
|
17741
17876
|
/** @description 移除该表单项的校验结果 */
|
|
17742
|
-
clearValidate: vue.computed(() =>
|
|
17743
|
-
var _a;
|
|
17744
|
-
return (_a = formItemRef.value) == null ? void 0 : _a.clearValidate;
|
|
17745
|
-
}),
|
|
17877
|
+
clearValidate: vue.computed(() => formItemRef.value?.clearValidate),
|
|
17746
17878
|
/** @description 对该表单项进行重置,将其值重置为初始值并移除校验结果 */
|
|
17747
|
-
resetField: vue.computed(() =>
|
|
17748
|
-
var _a;
|
|
17749
|
-
return (_a = formItemRef.value) == null ? void 0 : _a.resetField;
|
|
17750
|
-
})
|
|
17879
|
+
resetField: vue.computed(() => formItemRef.value?.resetField)
|
|
17751
17880
|
});
|
|
17752
17881
|
}
|
|
17753
17882
|
});
|
|
@@ -18350,8 +18479,7 @@
|
|
|
18350
18479
|
emit,
|
|
18351
18480
|
expose
|
|
18352
18481
|
}) {
|
|
18353
|
-
|
|
18354
|
-
const selectedLabel = useVModel(props, "label", emit, {
|
|
18482
|
+
const selectedLabel = /* @__PURE__ */ useVModel(props, "label", emit, {
|
|
18355
18483
|
passive: true
|
|
18356
18484
|
});
|
|
18357
18485
|
const state = vue.reactive({
|
|
@@ -18361,13 +18489,13 @@
|
|
|
18361
18489
|
/** 首次出现 */
|
|
18362
18490
|
debut: true,
|
|
18363
18491
|
/** 回显 */
|
|
18364
|
-
echo:
|
|
18492
|
+
echo: props.data?.length > 0 ? false : true,
|
|
18365
18493
|
/** 下次刷新 */
|
|
18366
18494
|
nextRefresh: false
|
|
18367
18495
|
});
|
|
18368
18496
|
const selectRef = vue.ref();
|
|
18369
18497
|
const handleData = (data) => {
|
|
18370
|
-
return data
|
|
18498
|
+
return data?.map((m) => ({
|
|
18371
18499
|
...m,
|
|
18372
18500
|
value: m[props.valueKey],
|
|
18373
18501
|
label: isFunction(props.props.label) ? props.props.label(m) : m[props.props.label ?? "label"],
|
|
@@ -18398,7 +18526,7 @@
|
|
|
18398
18526
|
const handleChange = (value) => {
|
|
18399
18527
|
if (props.multiple) {
|
|
18400
18528
|
const valueArr = value;
|
|
18401
|
-
if (
|
|
18529
|
+
if (valueArr?.length === 0) {
|
|
18402
18530
|
state.value = null;
|
|
18403
18531
|
selectedLabel.value = null;
|
|
18404
18532
|
emit("update:modelValue", null);
|
|
@@ -18480,13 +18608,12 @@
|
|
|
18480
18608
|
immediate: true
|
|
18481
18609
|
});
|
|
18482
18610
|
vue.onMounted(async () => {
|
|
18483
|
-
var _a2;
|
|
18484
18611
|
if (props.defaultSelected) {
|
|
18485
18612
|
await loadData();
|
|
18486
18613
|
if (state.selectorData.length > 0) {
|
|
18487
18614
|
handleChange(props.multiple ? [state.selectorData[0].value] : state.selectorData[0].value);
|
|
18488
18615
|
}
|
|
18489
|
-
} else if (!props.requestApi &&
|
|
18616
|
+
} else if (!props.requestApi && props.data?.length > 0) {
|
|
18490
18617
|
state.debut = false;
|
|
18491
18618
|
await loadData();
|
|
18492
18619
|
} else if (!props.lazy) {
|
|
@@ -18562,20 +18689,11 @@
|
|
|
18562
18689
|
}));
|
|
18563
18690
|
return utils.useExpose(expose, {
|
|
18564
18691
|
/** @description 使选择器的输入框获取焦点 */
|
|
18565
|
-
focus: vue.computed(() =>
|
|
18566
|
-
var _a2;
|
|
18567
|
-
return (_a2 = selectRef.value) == null ? void 0 : _a2.focus;
|
|
18568
|
-
}),
|
|
18692
|
+
focus: vue.computed(() => selectRef.value?.focus),
|
|
18569
18693
|
/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */
|
|
18570
|
-
blur: vue.computed(() =>
|
|
18571
|
-
var _a2;
|
|
18572
|
-
return (_a2 = selectRef.value) == null ? void 0 : _a2.blur;
|
|
18573
|
-
}),
|
|
18694
|
+
blur: vue.computed(() => selectRef.value?.blur),
|
|
18574
18695
|
/** @description 获取当前选中的标签 */
|
|
18575
|
-
selectedLabel: vue.computed(() =>
|
|
18576
|
-
var _a2;
|
|
18577
|
-
return (_a2 = selectRef.value) == null ? void 0 : _a2.selectedLabel;
|
|
18578
|
-
}),
|
|
18696
|
+
selectedLabel: vue.computed(() => selectRef.value?.selectedLabel),
|
|
18579
18697
|
/** @description 加载状态 */
|
|
18580
18698
|
loading: vue.computed(() => state.loading),
|
|
18581
18699
|
/** @description 刷新 */
|
|
@@ -18680,7 +18798,7 @@
|
|
|
18680
18798
|
emit,
|
|
18681
18799
|
expose
|
|
18682
18800
|
}) {
|
|
18683
|
-
const selectedLabel = useVModel(props, "label", emit, {
|
|
18801
|
+
const selectedLabel = /* @__PURE__ */ useVModel(props, "label", emit, {
|
|
18684
18802
|
passive: true
|
|
18685
18803
|
});
|
|
18686
18804
|
const _globalSize = ElementPlus.useGlobalSize();
|
|
@@ -18704,7 +18822,7 @@
|
|
|
18704
18822
|
});
|
|
18705
18823
|
const selectRef = vue.ref();
|
|
18706
18824
|
const handleData = (data) => {
|
|
18707
|
-
return data
|
|
18825
|
+
return data?.map((m) => ({
|
|
18708
18826
|
...m,
|
|
18709
18827
|
value: m[props.valueKey],
|
|
18710
18828
|
label: isFunction(props.props.label) ? props.props.label(m) : m[props.props.label ?? "label"],
|
|
@@ -18740,7 +18858,7 @@
|
|
|
18740
18858
|
const handleChange = (value) => {
|
|
18741
18859
|
if (props.multiple) {
|
|
18742
18860
|
const valueArr = value;
|
|
18743
|
-
if (
|
|
18861
|
+
if (valueArr?.length === 0) {
|
|
18744
18862
|
state.value = null;
|
|
18745
18863
|
selectedLabel.value = null;
|
|
18746
18864
|
state.selectedList = [];
|
|
@@ -18920,8 +19038,8 @@
|
|
|
18920
19038
|
const selectedData = state.selectedList.find((f) => f.value === value);
|
|
18921
19039
|
if (slots.label) {
|
|
18922
19040
|
return slots.label({
|
|
18923
|
-
label: selectedData
|
|
18924
|
-
value: isNil(selectedData) ? value : selectedData
|
|
19041
|
+
label: selectedData?.label,
|
|
19042
|
+
value: isNil(selectedData) ? value : selectedData?.value
|
|
18925
19043
|
});
|
|
18926
19044
|
}
|
|
18927
19045
|
return selectedData && vue.createVNode("span", {
|
|
@@ -18940,20 +19058,11 @@
|
|
|
18940
19058
|
}));
|
|
18941
19059
|
return utils.useExpose(expose, {
|
|
18942
19060
|
/** @description 使选择器的输入框获取焦点 */
|
|
18943
|
-
focus: vue.computed(() =>
|
|
18944
|
-
var _a;
|
|
18945
|
-
return (_a = selectRef.value) == null ? void 0 : _a.focus;
|
|
18946
|
-
}),
|
|
19061
|
+
focus: vue.computed(() => selectRef.value?.focus),
|
|
18947
19062
|
/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */
|
|
18948
|
-
blur: vue.computed(() =>
|
|
18949
|
-
var _a;
|
|
18950
|
-
return (_a = selectRef.value) == null ? void 0 : _a.blur;
|
|
18951
|
-
}),
|
|
19063
|
+
blur: vue.computed(() => selectRef.value?.blur),
|
|
18952
19064
|
/** @description 获取当前选中的标签 */
|
|
18953
|
-
selectedLabel: vue.computed(() =>
|
|
18954
|
-
var _a;
|
|
18955
|
-
return (_a = selectRef.value) == null ? void 0 : _a.selectedLabel;
|
|
18956
|
-
}),
|
|
19065
|
+
selectedLabel: vue.computed(() => selectRef.value?.selectedLabel),
|
|
18957
19066
|
/** @description 加载状态 */
|
|
18958
19067
|
loading: vue.computed(() => state.loading),
|
|
18959
19068
|
/** @description 选中的数据 */
|
|
@@ -19332,8 +19441,7 @@
|
|
|
19332
19441
|
emit,
|
|
19333
19442
|
expose
|
|
19334
19443
|
}) {
|
|
19335
|
-
|
|
19336
|
-
const selectedLabel = useVModel(props, "label", emit, {
|
|
19444
|
+
const selectedLabel = /* @__PURE__ */ useVModel(props, "label", emit, {
|
|
19337
19445
|
passive: true
|
|
19338
19446
|
});
|
|
19339
19447
|
const _globalSize = ElementPlus.useGlobalSize();
|
|
@@ -19344,7 +19452,7 @@
|
|
|
19344
19452
|
/** 首次出现 */
|
|
19345
19453
|
debut: true,
|
|
19346
19454
|
/** 回显 */
|
|
19347
|
-
echo:
|
|
19455
|
+
echo: props.data?.length > 0 ? false : true,
|
|
19348
19456
|
/** 下次刷新 */
|
|
19349
19457
|
nextRefresh: false
|
|
19350
19458
|
});
|
|
@@ -19375,7 +19483,7 @@
|
|
|
19375
19483
|
const handleChange = (value) => {
|
|
19376
19484
|
if (props.multiple) {
|
|
19377
19485
|
const valueArr = value;
|
|
19378
|
-
if (
|
|
19486
|
+
if (valueArr?.length === 0) {
|
|
19379
19487
|
state.value = null;
|
|
19380
19488
|
selectedLabel.value = null;
|
|
19381
19489
|
emit("update:modelValue", null);
|
|
@@ -19457,13 +19565,12 @@
|
|
|
19457
19565
|
immediate: true
|
|
19458
19566
|
});
|
|
19459
19567
|
vue.onMounted(async () => {
|
|
19460
|
-
var _a2;
|
|
19461
19568
|
if (props.defaultSelected) {
|
|
19462
19569
|
await loadData();
|
|
19463
19570
|
if (state.selectorData.length > 0) {
|
|
19464
19571
|
handleChange(props.multiple ? [state.selectorData[0].value] : state.selectorData[0].value);
|
|
19465
19572
|
}
|
|
19466
|
-
} else if (!props.requestApi &&
|
|
19573
|
+
} else if (!props.requestApi && props.data?.length > 0) {
|
|
19467
19574
|
state.debut = false;
|
|
19468
19575
|
await loadData();
|
|
19469
19576
|
} else if (!props.lazy) {
|
|
@@ -19546,20 +19653,11 @@
|
|
|
19546
19653
|
}));
|
|
19547
19654
|
return utils.useExpose(expose, {
|
|
19548
19655
|
/** @description 使选择器的输入框获取焦点 */
|
|
19549
|
-
focus: vue.computed(() =>
|
|
19550
|
-
var _a2;
|
|
19551
|
-
return (_a2 = selectV2Ref.value) == null ? void 0 : _a2.focus;
|
|
19552
|
-
}),
|
|
19656
|
+
focus: vue.computed(() => selectV2Ref.value?.focus),
|
|
19553
19657
|
/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */
|
|
19554
|
-
blur: vue.computed(() =>
|
|
19555
|
-
var _a2;
|
|
19556
|
-
return (_a2 = selectV2Ref.value) == null ? void 0 : _a2.blur;
|
|
19557
|
-
}),
|
|
19658
|
+
blur: vue.computed(() => selectV2Ref.value?.blur),
|
|
19558
19659
|
/** @description 获取当前选中的标签 */
|
|
19559
|
-
selectedLabel: vue.computed(() =>
|
|
19560
|
-
var _a2;
|
|
19561
|
-
return (_a2 = selectV2Ref.value) == null ? void 0 : _a2.selectedLabel;
|
|
19562
|
-
}),
|
|
19660
|
+
selectedLabel: vue.computed(() => selectV2Ref.value?.selectedLabel),
|
|
19563
19661
|
/** @description 加载状态 */
|
|
19564
19662
|
loading: vue.computed(() => state.loading),
|
|
19565
19663
|
/** @description 刷新 */
|
|
@@ -19620,14 +19718,14 @@
|
|
|
19620
19718
|
* @param {String} type 过滤类型(目前只有 tag)
|
|
19621
19719
|
*/
|
|
19622
19720
|
filterEnum(callValue, enumData, fieldNames, type) {
|
|
19623
|
-
const value =
|
|
19624
|
-
const label =
|
|
19721
|
+
const value = fieldNames?.value ?? "value";
|
|
19722
|
+
const label = fieldNames?.label ?? "label";
|
|
19625
19723
|
let filterData = {};
|
|
19626
19724
|
if (isArray(enumData)) {
|
|
19627
19725
|
filterData = enumData.find((item) => item[value] === callValue);
|
|
19628
19726
|
}
|
|
19629
19727
|
if (type === "tag") {
|
|
19630
|
-
return
|
|
19728
|
+
return filterData?.type ?? "primary";
|
|
19631
19729
|
}
|
|
19632
19730
|
return filterData ? filterData[label] : null;
|
|
19633
19731
|
},
|
|
@@ -19687,22 +19785,18 @@
|
|
|
19687
19785
|
flatColumns(columns, enumMap) {
|
|
19688
19786
|
const flatArr = [];
|
|
19689
19787
|
columns.forEach((col) => {
|
|
19690
|
-
|
|
19691
|
-
if ((_a = col._children) == null ? void 0 : _a.length) {
|
|
19788
|
+
if (col._children?.length) {
|
|
19692
19789
|
flatArr.push(...this.flatColumns(col._children));
|
|
19693
19790
|
}
|
|
19694
19791
|
flatArr.push(col);
|
|
19695
19792
|
col.show = col.show ?? true;
|
|
19696
|
-
let enumKey = col.prop ??
|
|
19793
|
+
let enumKey = col.prop ?? col.search?.key;
|
|
19697
19794
|
if (col.enum && isString(col.enum)) {
|
|
19698
19795
|
enumKey = col.enum;
|
|
19699
19796
|
}
|
|
19700
19797
|
this.setEnumMap(col.enum, enumKey, enumMap);
|
|
19701
19798
|
});
|
|
19702
|
-
return flatArr.filter((item) =>
|
|
19703
|
-
var _a;
|
|
19704
|
-
return !((_a = item._children) == null ? void 0 : _a.length);
|
|
19705
|
-
});
|
|
19799
|
+
return flatArr.filter((item) => !item._children?.length);
|
|
19706
19800
|
}
|
|
19707
19801
|
};
|
|
19708
19802
|
const tableStateKey = Symbol("tableState");
|
|
@@ -19720,15 +19814,14 @@
|
|
|
19720
19814
|
tableColumns: vue.computed(() => state.orgColumns.filter((f) => f.prop && !f.pureSearch)),
|
|
19721
19815
|
searchColumns: vue.computed(
|
|
19722
19816
|
() => state.orgColumns.filter((f) => f.pureSearch || f.search).sort((a, b) => {
|
|
19723
|
-
|
|
19724
|
-
return ((_a = a.search) == null ? void 0 : _a.order) - ((_b = b.search) == null ? void 0 : _b.order);
|
|
19817
|
+
return a.search?.order - b.search?.order;
|
|
19725
19818
|
})
|
|
19726
19819
|
),
|
|
19727
19820
|
spanColumns: vue.computed(() => [
|
|
19728
19821
|
...state.orgColumns.filter((f) => f.spanProp).map((col) => {
|
|
19729
19822
|
return {
|
|
19730
|
-
prop: col
|
|
19731
|
-
spanProp: col
|
|
19823
|
+
prop: col?.prop,
|
|
19824
|
+
spanProp: col?.spanProp
|
|
19732
19825
|
};
|
|
19733
19826
|
}),
|
|
19734
19827
|
...props.props.span ? [
|
|
@@ -19739,8 +19832,7 @@
|
|
|
19739
19832
|
]),
|
|
19740
19833
|
tableData: [],
|
|
19741
19834
|
tableSpanData: vue.computed(() => {
|
|
19742
|
-
|
|
19743
|
-
if (((_a = state.spanColumns) == null ? void 0 : _a.length) > 0 && ((_b = state.tableData) == null ? void 0 : _b.length) > 0) {
|
|
19835
|
+
if (state.spanColumns?.length > 0 && state.tableData?.length > 0) {
|
|
19744
19836
|
const result2 = [];
|
|
19745
19837
|
state.spanColumns.forEach((item) => {
|
|
19746
19838
|
result2[item.prop] = new Array(state.tableData.length).fill(1, 0, 1).fill(0, 1);
|
|
@@ -19802,23 +19894,23 @@
|
|
|
19802
19894
|
state.loadingText = "加载中...";
|
|
19803
19895
|
state.autoColumnWidth = [];
|
|
19804
19896
|
const autoWidthColumns = state.tableColumns.filter((f) => f.autoWidth);
|
|
19805
|
-
if (slots
|
|
19897
|
+
if (slots?.operation) {
|
|
19806
19898
|
autoWidthColumns.push({
|
|
19807
19899
|
prop: "__table-operation"
|
|
19808
19900
|
});
|
|
19809
19901
|
}
|
|
19810
|
-
if (
|
|
19902
|
+
if (autoWidthColumns?.length > 0) {
|
|
19811
19903
|
const otherWidth = _globalSize.value === "default" ? 25 : 17;
|
|
19812
19904
|
vue.nextTick(() => {
|
|
19813
19905
|
const tableDom = document.querySelector(`.fa-table__${props.tableKey}`);
|
|
19814
19906
|
if (tableDom) {
|
|
19815
19907
|
autoWidthColumns.forEach((item) => {
|
|
19816
|
-
const headerColumnDom = tableDom.querySelector(`.__fa-table__auto-width-column__cell-header__${item
|
|
19817
|
-
const cellColumnDoms = tableDom.querySelectorAll(`.__fa-table__auto-width-column__cell__${item
|
|
19908
|
+
const headerColumnDom = tableDom.querySelector(`.__fa-table__auto-width-column__cell-header__${item?.prop}`);
|
|
19909
|
+
const cellColumnDoms = tableDom.querySelectorAll(`.__fa-table__auto-width-column__cell__${item?.prop}`);
|
|
19818
19910
|
let maxWidth = 0;
|
|
19819
19911
|
if (headerColumnDom) {
|
|
19820
19912
|
maxWidth = Math.ceil(headerColumnDom.scrollWidth) + otherWidth;
|
|
19821
|
-
if (item
|
|
19913
|
+
if (item?.sortable) {
|
|
19822
19914
|
maxWidth += 24;
|
|
19823
19915
|
}
|
|
19824
19916
|
}
|
|
@@ -19828,12 +19920,12 @@
|
|
|
19828
19920
|
maxWidth = curWidth;
|
|
19829
19921
|
}
|
|
19830
19922
|
});
|
|
19831
|
-
const findInfo = state.autoColumnWidth.find((f) => f.prop ===
|
|
19923
|
+
const findInfo = state.autoColumnWidth.find((f) => f.prop === item?.prop);
|
|
19832
19924
|
if (findInfo) {
|
|
19833
19925
|
findInfo.width = Math.max(findInfo.width, maxWidth);
|
|
19834
19926
|
} else {
|
|
19835
19927
|
state.autoColumnWidth.push({
|
|
19836
|
-
prop: item
|
|
19928
|
+
prop: item?.prop,
|
|
19837
19929
|
width: maxWidth
|
|
19838
19930
|
});
|
|
19839
19931
|
}
|
|
@@ -19865,7 +19957,6 @@
|
|
|
19865
19957
|
return params;
|
|
19866
19958
|
};
|
|
19867
19959
|
const loadData = async () => {
|
|
19868
|
-
var _a;
|
|
19869
19960
|
state.loading = true;
|
|
19870
19961
|
state.loadingText = "加载中...";
|
|
19871
19962
|
if (props.requestApi) {
|
|
@@ -19904,11 +19995,10 @@
|
|
|
19904
19995
|
_value = _value.filter((f) => {
|
|
19905
19996
|
if (!state.searchParam.searchValue) return true;
|
|
19906
19997
|
return state.tableColumns.some((col) => {
|
|
19907
|
-
|
|
19908
|
-
return (_c = (_a2 = f[col.prop]) == null ? void 0 : _a2.toString()) == null ? void 0 : _c.toLowerCase().includes((_b = state.searchParam.searchValue) == null ? void 0 : _b.toLowerCase());
|
|
19998
|
+
return f[col.prop]?.toString()?.toLowerCase().includes(state.searchParam.searchValue?.toLowerCase());
|
|
19909
19999
|
});
|
|
19910
20000
|
});
|
|
19911
|
-
if (
|
|
20001
|
+
if (state.searchParam.sortList?.length > 0) {
|
|
19912
20002
|
_value = _value.sort(tableUtil.arrayDynamicSort(state.searchParam.sortList));
|
|
19913
20003
|
}
|
|
19914
20004
|
if (props.pagination) {
|
|
@@ -19933,17 +20023,16 @@
|
|
|
19933
20023
|
const loadTableColumns = () => {
|
|
19934
20024
|
let columns = props.columns;
|
|
19935
20025
|
columns.forEach((col) => {
|
|
19936
|
-
var _a, _b;
|
|
19937
20026
|
if (col.pureSearch || col.search) {
|
|
19938
|
-
|
|
19939
|
-
|
|
20027
|
+
col.search.key ??= col.prop;
|
|
20028
|
+
col.search.label ??= col.label;
|
|
19940
20029
|
if (col.search.defaultValue) {
|
|
19941
20030
|
state.searchParam[col.search.key] = col.search.defaultValue;
|
|
19942
20031
|
}
|
|
19943
20032
|
}
|
|
19944
20033
|
});
|
|
19945
20034
|
columns = columns.sort((a, b) => {
|
|
19946
|
-
return
|
|
20035
|
+
return a?.order - b?.order;
|
|
19947
20036
|
});
|
|
19948
20037
|
state.orgColumns = tableUtil.flatColumns(columns, enumMap);
|
|
19949
20038
|
};
|
|
@@ -20441,11 +20530,10 @@
|
|
|
20441
20530
|
column,
|
|
20442
20531
|
$index
|
|
20443
20532
|
}) => {
|
|
20444
|
-
var _a, _b;
|
|
20445
20533
|
if (props.type === "submitInfo") {
|
|
20446
20534
|
let _slot;
|
|
20447
|
-
const submitClerkName = row[
|
|
20448
|
-
const submitTime = row[
|
|
20535
|
+
const submitClerkName = row[props.submitInfoField?.submitClerkName ?? "submitClerkName"];
|
|
20536
|
+
const submitTime = row[props.submitInfoField?.submitTime ?? "submitTime"];
|
|
20449
20537
|
return vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
|
|
20450
20538
|
"style": "white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",
|
|
20451
20539
|
"title": submitTime
|
|
@@ -20575,11 +20663,65 @@
|
|
|
20575
20663
|
vue.watch(() => props, () => {
|
|
20576
20664
|
elTableColumnProps = utils.useProps(props, tableColumnProps, ["type", "minWidth", "sortable", "sortOrders", "resizable", "showOverflowTooltip"]);
|
|
20577
20665
|
});
|
|
20578
|
-
utils.useRender(() =>
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20666
|
+
utils.useRender(() => vue.createVNode(vue.Fragment, null, [
|
|
20667
|
+
// 如果有配置多级表头的数据,则递归该组件
|
|
20668
|
+
props._children?.length ? vue.createVNode(ElementPlus.ElTableColumn, vue.mergeProps(elTableColumnProps.value, {
|
|
20669
|
+
"minWidth": getWidth("auto"),
|
|
20670
|
+
"sortable": props.sortable ? "custom" : false,
|
|
20671
|
+
"sortOrders": props.sortOrders ?? ["descending", "ascending", null],
|
|
20672
|
+
"resizable": props.resizable && !props.autoWidth,
|
|
20673
|
+
"showOverflowTooltip": (props.showOverflowTooltip ?? true) && !props.autoWidth && !props.type
|
|
20674
|
+
}), {
|
|
20675
|
+
header: ({
|
|
20676
|
+
column,
|
|
20677
|
+
$index
|
|
20678
|
+
}) => headerRender({
|
|
20679
|
+
column,
|
|
20680
|
+
$index
|
|
20681
|
+
}),
|
|
20682
|
+
default: () => props._children.map((col) => vue.h(vue.resolveComponent("FaTableColumn"), {
|
|
20683
|
+
...col
|
|
20684
|
+
}, slots))
|
|
20685
|
+
}) : props.type === "image" ? vue.createVNode(ElementPlus.ElTableColumn, vue.mergeProps(elTableColumnProps.value, {
|
|
20686
|
+
"align": "center",
|
|
20687
|
+
"className": "fa-table__image-column",
|
|
20688
|
+
"minWidth": "50px",
|
|
20689
|
+
"sortable": false,
|
|
20690
|
+
"resizable": false,
|
|
20691
|
+
"showOverflowTooltip": false
|
|
20692
|
+
}), {
|
|
20693
|
+
header: ({
|
|
20694
|
+
column,
|
|
20695
|
+
$index
|
|
20696
|
+
}) => headerRender({
|
|
20697
|
+
column,
|
|
20698
|
+
$index
|
|
20699
|
+
}),
|
|
20700
|
+
default: ({
|
|
20701
|
+
row
|
|
20702
|
+
}) => row[props.prop] ? tableState.hideImage ? vue.createVNode(ElementPlus.ElImage, {
|
|
20703
|
+
"class": "fa-image",
|
|
20704
|
+
"lazy": true,
|
|
20705
|
+
"src": artwork,
|
|
20706
|
+
"fit": "cover",
|
|
20707
|
+
"previewSrcList": [row[props.prop]],
|
|
20708
|
+
"closeOnPressEscape": true,
|
|
20709
|
+
"hideOnClickModal": true,
|
|
20710
|
+
"previewTeleported": true
|
|
20711
|
+
}, null) : vue.createVNode(FaImage, {
|
|
20712
|
+
"lazy": true,
|
|
20713
|
+
"src": row[props.prop],
|
|
20714
|
+
"fit": "cover",
|
|
20715
|
+
"thumb": true
|
|
20716
|
+
}, null) : vue.createVNode(ElementPlus.ElImage, {
|
|
20717
|
+
"class": "fa-image",
|
|
20718
|
+
"lazy": true,
|
|
20719
|
+
"src": notImage,
|
|
20720
|
+
"fit": "cover"
|
|
20721
|
+
}, null)
|
|
20722
|
+
}) : (
|
|
20723
|
+
// 其他正常的列
|
|
20724
|
+
vue.createVNode(ElementPlus.ElTableColumn, vue.mergeProps(elTableColumnProps.value, {
|
|
20583
20725
|
"minWidth": getWidth("auto"),
|
|
20584
20726
|
"sortable": props.sortable ? "custom" : false,
|
|
20585
20727
|
"sortOrders": props.sortOrders ?? ["descending", "ascending", null],
|
|
@@ -20593,75 +20735,18 @@
|
|
|
20593
20735
|
column,
|
|
20594
20736
|
$index
|
|
20595
20737
|
}),
|
|
20596
|
-
default: (
|
|
20597
|
-
|
|
20598
|
-
}, slots))
|
|
20599
|
-
}) : props.type === "image" ? vue.createVNode(ElementPlus.ElTableColumn, vue.mergeProps(elTableColumnProps.value, {
|
|
20600
|
-
"align": "center",
|
|
20601
|
-
"className": "fa-table__image-column",
|
|
20602
|
-
"minWidth": "50px",
|
|
20603
|
-
"sortable": false,
|
|
20604
|
-
"resizable": false,
|
|
20605
|
-
"showOverflowTooltip": false
|
|
20606
|
-
}), {
|
|
20607
|
-
header: ({
|
|
20738
|
+
default: ({
|
|
20739
|
+
row,
|
|
20608
20740
|
column,
|
|
20609
20741
|
$index
|
|
20610
|
-
}) =>
|
|
20742
|
+
}) => defaultRender({
|
|
20743
|
+
row,
|
|
20611
20744
|
column,
|
|
20612
20745
|
$index
|
|
20613
|
-
}),
|
|
20614
|
-
default: ({
|
|
20615
|
-
row
|
|
20616
|
-
}) => row[props.prop] ? tableState.hideImage ? vue.createVNode(ElementPlus.ElImage, {
|
|
20617
|
-
"class": "fa-image",
|
|
20618
|
-
"lazy": true,
|
|
20619
|
-
"src": artwork,
|
|
20620
|
-
"fit": "cover",
|
|
20621
|
-
"previewSrcList": [row[props.prop]],
|
|
20622
|
-
"closeOnPressEscape": true,
|
|
20623
|
-
"hideOnClickModal": true,
|
|
20624
|
-
"previewTeleported": true
|
|
20625
|
-
}, null) : vue.createVNode(FaImage, {
|
|
20626
|
-
"lazy": true,
|
|
20627
|
-
"src": row[props.prop],
|
|
20628
|
-
"fit": "cover",
|
|
20629
|
-
"thumb": true
|
|
20630
|
-
}, null) : vue.createVNode(ElementPlus.ElImage, {
|
|
20631
|
-
"class": "fa-image",
|
|
20632
|
-
"lazy": true,
|
|
20633
|
-
"src": notImage,
|
|
20634
|
-
"fit": "cover"
|
|
20635
|
-
}, null)
|
|
20636
|
-
}) : (
|
|
20637
|
-
// 其他正常的列
|
|
20638
|
-
vue.createVNode(ElementPlus.ElTableColumn, vue.mergeProps(elTableColumnProps.value, {
|
|
20639
|
-
"minWidth": getWidth("auto"),
|
|
20640
|
-
"sortable": props.sortable ? "custom" : false,
|
|
20641
|
-
"sortOrders": props.sortOrders ?? ["descending", "ascending", null],
|
|
20642
|
-
"resizable": props.resizable && !props.autoWidth,
|
|
20643
|
-
"showOverflowTooltip": (props.showOverflowTooltip ?? true) && !props.autoWidth && !props.type
|
|
20644
|
-
}), {
|
|
20645
|
-
header: ({
|
|
20646
|
-
column,
|
|
20647
|
-
$index
|
|
20648
|
-
}) => headerRender({
|
|
20649
|
-
column,
|
|
20650
|
-
$index
|
|
20651
|
-
}),
|
|
20652
|
-
default: ({
|
|
20653
|
-
row,
|
|
20654
|
-
column,
|
|
20655
|
-
$index
|
|
20656
|
-
}) => defaultRender({
|
|
20657
|
-
row,
|
|
20658
|
-
column,
|
|
20659
|
-
$index
|
|
20660
|
-
})
|
|
20661
20746
|
})
|
|
20662
|
-
)
|
|
20663
|
-
|
|
20664
|
-
|
|
20747
|
+
})
|
|
20748
|
+
)
|
|
20749
|
+
]));
|
|
20665
20750
|
}
|
|
20666
20751
|
});
|
|
20667
20752
|
/**!
|
|
@@ -21403,7 +21488,7 @@
|
|
|
21403
21488
|
}, info));
|
|
21404
21489
|
}
|
|
21405
21490
|
var dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, oldIndex, newIndex, oldDraggableIndex, newDraggableIndex, activeGroup, putSortable, awaitingDragStarted = false, ignoreNextClick = false, sortables = [], tapEvt, touchEvt, lastDx, lastDy, tapDistanceLeft, tapDistanceTop, moved, lastTarget, lastDirection, pastFirstInvertThresh = false, isCircumstantialInvert = false, targetMoveDistance, ghostRelativeParent, ghostRelativeParentInitialScroll = [], _silent = false, savedInputChecked = [];
|
|
21406
|
-
var documentExists = typeof document !== "undefined", PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? "cssFloat" : "float", supportDraggable = documentExists && !ChromeForAndroid && !IOS && "draggable" in document.createElement("div"), supportCssPointerEvents = function() {
|
|
21491
|
+
var documentExists = typeof document !== "undefined", PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? "cssFloat" : "float", supportDraggable = documentExists && !ChromeForAndroid && !IOS && "draggable" in document.createElement("div"), supportCssPointerEvents = (function() {
|
|
21407
21492
|
if (!documentExists) return;
|
|
21408
21493
|
if (IE11OrLess) {
|
|
21409
21494
|
return false;
|
|
@@ -21411,7 +21496,7 @@
|
|
|
21411
21496
|
var el = document.createElement("x");
|
|
21412
21497
|
el.style.cssText = "pointer-events:auto";
|
|
21413
21498
|
return el.style.pointerEvents === "auto";
|
|
21414
|
-
}(), _detectDirection = function _detectDirection2(el, options) {
|
|
21499
|
+
})(), _detectDirection = function _detectDirection2(el, options) {
|
|
21415
21500
|
var elCSS = css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = getChild(el, 0, options), child2 = getChild(el, 1, options), firstChildCSS = child1 && css(child1), secondChildCSS = child2 && css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
|
|
21416
21501
|
if (elCSS.display === "flex") {
|
|
21417
21502
|
return elCSS.flexDirection === "column" || elCSS.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
@@ -23482,25 +23567,22 @@
|
|
|
23482
23567
|
const handleChange = async () => {
|
|
23483
23568
|
if (props.change) {
|
|
23484
23569
|
if (state.change) {
|
|
23485
|
-
await props.change(tableState.orgColumns.map((m) => {
|
|
23486
|
-
|
|
23487
|
-
|
|
23488
|
-
|
|
23489
|
-
|
|
23490
|
-
|
|
23491
|
-
|
|
23492
|
-
|
|
23493
|
-
|
|
23494
|
-
|
|
23495
|
-
|
|
23496
|
-
|
|
23497
|
-
|
|
23498
|
-
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
}
|
|
23502
|
-
};
|
|
23503
|
-
}));
|
|
23570
|
+
await props.change(tableState.orgColumns.map((m) => ({
|
|
23571
|
+
columnID: m.columnID,
|
|
23572
|
+
label: m.label,
|
|
23573
|
+
fixed: m.fixed,
|
|
23574
|
+
width: m.width,
|
|
23575
|
+
smallWidth: m.smallWidth,
|
|
23576
|
+
order: m.order,
|
|
23577
|
+
sortable: m.sortable,
|
|
23578
|
+
copy: m.copy,
|
|
23579
|
+
autoWidth: m.autoWidth,
|
|
23580
|
+
show: m.show,
|
|
23581
|
+
search: {
|
|
23582
|
+
label: m.search?.label,
|
|
23583
|
+
order: m.search?.order
|
|
23584
|
+
}
|
|
23585
|
+
})));
|
|
23504
23586
|
ElementPlus.ElMessage.success("保存列配置成功");
|
|
23505
23587
|
} else {
|
|
23506
23588
|
ElementPlus.ElMessage.info("列配置未发生变化");
|
|
@@ -23514,7 +23596,7 @@
|
|
|
23514
23596
|
};
|
|
23515
23597
|
const handleOrderChange = () => {
|
|
23516
23598
|
state.change = true;
|
|
23517
|
-
let orderColumns = tableState.orgColumns.filter((f) => !
|
|
23599
|
+
let orderColumns = tableState.orgColumns.filter((f) => !f?.pureSearch);
|
|
23518
23600
|
orderColumns = orderColumns.sort((a, b) => {
|
|
23519
23601
|
if (a.order !== b.order) {
|
|
23520
23602
|
return a.order - b.order;
|
|
@@ -23522,7 +23604,7 @@
|
|
|
23522
23604
|
return orderColumns.indexOf(b) - orderColumns.indexOf(a);
|
|
23523
23605
|
}
|
|
23524
23606
|
});
|
|
23525
|
-
tableState.orgColumns = [...orderColumns, ...tableState.orgColumns.filter((f) => f
|
|
23607
|
+
tableState.orgColumns = [...orderColumns, ...tableState.orgColumns.filter((f) => f?.pureSearch)];
|
|
23526
23608
|
tableState.orgColumns.forEach((item, index2) => {
|
|
23527
23609
|
item.order = index2 + 1;
|
|
23528
23610
|
});
|
|
@@ -23536,8 +23618,8 @@
|
|
|
23536
23618
|
disabled: false,
|
|
23537
23619
|
placeholder: void 0
|
|
23538
23620
|
};
|
|
23539
|
-
if (row
|
|
23540
|
-
switch (row
|
|
23621
|
+
if (row?.type) {
|
|
23622
|
+
switch (row?.type) {
|
|
23541
23623
|
case "expand":
|
|
23542
23624
|
result2.disabled = true;
|
|
23543
23625
|
result2.placeholder = "暂不支持宽度配置";
|
|
@@ -23557,10 +23639,10 @@
|
|
|
23557
23639
|
result2.placeholder = "当前列无需配置";
|
|
23558
23640
|
break;
|
|
23559
23641
|
}
|
|
23560
|
-
} else if (row
|
|
23642
|
+
} else if (row?.tag) {
|
|
23561
23643
|
result2.disabled = true;
|
|
23562
23644
|
result2.placeholder = "标签列无需配置";
|
|
23563
|
-
} else if (row
|
|
23645
|
+
} else if (row?.autoWidth) {
|
|
23564
23646
|
result2.disabled = true;
|
|
23565
23647
|
result2.placeholder = "自动列宽无需配置";
|
|
23566
23648
|
}
|
|
@@ -23580,7 +23662,7 @@
|
|
|
23580
23662
|
disabled: false,
|
|
23581
23663
|
placeholder: void 0
|
|
23582
23664
|
};
|
|
23583
|
-
if (row
|
|
23665
|
+
if (row?.pureSearch) {
|
|
23584
23666
|
result2.disabled = true;
|
|
23585
23667
|
result2.placeholder = "搜索列无需配置";
|
|
23586
23668
|
}
|
|
@@ -23738,7 +23820,7 @@
|
|
|
23738
23820
|
"inlinePrompt": true,
|
|
23739
23821
|
"activeText": "是",
|
|
23740
23822
|
"inactiveText": "否",
|
|
23741
|
-
"disabled": row.disabledSortable ||
|
|
23823
|
+
"disabled": row.disabledSortable || row?.type === "image"
|
|
23742
23824
|
}, pureSearchDisabled(row, true), {
|
|
23743
23825
|
"onChange": handleColumnChange
|
|
23744
23826
|
}), null)
|
|
@@ -23754,7 +23836,7 @@
|
|
|
23754
23836
|
"inlinePrompt": true,
|
|
23755
23837
|
"activeText": "是",
|
|
23756
23838
|
"inactiveText": "否",
|
|
23757
|
-
"disabled": !!
|
|
23839
|
+
"disabled": !!row?.type || !!row?.slot
|
|
23758
23840
|
}, pureSearchDisabled(row, true), {
|
|
23759
23841
|
"onChange": handleColumnChange
|
|
23760
23842
|
}), null)
|
|
@@ -23770,7 +23852,7 @@
|
|
|
23770
23852
|
"inlinePrompt": true,
|
|
23771
23853
|
"activeText": "是",
|
|
23772
23854
|
"inactiveText": "否",
|
|
23773
|
-
"disabled": !!
|
|
23855
|
+
"disabled": !!row?.type
|
|
23774
23856
|
}, pureSearchDisabled(row, true), {
|
|
23775
23857
|
"onChange": handleColumnChange
|
|
23776
23858
|
}), null)
|
|
@@ -23917,35 +23999,33 @@
|
|
|
23917
23999
|
oldValue: void 0
|
|
23918
24000
|
});
|
|
23919
24001
|
const handleUpdateModelValue = (value) => {
|
|
23920
|
-
var _a, _b, _c, _d;
|
|
23921
24002
|
if (isString(value)) {
|
|
23922
24003
|
value = value.trim();
|
|
23923
24004
|
}
|
|
23924
|
-
state.oldValue = tableState.searchParam[
|
|
23925
|
-
tableState.searchParam[
|
|
24005
|
+
state.oldValue = tableState.searchParam[props.column?.search?.key ?? props.column.prop];
|
|
24006
|
+
tableState.searchParam[props.column?.search?.key ?? props.column.prop] = value;
|
|
23926
24007
|
};
|
|
23927
24008
|
const handleChange = (value) => {
|
|
23928
24009
|
props.search();
|
|
23929
24010
|
};
|
|
23930
24011
|
const handleDefaultProps = () => {
|
|
23931
|
-
var _a, _b, _c;
|
|
23932
24012
|
const search = props.column.search;
|
|
23933
24013
|
const defaultProps = {};
|
|
23934
|
-
if (clearableEls.includes(search
|
|
24014
|
+
if (clearableEls.includes(search?.el)) {
|
|
23935
24015
|
defaultProps.clearable = true;
|
|
23936
24016
|
}
|
|
23937
|
-
if (filterableEls.includes(search
|
|
24017
|
+
if (filterableEls.includes(search?.el)) {
|
|
23938
24018
|
defaultProps.filterable = true;
|
|
23939
24019
|
}
|
|
23940
|
-
if (inputPlaceholderEls.includes(search
|
|
24020
|
+
if (inputPlaceholderEls.includes(search?.el)) {
|
|
23941
24021
|
defaultProps.placeholder = "请输入";
|
|
23942
24022
|
}
|
|
23943
|
-
if (selectPlaceholderEls.includes(search
|
|
24023
|
+
if (selectPlaceholderEls.includes(search?.el)) {
|
|
23944
24024
|
defaultProps.placeholder = "请选择";
|
|
23945
24025
|
}
|
|
23946
|
-
if (["el-date-picker", "ElDatePicker"].includes(search
|
|
24026
|
+
if (["el-date-picker", "ElDatePicker"].includes(search?.el)) {
|
|
23947
24027
|
defaultProps.unlinkPanels = true;
|
|
23948
|
-
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
24028
|
+
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(search?.props?.type)) {
|
|
23949
24029
|
defaultProps.defaultTime = utils.dateUtil.getDefaultTime();
|
|
23950
24030
|
defaultProps.shortcuts = utils.dateUtil.getShortcuts();
|
|
23951
24031
|
defaultProps.rangeSeparator = "至";
|
|
@@ -23956,53 +24036,47 @@
|
|
|
23956
24036
|
defaultProps.shortcuts = utils.dateUtil.getSimpleShortcuts();
|
|
23957
24037
|
}
|
|
23958
24038
|
}
|
|
23959
|
-
if (["el-time-picker", "ElTimePicker"].includes(search
|
|
24039
|
+
if (["el-time-picker", "ElTimePicker"].includes(search?.el) && search?.props?.isRange) {
|
|
23960
24040
|
defaultProps.rangeSeparator = "至";
|
|
23961
24041
|
defaultProps.startPlaceholder = "开始时间";
|
|
23962
24042
|
defaultProps.endPlaceholder = "结束时间";
|
|
23963
24043
|
}
|
|
23964
|
-
if (["el-select", "ElSelect", "el-select-v2", "ElSelectV2", "el-cascader", "ElCascader", "el-tree-select", "ElTreeSelect"].includes(search
|
|
24044
|
+
if (["el-select", "ElSelect", "el-select-v2", "ElSelectV2", "el-cascader", "ElCascader", "el-tree-select", "ElTreeSelect"].includes(search?.el)) {
|
|
23965
24045
|
let enumData;
|
|
23966
24046
|
if (props.column.enum && isString(props.column.enum)) {
|
|
23967
24047
|
enumData = enumMap.get(props.column.enum);
|
|
23968
24048
|
} else {
|
|
23969
|
-
enumData = enumMap.get(props.column.prop ??
|
|
24049
|
+
enumData = enumMap.get(props.column.prop ?? props.column.search?.key);
|
|
23970
24050
|
}
|
|
23971
|
-
enumData = enumData.filter((f) =>
|
|
24051
|
+
enumData = enumData.filter((f) => f?.show !== false);
|
|
23972
24052
|
state.enumDict = enumData ?? [];
|
|
23973
24053
|
}
|
|
23974
|
-
if (["el-select-v2", "ElSelectV2", "el-cascader", "ElCascader"].includes(search
|
|
24054
|
+
if (["el-select-v2", "ElSelectV2", "el-cascader", "ElCascader"].includes(search?.el)) {
|
|
23975
24055
|
defaultProps.options = state.enumDict;
|
|
23976
24056
|
}
|
|
23977
|
-
if (["el-tree-select", "ElTreeSelect"].includes(search
|
|
24057
|
+
if (["el-tree-select", "ElTreeSelect"].includes(search?.el)) {
|
|
23978
24058
|
defaultProps.data = state.enumDict;
|
|
23979
24059
|
}
|
|
23980
24060
|
return defaultProps;
|
|
23981
24061
|
};
|
|
23982
|
-
utils.useRender(() => {
|
|
23983
|
-
|
|
23984
|
-
|
|
23985
|
-
|
|
23986
|
-
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
|
|
23990
|
-
|
|
23991
|
-
|
|
23992
|
-
|
|
23993
|
-
|
|
23994
|
-
|
|
23995
|
-
|
|
23996
|
-
|
|
23997
|
-
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
column: props.column,
|
|
24001
|
-
search: props.search,
|
|
24002
|
-
...getTableDefaultSlots(tableState)
|
|
24003
|
-
})
|
|
24004
|
-
})]);
|
|
24005
|
-
});
|
|
24062
|
+
utils.useRender(() => vue.createVNode(vue.Fragment, null, [props.column.search?.el && vue.h(vue.resolveComponent(props.column.search.el), {
|
|
24063
|
+
...handleDefaultProps(),
|
|
24064
|
+
...props.column.search.props,
|
|
24065
|
+
modelValue: tableState.searchParam[props.column?.search?.key ?? props.column.prop],
|
|
24066
|
+
"onUpdate:modelValue": handleUpdateModelValue,
|
|
24067
|
+
onChange: handleChange
|
|
24068
|
+
}, {
|
|
24069
|
+
default: () => ["el-select", "ElSelect"].includes(props.column.search.el) ? state.enumDict.map((selData, index2) => vue.h(ElementPlus.ElOption, {
|
|
24070
|
+
key: index2,
|
|
24071
|
+
label: selData[props.column.search.props?.label ?? "label"],
|
|
24072
|
+
value: selData[props.column.search.props?.value ?? "value"],
|
|
24073
|
+
disabled: selData[props.column.search.props?.disabled ?? "disabled"]
|
|
24074
|
+
})) : slots.default && slots.default({
|
|
24075
|
+
column: props.column,
|
|
24076
|
+
search: props.search,
|
|
24077
|
+
...getTableDefaultSlots(tableState)
|
|
24078
|
+
})
|
|
24079
|
+
})]));
|
|
24006
24080
|
}
|
|
24007
24081
|
});
|
|
24008
24082
|
function _isSlot$1(s) {
|
|
@@ -24056,10 +24130,7 @@
|
|
|
24056
24130
|
const _globalSize = ElementPlus.useGlobalSize();
|
|
24057
24131
|
const gridRef = vue.ref();
|
|
24058
24132
|
const tableState = vue.inject(tableStateKey);
|
|
24059
|
-
const breakPoint = vue.computed(() =>
|
|
24060
|
-
var _a;
|
|
24061
|
-
return (_a = gridRef.value) == null ? void 0 : _a.breakPoint;
|
|
24062
|
-
});
|
|
24133
|
+
const breakPoint = vue.computed(() => gridRef.value?.breakPoint);
|
|
24063
24134
|
const state = vue.reactive({
|
|
24064
24135
|
refreshing: false,
|
|
24065
24136
|
height: "auto",
|
|
@@ -24069,8 +24140,7 @@
|
|
|
24069
24140
|
showCollapsed: vue.computed(() => {
|
|
24070
24141
|
let show = false;
|
|
24071
24142
|
tableState.searchColumns.reduce((prev, current) => {
|
|
24072
|
-
|
|
24073
|
-
prev += (((_a = current.search[breakPoint.value]) == null ? void 0 : _a.span) ?? ((_b = current.search) == null ? void 0 : _b.span) ?? 1) + (((_c = current.search[breakPoint.value]) == null ? void 0 : _c.offset) ?? ((_d = current.search) == null ? void 0 : _d.offset) ?? 0);
|
|
24143
|
+
prev += (current.search[breakPoint.value]?.span ?? current.search?.span ?? 1) + (current.search[breakPoint.value]?.offset ?? current.search?.offset ?? 0);
|
|
24074
24144
|
if (typeof props.cols !== "number") {
|
|
24075
24145
|
if (prev >= props.cols[breakPoint.value]) show = true;
|
|
24076
24146
|
} else {
|
|
@@ -24088,26 +24158,26 @@
|
|
|
24088
24158
|
const advancedSearchRef = vue.ref();
|
|
24089
24159
|
const getResponsive = (item) => {
|
|
24090
24160
|
return {
|
|
24091
|
-
span: item
|
|
24092
|
-
offset:
|
|
24093
|
-
xs: item
|
|
24094
|
-
sm: item
|
|
24095
|
-
md: item
|
|
24096
|
-
lg: item
|
|
24097
|
-
xl: item
|
|
24161
|
+
span: item?.span,
|
|
24162
|
+
offset: item?.offset ?? 0,
|
|
24163
|
+
xs: item?.xs,
|
|
24164
|
+
sm: item?.sm,
|
|
24165
|
+
md: item?.md,
|
|
24166
|
+
lg: item?.lg,
|
|
24167
|
+
xl: item?.xl
|
|
24098
24168
|
};
|
|
24099
24169
|
};
|
|
24100
24170
|
const handleBreakPointChange = ({
|
|
24101
24171
|
breakPoint: breakPoint2
|
|
24102
24172
|
}) => {
|
|
24103
24173
|
state.breakPoint = props.cols[breakPoint2] - 1;
|
|
24104
|
-
state.searchColumns = tableState.searchColumns.filter((f) => f
|
|
24105
|
-
state.advancedSearchColumns = tableState.searchColumns.filter((f) => f
|
|
24174
|
+
state.searchColumns = tableState.searchColumns.filter((f) => f?.show).slice(0, state.breakPoint);
|
|
24175
|
+
state.advancedSearchColumns = tableState.searchColumns.filter((f) => f?.show).slice(state.breakPoint);
|
|
24106
24176
|
};
|
|
24107
24177
|
vue.watch(() => tableState.searchColumns, () => {
|
|
24108
24178
|
if (state.breakPoint) {
|
|
24109
|
-
state.searchColumns = tableState.searchColumns.filter((f) => f
|
|
24110
|
-
state.advancedSearchColumns = tableState.searchColumns.filter((f) => f
|
|
24179
|
+
state.searchColumns = tableState.searchColumns.filter((f) => f?.show).slice(0, state.breakPoint);
|
|
24180
|
+
state.advancedSearchColumns = tableState.searchColumns.filter((f) => f?.show).slice(state.breakPoint);
|
|
24111
24181
|
}
|
|
24112
24182
|
});
|
|
24113
24183
|
const searchColumns = vue.computed(() => props.advancedSearchDrawer ? state.searchColumns : tableState.searchColumns);
|
|
@@ -24148,32 +24218,26 @@
|
|
|
24148
24218
|
"cols": props.cols,
|
|
24149
24219
|
"onBreakPointChange": handleBreakPointChange
|
|
24150
24220
|
}, {
|
|
24151
|
-
default: () => [searchColumns.value.map((item, index2) => {
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
|
|
24161
|
-
|
|
24162
|
-
|
|
24163
|
-
|
|
24164
|
-
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
|
|
24168
|
-
|
|
24169
|
-
|
|
24170
|
-
|
|
24171
|
-
"column": item,
|
|
24172
|
-
"search": props.search
|
|
24173
|
-
}, null)])])];
|
|
24174
|
-
}
|
|
24175
|
-
});
|
|
24176
|
-
}), vue.createVNode(FaLayoutGridItem, {
|
|
24221
|
+
default: () => [searchColumns.value.map((item, index2) => vue.createVNode(FaLayoutGridItem, vue.mergeProps({
|
|
24222
|
+
"key": item?.search?.key ?? item.prop
|
|
24223
|
+
}, getResponsive(item.search), {
|
|
24224
|
+
"index": index2
|
|
24225
|
+
}), {
|
|
24226
|
+
default: () => [vue.createVNode("div", {
|
|
24227
|
+
"class": "el-form-item el-form-item--default el-form-item--label-right"
|
|
24228
|
+
}, [vue.createVNode("label", {
|
|
24229
|
+
"class": "el-form-item__label"
|
|
24230
|
+
}, [item.search.label]), vue.createVNode("div", {
|
|
24231
|
+
"class": "el-form-item__content"
|
|
24232
|
+
}, [item.search?.slot ? slots[item.search.slot] && slots[item.search.slot]({
|
|
24233
|
+
column: item,
|
|
24234
|
+
search: props.search,
|
|
24235
|
+
...getTableDefaultSlots(tableState)
|
|
24236
|
+
}) : vue.createVNode(TableSearchFormItem, {
|
|
24237
|
+
"column": item,
|
|
24238
|
+
"search": props.search
|
|
24239
|
+
}, null)])])]
|
|
24240
|
+
})), vue.createVNode(FaLayoutGridItem, {
|
|
24177
24241
|
"suffix": true
|
|
24178
24242
|
}, {
|
|
24179
24243
|
default: () => [vue.createVNode("div", {
|
|
@@ -24244,29 +24308,26 @@
|
|
|
24244
24308
|
lg: 5,
|
|
24245
24309
|
xl: 6
|
|
24246
24310
|
}
|
|
24247
|
-
}, _isSlot$1(_slot = state.advancedSearchColumns.map((item, index2) => {
|
|
24248
|
-
|
|
24249
|
-
|
|
24250
|
-
|
|
24251
|
-
|
|
24252
|
-
|
|
24253
|
-
|
|
24254
|
-
|
|
24255
|
-
|
|
24256
|
-
|
|
24257
|
-
|
|
24258
|
-
|
|
24259
|
-
|
|
24260
|
-
|
|
24261
|
-
|
|
24262
|
-
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
}, null)])])]
|
|
24268
|
-
});
|
|
24269
|
-
})) ? _slot : {
|
|
24311
|
+
}, _isSlot$1(_slot = state.advancedSearchColumns.map((item, index2) => vue.createVNode(FaLayoutGridItem, vue.mergeProps({
|
|
24312
|
+
"key": item.prop ?? item?.search?.key
|
|
24313
|
+
}, getResponsive(item.search), {
|
|
24314
|
+
"index": index2
|
|
24315
|
+
}), {
|
|
24316
|
+
default: () => [vue.createVNode("div", {
|
|
24317
|
+
"class": "el-form-item el-form-item--default el-form-item--label-top"
|
|
24318
|
+
}, [vue.createVNode("label", {
|
|
24319
|
+
"class": "el-form-item__label"
|
|
24320
|
+
}, [item.search.label]), vue.createVNode("div", {
|
|
24321
|
+
"class": "el-form-item__content"
|
|
24322
|
+
}, [item.search.slot ? slots[item.search.slot] && slots[item.search.slot]({
|
|
24323
|
+
column: item,
|
|
24324
|
+
search: props.search,
|
|
24325
|
+
...getTableDefaultSlots(tableState)
|
|
24326
|
+
}) : vue.createVNode(TableSearchFormItem, {
|
|
24327
|
+
"column": item,
|
|
24328
|
+
"search": props.search
|
|
24329
|
+
}, null)])])]
|
|
24330
|
+
}))) ? _slot : {
|
|
24270
24331
|
default: () => [_slot]
|
|
24271
24332
|
})])]
|
|
24272
24333
|
})]);
|
|
@@ -24686,11 +24747,10 @@
|
|
|
24686
24747
|
const columnSettingRef = vue.ref();
|
|
24687
24748
|
let lastRowIndex = 0;
|
|
24688
24749
|
const indexMethod = (index2) => {
|
|
24689
|
-
var _a;
|
|
24690
24750
|
if (index2 === 0) {
|
|
24691
24751
|
lastRowIndex = 0;
|
|
24692
24752
|
}
|
|
24693
|
-
if (
|
|
24753
|
+
if (state.spanColumns?.length > 0) {
|
|
24694
24754
|
const rowspan = Number(state.tableSpanData["__table-index"][index2]);
|
|
24695
24755
|
if (rowspan === 0) {
|
|
24696
24756
|
return lastRowIndex + (state.tablePagination.pageIndex - 1) * state.tablePagination.pageSize + 1;
|
|
@@ -24762,7 +24822,6 @@
|
|
|
24762
24822
|
prop,
|
|
24763
24823
|
order
|
|
24764
24824
|
}) => {
|
|
24765
|
-
var _a, _b;
|
|
24766
24825
|
if (!column.multiOrder) {
|
|
24767
24826
|
column.multiOrder = "descending";
|
|
24768
24827
|
} else if (column.multiOrder === "descending") {
|
|
@@ -24770,7 +24829,7 @@
|
|
|
24770
24829
|
} else {
|
|
24771
24830
|
column.multiOrder = null;
|
|
24772
24831
|
}
|
|
24773
|
-
state.searchParam.sortList = [.../* @__PURE__ */ new Set([...
|
|
24832
|
+
state.searchParam.sortList = [.../* @__PURE__ */ new Set([...props.initParam?.sortList ?? [], ...state.searchParam?.sortList ?? []])];
|
|
24774
24833
|
const orgColumn = state.orgColumns.find((f) => f.prop === prop);
|
|
24775
24834
|
const enField = orgColumn.sortableField ?? orgColumn.prop ?? orgColumn.property;
|
|
24776
24835
|
const fieldIndex = state.searchParam.sortList.findIndex((f) => f.enField === enField);
|
|
@@ -24821,7 +24880,7 @@
|
|
|
24821
24880
|
}
|
|
24822
24881
|
}
|
|
24823
24882
|
const columnInfo = state.tableColumns.find((f) => f.prop === column.property);
|
|
24824
|
-
if (columnInfo
|
|
24883
|
+
if (columnInfo?.dataDeleteField) {
|
|
24825
24884
|
if (row && row[columnInfo.dataDeleteField] === true) {
|
|
24826
24885
|
if (localCellClassName) {
|
|
24827
24886
|
localCellClassName += " fa-table__data-delete-column";
|
|
@@ -24830,15 +24889,15 @@
|
|
|
24830
24889
|
}
|
|
24831
24890
|
}
|
|
24832
24891
|
}
|
|
24833
|
-
if (
|
|
24892
|
+
if (columnInfo?.type === "submitInfo") {
|
|
24834
24893
|
if (localCellClassName) {
|
|
24835
24894
|
localCellClassName += " fa-table__line-height-normal-column";
|
|
24836
24895
|
} else {
|
|
24837
24896
|
localCellClassName = "fa-table__line-height-normal-column";
|
|
24838
24897
|
}
|
|
24839
24898
|
}
|
|
24840
|
-
if (
|
|
24841
|
-
if (columnInfo
|
|
24899
|
+
if (columnInfo?.type === "date" || columnInfo?.type === "time" || columnInfo?.type === "dateTime") {
|
|
24900
|
+
if (columnInfo?.dateFix) {
|
|
24842
24901
|
if (localCellClassName) {
|
|
24843
24902
|
localCellClassName += " fa-table__line-height-normal-column";
|
|
24844
24903
|
} else {
|
|
@@ -25133,83 +25192,80 @@
|
|
|
25133
25192
|
}, [slots.empty ? slots.empty() : vue.createVNode(vue.Fragment, null, [vue.createVNode(ElementPlus.ElIcon, null, {
|
|
25134
25193
|
default: () => [vue.createVNode(FastElementPlusIconsVue.NotData, null, null)]
|
|
25135
25194
|
}), vue.createVNode("div", null, [vue.createTextVNode("暂无数据")])])]),
|
|
25136
|
-
default: () => {
|
|
25137
|
-
|
|
25138
|
-
|
|
25139
|
-
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
|
|
25144
|
-
|
|
25145
|
-
|
|
25146
|
-
|
|
25147
|
-
|
|
25148
|
-
|
|
25149
|
-
|
|
25150
|
-
|
|
25151
|
-
|
|
25152
|
-
|
|
25153
|
-
|
|
25154
|
-
|
|
25155
|
-
|
|
25156
|
-
|
|
25157
|
-
|
|
25158
|
-
|
|
25159
|
-
|
|
25160
|
-
|
|
25161
|
-
|
|
25162
|
-
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25183
|
-
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25194
|
-
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
|
|
25198
|
-
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
|
|
25203
|
-
|
|
25204
|
-
|
|
25205
|
-
|
|
25206
|
-
|
|
25207
|
-
|
|
25208
|
-
|
|
25209
|
-
|
|
25210
|
-
"onCustomCellClick": handleCustomCellClick
|
|
25211
|
-
}), pick(slots, tableColumnSlotNames.value))))]);
|
|
25212
|
-
}
|
|
25195
|
+
default: () => vue.createVNode(vue.Fragment, null, [vue.createVNode(ElementPlus.ElTableColumn, {
|
|
25196
|
+
"className": "fa-table__index-column",
|
|
25197
|
+
"type": "index",
|
|
25198
|
+
"fixed": "left",
|
|
25199
|
+
"width": state.tablePagination.pageIndex * state.tablePagination.pageSize >= 100 ? state.tablePagination.pageIndex * state.tablePagination.pageSize >= 1e3 ? 50 : 40 : 30,
|
|
25200
|
+
"align": "center",
|
|
25201
|
+
"index": indexMethod,
|
|
25202
|
+
"showOverflowTooltip": false,
|
|
25203
|
+
"resizable": false,
|
|
25204
|
+
"columnKey": "__table-index"
|
|
25205
|
+
}, null), vue.createVNode(ElementPlus.ElTableColumn, {
|
|
25206
|
+
"className": "fa-table__selection-column",
|
|
25207
|
+
"type": "selection",
|
|
25208
|
+
"fixed": "left",
|
|
25209
|
+
"width": 35,
|
|
25210
|
+
"align": "center",
|
|
25211
|
+
"reserveSelection": true,
|
|
25212
|
+
"showOverflowTooltip": false,
|
|
25213
|
+
"resizable": false,
|
|
25214
|
+
"columnKey": "__table-selection",
|
|
25215
|
+
"selectable": props.rowSelectable
|
|
25216
|
+
}, null), slots.operation && vue.createVNode(ElementPlus.ElTableColumn, {
|
|
25217
|
+
"fixed": "right",
|
|
25218
|
+
"width": state.operationColumnWidth,
|
|
25219
|
+
"headerAlign": "center",
|
|
25220
|
+
"align": "center",
|
|
25221
|
+
"showOverflowTooltip": false,
|
|
25222
|
+
"className": "fa-table__operation-column",
|
|
25223
|
+
"resizable": false,
|
|
25224
|
+
"columnKey": "__table-operation"
|
|
25225
|
+
}, {
|
|
25226
|
+
header: () => vue.createVNode("div", {
|
|
25227
|
+
"class": "fa-table__auto-width-column__cell-header __fa-table__auto-width-column__cell-header____table-operation"
|
|
25228
|
+
}, [vue.createVNode("span", null, [vue.createTextVNode("操作")])]),
|
|
25229
|
+
default: ({
|
|
25230
|
+
row,
|
|
25231
|
+
column,
|
|
25232
|
+
$index
|
|
25233
|
+
}) => vue.createVNode("div", {
|
|
25234
|
+
"class": "fa-table__auto-width-column__cell __fa-table__auto-width-column__cell____table-operation"
|
|
25235
|
+
}, [slots.operation({
|
|
25236
|
+
row,
|
|
25237
|
+
column,
|
|
25238
|
+
$index,
|
|
25239
|
+
...{
|
|
25240
|
+
search: tableSearch
|
|
25241
|
+
},
|
|
25242
|
+
...getTableDefaultSlots(state)
|
|
25243
|
+
})])
|
|
25244
|
+
}), state.tableColumns?.length === 0 ? slots.default && slots.default() : state.tableColumns.map((col) => col.show && (col.type === "expand" ? vue.createVNode(ElementPlus.ElTableColumn, vue.mergeProps(col, {
|
|
25245
|
+
"width": 35,
|
|
25246
|
+
"fixed": col.fixed ?? "left",
|
|
25247
|
+
"resizable": false
|
|
25248
|
+
}), {
|
|
25249
|
+
default: ({
|
|
25250
|
+
row,
|
|
25251
|
+
column,
|
|
25252
|
+
$index
|
|
25253
|
+
}) => vue.createVNode(vue.Fragment, null, [col.render && col.render({
|
|
25254
|
+
row,
|
|
25255
|
+
column,
|
|
25256
|
+
$index,
|
|
25257
|
+
...getTableDefaultSlots(state)
|
|
25258
|
+
}), col.slot && slots[col.slot] && slots[col.slot]({
|
|
25259
|
+
row,
|
|
25260
|
+
column,
|
|
25261
|
+
$index,
|
|
25262
|
+
...getTableDefaultSlots(state)
|
|
25263
|
+
})])
|
|
25264
|
+
}) : col.prop && vue.createVNode(TableColumn, vue.mergeProps(omit(col, tableColumnOmitNames), {
|
|
25265
|
+
"resizable": true,
|
|
25266
|
+
"onImagePreview": handleImagePreview,
|
|
25267
|
+
"onCustomCellClick": handleCustomCellClick
|
|
25268
|
+
}), pick(slots, tableColumnSlotNames.value))))])
|
|
25213
25269
|
}), [[vue.resolveDirective("loading"), state.loading]]), vue.createVNode("div", {
|
|
25214
25270
|
"class": "fa-table__main-footer"
|
|
25215
25271
|
}, [vue.createVNode("div", {
|
|
@@ -25245,80 +25301,35 @@
|
|
|
25245
25301
|
}, null)]));
|
|
25246
25302
|
return utils.useExpose(expose, {
|
|
25247
25303
|
/** @description 用于多选表格,清空用户的选择 */
|
|
25248
|
-
clearSelection: vue.computed(() =>
|
|
25249
|
-
var _a;
|
|
25250
|
-
return (_a = tableRef.value) == null ? void 0 : _a.clearSelection;
|
|
25251
|
-
}),
|
|
25304
|
+
clearSelection: vue.computed(() => tableRef.value?.clearSelection),
|
|
25252
25305
|
/** @description 返回当前选中的行 */
|
|
25253
|
-
getSelectionRows: vue.computed(() =>
|
|
25254
|
-
var _a;
|
|
25255
|
-
return (_a = tableRef.value) == null ? void 0 : _a.getSelectionRows;
|
|
25256
|
-
}),
|
|
25306
|
+
getSelectionRows: vue.computed(() => tableRef.value?.getSelectionRows),
|
|
25257
25307
|
/** @description 用于多选表格,切换某一行的选中状态, 如果使用了第二个参数,则可直接设置这一行选中与否 */
|
|
25258
|
-
toggleRowSelection: vue.computed(() =>
|
|
25259
|
-
var _a;
|
|
25260
|
-
return (_a = tableRef.value) == null ? void 0 : _a.toggleRowSelection;
|
|
25261
|
-
}),
|
|
25308
|
+
toggleRowSelection: vue.computed(() => tableRef.value?.toggleRowSelection),
|
|
25262
25309
|
/** @description 用于多选表格,切换全选和全不选 */
|
|
25263
|
-
toggleAllSelection: vue.computed(() =>
|
|
25264
|
-
var _a;
|
|
25265
|
-
return (_a = tableRef.value) == null ? void 0 : _a.toggleAllSelection;
|
|
25266
|
-
}),
|
|
25310
|
+
toggleAllSelection: vue.computed(() => tableRef.value?.toggleAllSelection),
|
|
25267
25311
|
/** @description 用于可扩展的表格或树表格,如果某行被扩展,则切换。 使用第二个参数,您可以直接设置该行应该被扩展或折叠。 */
|
|
25268
|
-
toggleRowExpansion: vue.computed(() =>
|
|
25269
|
-
var _a;
|
|
25270
|
-
return (_a = tableRef.value) == null ? void 0 : _a.toggleRowExpansion;
|
|
25271
|
-
}),
|
|
25312
|
+
toggleRowExpansion: vue.computed(() => tableRef.value?.toggleRowExpansion),
|
|
25272
25313
|
/** @description 用于单选表格,设定某一行为选中行, 如果调用时不加参数,则会取消目前高亮行的选中状态。 */
|
|
25273
|
-
setCurrentRow: vue.computed(() =>
|
|
25274
|
-
var _a;
|
|
25275
|
-
return (_a = tableRef.value) == null ? void 0 : _a.setCurrentRow;
|
|
25276
|
-
}),
|
|
25314
|
+
setCurrentRow: vue.computed(() => tableRef.value?.setCurrentRow),
|
|
25277
25315
|
/** @description 用于清空排序条件,数据会恢复成未排序的状态 */
|
|
25278
|
-
clearSort: vue.computed(() =>
|
|
25279
|
-
var _a;
|
|
25280
|
-
return (_a = tableRef.value) == null ? void 0 : _a.clearSort;
|
|
25281
|
-
}),
|
|
25316
|
+
clearSort: vue.computed(() => tableRef.value?.clearSort),
|
|
25282
25317
|
/** @description 传入由columnKey 组成的数组以清除指定列的过滤条件。 如果没有参数,清除所有过滤器 */
|
|
25283
|
-
clearFilter: vue.computed(() =>
|
|
25284
|
-
var _a;
|
|
25285
|
-
return (_a = tableRef.value) == null ? void 0 : _a.clearFilter;
|
|
25286
|
-
}),
|
|
25318
|
+
clearFilter: vue.computed(() => tableRef.value?.clearFilter),
|
|
25287
25319
|
/** @description 对 Table 进行重新布局。 当表格可见性变化时,您可能需要调用此方法以获得正确的布局 */
|
|
25288
|
-
doLayout: vue.computed(() =>
|
|
25289
|
-
var _a;
|
|
25290
|
-
return (_a = tableRef.value) == null ? void 0 : _a.doLayout;
|
|
25291
|
-
}),
|
|
25320
|
+
doLayout: vue.computed(() => tableRef.value?.doLayout),
|
|
25292
25321
|
/** @description 手动排序表格。 参数 prop 属性指定排序列,order 指定排序顺序。 */
|
|
25293
|
-
sort: vue.computed(() =>
|
|
25294
|
-
var _a;
|
|
25295
|
-
return (_a = tableRef.value) == null ? void 0 : _a.sort;
|
|
25296
|
-
}),
|
|
25322
|
+
sort: vue.computed(() => tableRef.value?.sort),
|
|
25297
25323
|
/** @description 滚动到一组特定坐标 */
|
|
25298
|
-
scrollTo: vue.computed(() =>
|
|
25299
|
-
var _a;
|
|
25300
|
-
return (_a = tableRef.value) == null ? void 0 : _a.scrollTo;
|
|
25301
|
-
}),
|
|
25324
|
+
scrollTo: vue.computed(() => tableRef.value?.scrollTo),
|
|
25302
25325
|
/** @description 设置垂直滚动位置 */
|
|
25303
|
-
setScrollTop: vue.computed(() =>
|
|
25304
|
-
var _a;
|
|
25305
|
-
return (_a = tableRef.value) == null ? void 0 : _a.setScrollTop;
|
|
25306
|
-
}),
|
|
25326
|
+
setScrollTop: vue.computed(() => tableRef.value?.setScrollTop),
|
|
25307
25327
|
/** @description 设置水平滚动位置 */
|
|
25308
|
-
setScrollLeft: vue.computed(() =>
|
|
25309
|
-
var _a;
|
|
25310
|
-
return (_a = tableRef.value) == null ? void 0 : _a.setScrollLeft;
|
|
25311
|
-
}),
|
|
25328
|
+
setScrollLeft: vue.computed(() => tableRef.value?.setScrollLeft),
|
|
25312
25329
|
/** @description 获取表列的 context */
|
|
25313
|
-
columns: vue.computed(() =>
|
|
25314
|
-
var _a;
|
|
25315
|
-
return (_a = tableRef.value) == null ? void 0 : _a.columns;
|
|
25316
|
-
}),
|
|
25330
|
+
columns: vue.computed(() => tableRef.value?.columns),
|
|
25317
25331
|
/** @description 适用于 lazy Table, 需要设置 rowKey, 更新 key children */
|
|
25318
|
-
updateKeyChildren: vue.computed(() =>
|
|
25319
|
-
var _a;
|
|
25320
|
-
return (_a = tableRef.value) == null ? void 0 : _a.updateKeyChildren;
|
|
25321
|
-
}),
|
|
25332
|
+
updateKeyChildren: vue.computed(() => tableRef.value?.updateKeyChildren),
|
|
25322
25333
|
/** @description 加载状态 */
|
|
25323
25334
|
loading: vue.computed(() => state.loading),
|
|
25324
25335
|
/** @description 表格数据 */
|
|
@@ -25548,7 +25559,7 @@
|
|
|
25548
25559
|
emit,
|
|
25549
25560
|
expose
|
|
25550
25561
|
}) {
|
|
25551
|
-
const selectedLabel = useVModel(props, "label", emit, {
|
|
25562
|
+
const selectedLabel = /* @__PURE__ */ useVModel(props, "label", emit, {
|
|
25552
25563
|
passive: true
|
|
25553
25564
|
});
|
|
25554
25565
|
const _globalSize = ElementPlus.useGlobalSize();
|
|
@@ -25572,10 +25583,7 @@
|
|
|
25572
25583
|
}
|
|
25573
25584
|
})
|
|
25574
25585
|
});
|
|
25575
|
-
const fold = vue.computed(() => [...state.orgTreeData].filter((f) =>
|
|
25576
|
-
var _a;
|
|
25577
|
-
return ((_a = f[props.props.children]) == null ? void 0 : _a.length) > 0;
|
|
25578
|
-
}).length === 0);
|
|
25586
|
+
const fold = vue.computed(() => [...state.orgTreeData].filter((f) => f[props.props.children]?.length > 0).length === 0);
|
|
25579
25587
|
const treeRef = vue.ref();
|
|
25580
25588
|
const setTreeData = (treeData) => {
|
|
25581
25589
|
if (!props.hideAll) {
|
|
@@ -25732,14 +25740,14 @@
|
|
|
25732
25740
|
data
|
|
25733
25741
|
}) => vue.createVNode("span", {
|
|
25734
25742
|
"class": "el-tree-node__label",
|
|
25735
|
-
"title":
|
|
25743
|
+
"title": data?.all ? data.label : node.label,
|
|
25736
25744
|
"style": {
|
|
25737
25745
|
paddingLeft: fold.value ? "3px" : ""
|
|
25738
25746
|
}
|
|
25739
25747
|
}, [vue.createVNode("span", null, [slots.label ? slots.label({
|
|
25740
25748
|
node,
|
|
25741
25749
|
data
|
|
25742
|
-
}) :
|
|
25750
|
+
}) : data?.all ? data.label : node.label]), node.key && data.showNum ? vue.createVNode("span", null, [vue.createTextVNode("["), data.quantity, vue.createTextVNode("]")]) : null, slots.default && vue.createVNode("span", null, [slots.default({
|
|
25743
25751
|
node,
|
|
25744
25752
|
data
|
|
25745
25753
|
})])]),
|
|
@@ -25750,95 +25758,41 @@
|
|
|
25750
25758
|
})]), [[vue.resolveDirective("loading"), state.loading]]));
|
|
25751
25759
|
return utils.useExpose(expose, {
|
|
25752
25760
|
/** @description 过滤所有树节点,过滤后的节点将被隐藏 */
|
|
25753
|
-
filter: vue.computed(() =>
|
|
25754
|
-
var _a;
|
|
25755
|
-
return (_a = treeRef.value) == null ? void 0 : _a.filter;
|
|
25756
|
-
}),
|
|
25761
|
+
filter: vue.computed(() => treeRef.value?.filter),
|
|
25757
25762
|
/** @description 为节点设置新数据,只有当设置 node-key 属性的时候才可用 */
|
|
25758
|
-
updateKeyChildren: vue.computed(() =>
|
|
25759
|
-
var _a;
|
|
25760
|
-
return (_a = treeRef.value) == null ? void 0 : _a.updateKeyChildren;
|
|
25761
|
-
}),
|
|
25763
|
+
updateKeyChildren: vue.computed(() => treeRef.value?.updateKeyChildren),
|
|
25762
25764
|
/** @description 如果节点可以被选中,(show-checkbox 为 true), 本方法将返回当前选中节点的数组 */
|
|
25763
|
-
getCheckedNodes: vue.computed(() =>
|
|
25764
|
-
var _a;
|
|
25765
|
-
return (_a = treeRef.value) == null ? void 0 : _a.getCheckedNodes;
|
|
25766
|
-
}),
|
|
25765
|
+
getCheckedNodes: vue.computed(() => treeRef.value?.getCheckedNodes),
|
|
25767
25766
|
/** @description 设置目前勾选的节点,使用此方法必须提前设置 node-key 属性 */
|
|
25768
|
-
setCheckedNodes: vue.computed(() =>
|
|
25769
|
-
var _a;
|
|
25770
|
-
return (_a = treeRef.value) == null ? void 0 : _a.setCheckedNodes;
|
|
25771
|
-
}),
|
|
25767
|
+
setCheckedNodes: vue.computed(() => treeRef.value?.setCheckedNodes),
|
|
25772
25768
|
/** @description 若节点可用被选中 (show-checkbox 为 true), 它将返回当前选中节点 key 的数组 */
|
|
25773
|
-
getCheckedKeys: vue.computed(() =>
|
|
25774
|
-
var _a;
|
|
25775
|
-
return (_a = treeRef.value) == null ? void 0 : _a.getCheckedKeys;
|
|
25776
|
-
}),
|
|
25769
|
+
getCheckedKeys: vue.computed(() => treeRef.value?.getCheckedKeys),
|
|
25777
25770
|
/** @description 设置目前选中的节点,使用此方法必须设置 node-key 属性 */
|
|
25778
|
-
setCheckedKeys: vue.computed(() =>
|
|
25779
|
-
var _a;
|
|
25780
|
-
return (_a = treeRef.value) == null ? void 0 : _a.setCheckedKeys;
|
|
25781
|
-
}),
|
|
25771
|
+
setCheckedKeys: vue.computed(() => treeRef.value?.setCheckedKeys),
|
|
25782
25772
|
/** @description 设置节点是否被选中, 使用此方法必须设置 node-key 属性 */
|
|
25783
|
-
setChecked: vue.computed(() =>
|
|
25784
|
-
var _a;
|
|
25785
|
-
return (_a = treeRef.value) == null ? void 0 : _a.setChecked;
|
|
25786
|
-
}),
|
|
25773
|
+
setChecked: vue.computed(() => treeRef.value?.setChecked),
|
|
25787
25774
|
/** @description 如果节点可用被选中 (show-checkbox 为 true), 它将返回当前半选中的节点组成的数组 */
|
|
25788
|
-
getHalfCheckedNodes: vue.computed(() =>
|
|
25789
|
-
var _a;
|
|
25790
|
-
return (_a = treeRef.value) == null ? void 0 : _a.getHalfCheckedNodes;
|
|
25791
|
-
}),
|
|
25775
|
+
getHalfCheckedNodes: vue.computed(() => treeRef.value?.getHalfCheckedNodes),
|
|
25792
25776
|
/** @description 若节点可被选中(show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组 */
|
|
25793
|
-
getHalfCheckedKeys: vue.computed(() =>
|
|
25794
|
-
var _a;
|
|
25795
|
-
return (_a = treeRef.value) == null ? void 0 : _a.getHalfCheckedKeys;
|
|
25796
|
-
}),
|
|
25777
|
+
getHalfCheckedKeys: vue.computed(() => treeRef.value?.getHalfCheckedKeys),
|
|
25797
25778
|
/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */
|
|
25798
|
-
getCurrentKey: vue.computed(() =>
|
|
25799
|
-
var _a;
|
|
25800
|
-
return (_a = treeRef.value) == null ? void 0 : _a.getCurrentKey;
|
|
25801
|
-
}),
|
|
25779
|
+
getCurrentKey: vue.computed(() => treeRef.value?.getCurrentKey),
|
|
25802
25780
|
/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */
|
|
25803
|
-
getCurrentNode: vue.computed(() =>
|
|
25804
|
-
var _a;
|
|
25805
|
-
return (_a = treeRef.value) == null ? void 0 : _a.getCurrentNode;
|
|
25806
|
-
}),
|
|
25781
|
+
getCurrentNode: vue.computed(() => treeRef.value?.getCurrentNode),
|
|
25807
25782
|
/** @description 通过 key 设置某个节点的当前选中状态,使用此方法必须设置 node-key 属性 */
|
|
25808
|
-
setCurrentKey: vue.computed(() =>
|
|
25809
|
-
var _a;
|
|
25810
|
-
return (_a = treeRef.value) == null ? void 0 : _a.setCurrentKey;
|
|
25811
|
-
}),
|
|
25783
|
+
setCurrentKey: vue.computed(() => treeRef.value?.setCurrentKey),
|
|
25812
25784
|
/** @description 设置节点为选中状态,使用此方法必须设置 node-key 属性 */
|
|
25813
|
-
setCurrentNode: vue.computed(() =>
|
|
25814
|
-
var _a;
|
|
25815
|
-
return (_a = treeRef.value) == null ? void 0 : _a.setCurrentNode;
|
|
25816
|
-
}),
|
|
25785
|
+
setCurrentNode: vue.computed(() => treeRef.value?.setCurrentNode),
|
|
25817
25786
|
/** @description 根据 data 或者 key 拿到 Tree 组件中的 node */
|
|
25818
|
-
getNode: vue.computed(() =>
|
|
25819
|
-
var _a;
|
|
25820
|
-
return (_a = treeRef.value) == null ? void 0 : _a.getNode;
|
|
25821
|
-
}),
|
|
25787
|
+
getNode: vue.computed(() => treeRef.value?.getNode),
|
|
25822
25788
|
/** @description 删除 Tree 中的一个节点,使用此方法必须设置 node-key 属性 */
|
|
25823
|
-
remove: vue.computed(() =>
|
|
25824
|
-
var _a;
|
|
25825
|
-
return (_a = treeRef.value) == null ? void 0 : _a.remove;
|
|
25826
|
-
}),
|
|
25789
|
+
remove: vue.computed(() => treeRef.value?.remove),
|
|
25827
25790
|
/** @description 为 Tree 中的一个节点追加一个子节点 */
|
|
25828
|
-
append: vue.computed(() =>
|
|
25829
|
-
var _a;
|
|
25830
|
-
return (_a = treeRef.value) == null ? void 0 : _a.append;
|
|
25831
|
-
}),
|
|
25791
|
+
append: vue.computed(() => treeRef.value?.append),
|
|
25832
25792
|
/** @description 在 Tree 中给定节点前插入一个节点 */
|
|
25833
|
-
insertBefore: vue.computed(() =>
|
|
25834
|
-
var _a;
|
|
25835
|
-
return (_a = treeRef.value) == null ? void 0 : _a.insertBefore;
|
|
25836
|
-
}),
|
|
25793
|
+
insertBefore: vue.computed(() => treeRef.value?.insertBefore),
|
|
25837
25794
|
/** @description 在 Tree 中给定节点后插入一个节点 */
|
|
25838
|
-
insertAfter: vue.computed(() =>
|
|
25839
|
-
var _a;
|
|
25840
|
-
return (_a = treeRef.value) == null ? void 0 : _a.insertAfter;
|
|
25841
|
-
}),
|
|
25795
|
+
insertAfter: vue.computed(() => treeRef.value?.insertAfter),
|
|
25842
25796
|
/** @description 加载状态 */
|
|
25843
25797
|
loading: vue.computed(() => state.loading),
|
|
25844
25798
|
/** @description 刷新 */
|
|
@@ -26007,8 +25961,7 @@
|
|
|
26007
25961
|
emit,
|
|
26008
25962
|
expose
|
|
26009
25963
|
}) {
|
|
26010
|
-
|
|
26011
|
-
const selectedLabel = useVModel(props, "label", emit, {
|
|
25964
|
+
const selectedLabel = /* @__PURE__ */ useVModel(props, "label", emit, {
|
|
26012
25965
|
passive: true
|
|
26013
25966
|
});
|
|
26014
25967
|
const state = vue.reactive({
|
|
@@ -26018,13 +25971,13 @@
|
|
|
26018
25971
|
/** 首次出现 */
|
|
26019
25972
|
debut: true,
|
|
26020
25973
|
/** 回显 */
|
|
26021
|
-
echo:
|
|
25974
|
+
echo: props.data?.length > 0 ? false : true,
|
|
26022
25975
|
/** 下次刷新 */
|
|
26023
25976
|
nextRefresh: false
|
|
26024
25977
|
});
|
|
26025
25978
|
const treeSelectRef = vue.ref();
|
|
26026
25979
|
const handleData = (data) => {
|
|
26027
|
-
return data
|
|
25980
|
+
return data?.map((m) => ({
|
|
26028
25981
|
...m,
|
|
26029
25982
|
value: m[props.nodeKey],
|
|
26030
25983
|
label: isFunction(props.props.label) ? props.props.label(m) : m[props.props.label ?? "label"],
|
|
@@ -26069,7 +26022,7 @@
|
|
|
26069
26022
|
const handleChange = (value, data) => {
|
|
26070
26023
|
if (props.multiple) {
|
|
26071
26024
|
const valueArr = value;
|
|
26072
|
-
if (
|
|
26025
|
+
if (valueArr?.length === 0) {
|
|
26073
26026
|
state.value = null;
|
|
26074
26027
|
selectedLabel.value = null;
|
|
26075
26028
|
emit("update:modelValue", null);
|
|
@@ -26089,7 +26042,7 @@
|
|
|
26089
26042
|
emit("change", null, null);
|
|
26090
26043
|
return;
|
|
26091
26044
|
}
|
|
26092
|
-
data
|
|
26045
|
+
data ??= state.selectorData.find((f) => f.value === value);
|
|
26093
26046
|
state.value = value;
|
|
26094
26047
|
selectedLabel.value = data.label;
|
|
26095
26048
|
emit("update:modelValue", value);
|
|
@@ -26168,7 +26121,6 @@
|
|
|
26168
26121
|
immediate: true
|
|
26169
26122
|
});
|
|
26170
26123
|
vue.onMounted(async () => {
|
|
26171
|
-
var _a2;
|
|
26172
26124
|
if (props.defaultSelected) {
|
|
26173
26125
|
await loadData();
|
|
26174
26126
|
if (state.selectorData.length > 0) {
|
|
@@ -26178,7 +26130,7 @@
|
|
|
26178
26130
|
handleChange(state.selectorData[0].value, state.selectorData[0]);
|
|
26179
26131
|
}
|
|
26180
26132
|
}
|
|
26181
|
-
} else if (!props.requestApi &&
|
|
26133
|
+
} else if (!props.requestApi && props.data?.length > 0) {
|
|
26182
26134
|
state.debut = false;
|
|
26183
26135
|
await loadData();
|
|
26184
26136
|
} else if (!props.lazy) {
|
|
@@ -26275,110 +26227,47 @@
|
|
|
26275
26227
|
}));
|
|
26276
26228
|
return utils.useExpose(expose, {
|
|
26277
26229
|
/** @description 使选择器的输入框获取焦点 */
|
|
26278
|
-
focus: vue.computed(() =>
|
|
26279
|
-
var _a2;
|
|
26280
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.focus;
|
|
26281
|
-
}),
|
|
26230
|
+
focus: vue.computed(() => treeSelectRef.value?.focus),
|
|
26282
26231
|
/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */
|
|
26283
|
-
blur: vue.computed(() =>
|
|
26284
|
-
var _a2;
|
|
26285
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.blur;
|
|
26286
|
-
}),
|
|
26232
|
+
blur: vue.computed(() => treeSelectRef.value?.blur),
|
|
26287
26233
|
/** @description 获取当前选中的标签 */
|
|
26288
|
-
selectedLabel: vue.computed(() =>
|
|
26289
|
-
var _a2;
|
|
26290
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.selectedLabel;
|
|
26291
|
-
}),
|
|
26234
|
+
selectedLabel: vue.computed(() => treeSelectRef.value?.selectedLabel),
|
|
26292
26235
|
/** @description 过滤所有树节点,过滤后的节点将被隐藏 */
|
|
26293
|
-
filter: vue.computed(() =>
|
|
26294
|
-
var _a2;
|
|
26295
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.filter;
|
|
26296
|
-
}),
|
|
26236
|
+
filter: vue.computed(() => treeSelectRef.value?.filter),
|
|
26297
26237
|
/** @description 为节点设置新数据,只有当设置 node-key 属性的时候才可用 */
|
|
26298
|
-
updateKeyChildren: vue.computed(() =>
|
|
26299
|
-
var _a2;
|
|
26300
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.updateKeyChildren;
|
|
26301
|
-
}),
|
|
26238
|
+
updateKeyChildren: vue.computed(() => treeSelectRef.value?.updateKeyChildren),
|
|
26302
26239
|
/** @description 如果节点可以被选中,(show-checkbox 为 true), 本方法将返回当前选中节点的数组 */
|
|
26303
|
-
getCheckedNodes: vue.computed(() =>
|
|
26304
|
-
var _a2;
|
|
26305
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.getCheckedNodes;
|
|
26306
|
-
}),
|
|
26240
|
+
getCheckedNodes: vue.computed(() => treeSelectRef.value?.getCheckedNodes),
|
|
26307
26241
|
/** @description 设置目前勾选的节点,使用此方法必须提前设置 node-key 属性 */
|
|
26308
|
-
setCheckedNodes: vue.computed(() =>
|
|
26309
|
-
var _a2;
|
|
26310
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.setCheckedNodes;
|
|
26311
|
-
}),
|
|
26242
|
+
setCheckedNodes: vue.computed(() => treeSelectRef.value?.setCheckedNodes),
|
|
26312
26243
|
/** @description 若节点可用被选中 (show-checkbox 为 true), 它将返回当前选中节点 key 的数组 */
|
|
26313
|
-
getCheckedKeys: vue.computed(() =>
|
|
26314
|
-
var _a2;
|
|
26315
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.getCheckedKeys;
|
|
26316
|
-
}),
|
|
26244
|
+
getCheckedKeys: vue.computed(() => treeSelectRef.value?.getCheckedKeys),
|
|
26317
26245
|
/** @description 设置目前选中的节点,使用此方法必须设置 node-key 属性 */
|
|
26318
|
-
setCheckedKeys: vue.computed(() =>
|
|
26319
|
-
var _a2;
|
|
26320
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.setCheckedKeys;
|
|
26321
|
-
}),
|
|
26246
|
+
setCheckedKeys: vue.computed(() => treeSelectRef.value?.setCheckedKeys),
|
|
26322
26247
|
/** @description 设置节点是否被选中, 使用此方法必须设置 node-key 属性 */
|
|
26323
|
-
setChecked: vue.computed(() =>
|
|
26324
|
-
var _a2;
|
|
26325
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.setChecked;
|
|
26326
|
-
}),
|
|
26248
|
+
setChecked: vue.computed(() => treeSelectRef.value?.setChecked),
|
|
26327
26249
|
/** @description 如果节点可用被选中 (show-checkbox 为 true), 它将返回当前半选中的节点组成的数组 */
|
|
26328
|
-
getHalfCheckedNodes: vue.computed(() =>
|
|
26329
|
-
var _a2;
|
|
26330
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.getHalfCheckedNodes;
|
|
26331
|
-
}),
|
|
26250
|
+
getHalfCheckedNodes: vue.computed(() => treeSelectRef.value?.getHalfCheckedNodes),
|
|
26332
26251
|
/** @description 若节点可被选中(show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组 */
|
|
26333
|
-
getHalfCheckedKeys: vue.computed(() =>
|
|
26334
|
-
var _a2;
|
|
26335
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.getHalfCheckedKeys;
|
|
26336
|
-
}),
|
|
26252
|
+
getHalfCheckedKeys: vue.computed(() => treeSelectRef.value?.getHalfCheckedKeys),
|
|
26337
26253
|
/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */
|
|
26338
|
-
getCurrentKey: vue.computed(() =>
|
|
26339
|
-
var _a2;
|
|
26340
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.getCurrentKey;
|
|
26341
|
-
}),
|
|
26254
|
+
getCurrentKey: vue.computed(() => treeSelectRef.value?.getCurrentKey),
|
|
26342
26255
|
/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */
|
|
26343
|
-
getCurrentNode: vue.computed(() =>
|
|
26344
|
-
var _a2;
|
|
26345
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.getCurrentNode;
|
|
26346
|
-
}),
|
|
26256
|
+
getCurrentNode: vue.computed(() => treeSelectRef.value?.getCurrentNode),
|
|
26347
26257
|
/** @description 通过 key 设置某个节点的当前选中状态,使用此方法必须设置 node-key 属性 */
|
|
26348
|
-
setCurrentKey: vue.computed(() =>
|
|
26349
|
-
var _a2;
|
|
26350
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.setCurrentKey;
|
|
26351
|
-
}),
|
|
26258
|
+
setCurrentKey: vue.computed(() => treeSelectRef.value?.setCurrentKey),
|
|
26352
26259
|
/** @description 设置节点为选中状态,使用此方法必须设置 node-key 属性 */
|
|
26353
|
-
setCurrentNode: vue.computed(() =>
|
|
26354
|
-
var _a2;
|
|
26355
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.setCurrentNode;
|
|
26356
|
-
}),
|
|
26260
|
+
setCurrentNode: vue.computed(() => treeSelectRef.value?.setCurrentNode),
|
|
26357
26261
|
/** @description 根据 data 或者 key 拿到 Tree 组件中的 node */
|
|
26358
|
-
getNode: vue.computed(() =>
|
|
26359
|
-
var _a2;
|
|
26360
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.getNode;
|
|
26361
|
-
}),
|
|
26262
|
+
getNode: vue.computed(() => treeSelectRef.value?.getNode),
|
|
26362
26263
|
/** @description 删除 Tree 中的一个节点,使用此方法必须设置 node-key 属性 */
|
|
26363
|
-
remove: vue.computed(() =>
|
|
26364
|
-
var _a2;
|
|
26365
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.remove;
|
|
26366
|
-
}),
|
|
26264
|
+
remove: vue.computed(() => treeSelectRef.value?.remove),
|
|
26367
26265
|
/** @description 为 Tree 中的一个节点追加一个子节点 */
|
|
26368
|
-
append: vue.computed(() =>
|
|
26369
|
-
var _a2;
|
|
26370
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.append;
|
|
26371
|
-
}),
|
|
26266
|
+
append: vue.computed(() => treeSelectRef.value?.append),
|
|
26372
26267
|
/** @description 在 Tree 中给定节点前插入一个节点 */
|
|
26373
|
-
insertBefore: vue.computed(() =>
|
|
26374
|
-
var _a2;
|
|
26375
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.insertBefore;
|
|
26376
|
-
}),
|
|
26268
|
+
insertBefore: vue.computed(() => treeSelectRef.value?.insertBefore),
|
|
26377
26269
|
/** @description 在 Tree 中给定节点后插入一个节点 */
|
|
26378
|
-
insertAfter: vue.computed(() =>
|
|
26379
|
-
var _a2;
|
|
26380
|
-
return (_a2 = treeSelectRef.value) == null ? void 0 : _a2.insertAfter;
|
|
26381
|
-
}),
|
|
26270
|
+
insertAfter: vue.computed(() => treeSelectRef.value?.insertAfter),
|
|
26382
26271
|
/** @description 加载状态 */
|
|
26383
26272
|
loading: vue.computed(() => state.loading),
|
|
26384
26273
|
/** @description 刷新 */
|
|
@@ -27427,7 +27316,7 @@
|
|
|
27427
27316
|
Ctor.precision -= k;
|
|
27428
27317
|
return x;
|
|
27429
27318
|
}
|
|
27430
|
-
var divide = /* @__PURE__ */ function() {
|
|
27319
|
+
var divide = /* @__PURE__ */ (function() {
|
|
27431
27320
|
function multiplyInteger(x, k, base) {
|
|
27432
27321
|
var temp, carry = 0, i = x.length;
|
|
27433
27322
|
for (x = x.slice(); i--; ) {
|
|
@@ -27585,7 +27474,7 @@
|
|
|
27585
27474
|
}
|
|
27586
27475
|
return q;
|
|
27587
27476
|
};
|
|
27588
|
-
}();
|
|
27477
|
+
})();
|
|
27589
27478
|
function finalise(x, sd, rm, isTruncated) {
|
|
27590
27479
|
var digits, i, j, k, rd, roundUp, w, xd, xdi, Ctor = x.constructor;
|
|
27591
27480
|
out: if (sd != null) {
|
|
@@ -28658,12 +28547,12 @@
|
|
|
28658
28547
|
}
|
|
28659
28548
|
};
|
|
28660
28549
|
const useUpload = (componentName, fileTypeName, props, emit, data) => {
|
|
28661
|
-
const fileList = useVModel(props, "fileList", emit, { passive: true });
|
|
28550
|
+
const fileList = /* @__PURE__ */ useVModel(props, "fileList", emit, { passive: true });
|
|
28662
28551
|
const loading = vue.ref(false);
|
|
28663
28552
|
const formContext = vue.inject(ElementPlus.formContextKey, void 0);
|
|
28664
28553
|
const formItemContext = vue.inject(ElementPlus.formItemContextKey, void 0);
|
|
28665
28554
|
const mbNum = new Decimal(1024);
|
|
28666
|
-
const maxSizeKB = new Decimal(isNumber(data
|
|
28555
|
+
const maxSizeKB = new Decimal(isNumber(data?.maxSize) ? data?.maxSize : Number(data?.maxSize));
|
|
28667
28556
|
const maxSizeMB = maxSizeKB.div(mbNum);
|
|
28668
28557
|
vue.onMounted(() => {
|
|
28669
28558
|
if (!data.uploadApi && !data.uploadUrl) {
|
|
@@ -28695,7 +28584,7 @@
|
|
|
28695
28584
|
if (props.data) {
|
|
28696
28585
|
propsData = uploadUtil.getPropsData(options.file, props.data);
|
|
28697
28586
|
}
|
|
28698
|
-
if (!
|
|
28587
|
+
if (!data?.uploadUrl && !data?.uploadUrl) {
|
|
28699
28588
|
ElementPlus.ElMessage.error(`上传${fileTypeName}Api或地址不能为空`);
|
|
28700
28589
|
utils.consoleError(componentName, `上传${fileTypeName}接口 “uploadApi” 或地址 “uploadUrl” 不能为空`);
|
|
28701
28590
|
return;
|
|
@@ -28720,7 +28609,7 @@
|
|
|
28720
28609
|
}
|
|
28721
28610
|
uploadFile.url = fileUrl;
|
|
28722
28611
|
handleValue();
|
|
28723
|
-
|
|
28612
|
+
formItemContext?.prop && formContext?.validateField([formItemContext.prop]);
|
|
28724
28613
|
ElementPlus.ElMessage.success("上传成功");
|
|
28725
28614
|
props.onSuccess && props.onSuccess(fileUrl, uploadFile, uploadFiles);
|
|
28726
28615
|
};
|
|
@@ -28761,7 +28650,7 @@
|
|
|
28761
28650
|
return {
|
|
28762
28651
|
name: "",
|
|
28763
28652
|
status: "success",
|
|
28764
|
-
uid:
|
|
28653
|
+
uid: find2?.uid ?? ElementPlus.genFileId(),
|
|
28765
28654
|
url: m
|
|
28766
28655
|
};
|
|
28767
28656
|
});
|
|
@@ -28771,7 +28660,7 @@
|
|
|
28771
28660
|
{
|
|
28772
28661
|
name: "",
|
|
28773
28662
|
status: "success",
|
|
28774
|
-
uid:
|
|
28663
|
+
uid: find2?.uid ?? ElementPlus.genFileId(),
|
|
28775
28664
|
url: newValue
|
|
28776
28665
|
}
|
|
28777
28666
|
];
|
|
@@ -28857,7 +28746,7 @@
|
|
|
28857
28746
|
uploadUrl: props.uploadUrl
|
|
28858
28747
|
});
|
|
28859
28748
|
const disabled = vue.computed(() => {
|
|
28860
|
-
return props.disabled ||
|
|
28749
|
+
return props.disabled || formContext?.disabled;
|
|
28861
28750
|
});
|
|
28862
28751
|
const uploadRef = vue.ref();
|
|
28863
28752
|
const handleOnChange = (uploadFile, uploadFiles) => {
|
|
@@ -28908,30 +28797,15 @@
|
|
|
28908
28797
|
}), [[vue.resolveDirective("loading"), loading.value]]));
|
|
28909
28798
|
return utils.useExpose(expose, {
|
|
28910
28799
|
/** @description 取消上传请求 */
|
|
28911
|
-
abort: vue.computed(() =>
|
|
28912
|
-
var _a;
|
|
28913
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.abort;
|
|
28914
|
-
}),
|
|
28800
|
+
abort: vue.computed(() => uploadRef.value?.abort),
|
|
28915
28801
|
/** @description 手动上传文件列表 */
|
|
28916
|
-
submit: vue.computed(() =>
|
|
28917
|
-
var _a;
|
|
28918
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.submit;
|
|
28919
|
-
}),
|
|
28802
|
+
submit: vue.computed(() => uploadRef.value?.submit),
|
|
28920
28803
|
/** @description 清空已上传的文件列表(该方法不支持在 before-upload 中调用) */
|
|
28921
|
-
clearFiles: vue.computed(() =>
|
|
28922
|
-
var _a;
|
|
28923
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.clearFiles;
|
|
28924
|
-
}),
|
|
28804
|
+
clearFiles: vue.computed(() => uploadRef.value?.clearFiles),
|
|
28925
28805
|
/** @description 手动选择文件 */
|
|
28926
|
-
handleStart: vue.computed(() =>
|
|
28927
|
-
var _a;
|
|
28928
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.handleStart;
|
|
28929
|
-
}),
|
|
28806
|
+
handleStart: vue.computed(() => uploadRef.value?.handleStart),
|
|
28930
28807
|
/** @description 手动移除文件。 file 和rawFile 已被合并。 rawFile 将在 v2.2.0 中移除 */
|
|
28931
|
-
handleRemove: vue.computed(() =>
|
|
28932
|
-
var _a;
|
|
28933
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.handleRemove;
|
|
28934
|
-
}),
|
|
28808
|
+
handleRemove: vue.computed(() => uploadRef.value?.handleRemove),
|
|
28935
28809
|
/** @description 加载状态 */
|
|
28936
28810
|
loading,
|
|
28937
28811
|
/** @description 文件集合 */
|
|
@@ -29022,7 +28896,7 @@
|
|
|
29022
28896
|
uploadUrl: props.uploadUrl
|
|
29023
28897
|
});
|
|
29024
28898
|
const disabled = vue.computed(() => {
|
|
29025
|
-
return props.disabled ||
|
|
28899
|
+
return props.disabled || formContext?.disabled;
|
|
29026
28900
|
});
|
|
29027
28901
|
const state = vue.reactive({
|
|
29028
28902
|
uploadKey: `fa-upload-image__${utils.stringUtil.generateRandomString(8)}`,
|
|
@@ -29113,30 +28987,15 @@
|
|
|
29113
28987
|
}, null)]));
|
|
29114
28988
|
return utils.useExpose(expose, {
|
|
29115
28989
|
/** @description 取消上传请求 */
|
|
29116
|
-
abort: vue.computed(() =>
|
|
29117
|
-
var _a;
|
|
29118
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.abort;
|
|
29119
|
-
}),
|
|
28990
|
+
abort: vue.computed(() => uploadRef.value?.abort),
|
|
29120
28991
|
/** @description 手动上传文件列表 */
|
|
29121
|
-
submit: vue.computed(() =>
|
|
29122
|
-
var _a;
|
|
29123
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.submit;
|
|
29124
|
-
}),
|
|
28992
|
+
submit: vue.computed(() => uploadRef.value?.submit),
|
|
29125
28993
|
/** @description 清空已上传的文件列表(该方法不支持在 before-upload 中调用) */
|
|
29126
|
-
clearFiles: vue.computed(() =>
|
|
29127
|
-
var _a;
|
|
29128
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.clearFiles;
|
|
29129
|
-
}),
|
|
28994
|
+
clearFiles: vue.computed(() => uploadRef.value?.clearFiles),
|
|
29130
28995
|
/** @description 手动选择文件 */
|
|
29131
|
-
handleStart: vue.computed(() =>
|
|
29132
|
-
var _a;
|
|
29133
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.handleStart;
|
|
29134
|
-
}),
|
|
28996
|
+
handleStart: vue.computed(() => uploadRef.value?.handleStart),
|
|
29135
28997
|
/** @description 手动移除文件。 file 和 rawFile 已被合并。 rawFile 将在 v2.2.0 中移除 */
|
|
29136
|
-
handleRemove: vue.computed(() =>
|
|
29137
|
-
var _a;
|
|
29138
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.handleRemove;
|
|
29139
|
-
}),
|
|
28998
|
+
handleRemove: vue.computed(() => uploadRef.value?.handleRemove),
|
|
29140
28999
|
/** @description 加载状态 */
|
|
29141
29000
|
loading,
|
|
29142
29001
|
/** @description 文件集合 */
|
|
@@ -29221,7 +29080,7 @@
|
|
|
29221
29080
|
uploadUrl: props.uploadUrl
|
|
29222
29081
|
});
|
|
29223
29082
|
const disabled = vue.computed(() => {
|
|
29224
|
-
return props.disabled ||
|
|
29083
|
+
return props.disabled || formContext?.disabled;
|
|
29225
29084
|
});
|
|
29226
29085
|
const state = vue.reactive({
|
|
29227
29086
|
uploadKey: `fa-upload-images__${utils.stringUtil.generateRandomString(8)}`,
|
|
@@ -29309,30 +29168,15 @@
|
|
|
29309
29168
|
}, null)]));
|
|
29310
29169
|
return utils.useExpose(expose, {
|
|
29311
29170
|
/** @description 取消上传请求 */
|
|
29312
|
-
abort: vue.computed(() =>
|
|
29313
|
-
var _a;
|
|
29314
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.abort;
|
|
29315
|
-
}),
|
|
29171
|
+
abort: vue.computed(() => uploadRef.value?.abort),
|
|
29316
29172
|
/** @description 手动上传文件列表 */
|
|
29317
|
-
submit: vue.computed(() =>
|
|
29318
|
-
var _a;
|
|
29319
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.submit;
|
|
29320
|
-
}),
|
|
29173
|
+
submit: vue.computed(() => uploadRef.value?.submit),
|
|
29321
29174
|
/** @description 清空已上传的文件列表(该方法不支持在 before-upload 中调用) */
|
|
29322
|
-
clearFiles: vue.computed(() =>
|
|
29323
|
-
var _a;
|
|
29324
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.clearFiles;
|
|
29325
|
-
}),
|
|
29175
|
+
clearFiles: vue.computed(() => uploadRef.value?.clearFiles),
|
|
29326
29176
|
/** @description 手动选择文件 */
|
|
29327
|
-
handleStart: vue.computed(() =>
|
|
29328
|
-
var _a;
|
|
29329
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.handleStart;
|
|
29330
|
-
}),
|
|
29177
|
+
handleStart: vue.computed(() => uploadRef.value?.handleStart),
|
|
29331
29178
|
/** @description 手动移除文件。 file 和 rawFile 已被合并。 rawFile 将在 v2.2.0 中移除 */
|
|
29332
|
-
handleRemove: vue.computed(() =>
|
|
29333
|
-
var _a;
|
|
29334
|
-
return (_a = uploadRef.value) == null ? void 0 : _a.handleRemove;
|
|
29335
|
-
}),
|
|
29179
|
+
handleRemove: vue.computed(() => uploadRef.value?.handleRemove),
|
|
29336
29180
|
/** @description 加载状态 */
|
|
29337
29181
|
loading,
|
|
29338
29182
|
/** @description 文件集合 */
|
|
@@ -29758,28 +29602,28 @@
|
|
|
29758
29602
|
};
|
|
29759
29603
|
const elMessageBox = (type, message, options, appContext) => {
|
|
29760
29604
|
options = options ?? {};
|
|
29761
|
-
if (!
|
|
29605
|
+
if (!options?.title) {
|
|
29762
29606
|
options.title = "温馨提示";
|
|
29763
29607
|
}
|
|
29764
|
-
if (isNil(options
|
|
29608
|
+
if (isNil(options?.draggable)) {
|
|
29765
29609
|
options.draggable = true;
|
|
29766
29610
|
}
|
|
29767
|
-
if (!
|
|
29611
|
+
if (!options?.cancelButtonText) {
|
|
29768
29612
|
options.cancelButtonText = "取消";
|
|
29769
29613
|
}
|
|
29770
|
-
if (!
|
|
29614
|
+
if (!options?.confirmButtonText) {
|
|
29771
29615
|
options.confirmButtonText = "确定";
|
|
29772
29616
|
}
|
|
29773
|
-
if (isNil(options
|
|
29617
|
+
if (isNil(options?.closeOnClickModal)) {
|
|
29774
29618
|
options.closeOnClickModal = false;
|
|
29775
29619
|
}
|
|
29776
|
-
if (isNil(options
|
|
29620
|
+
if (isNil(options?.closeOnPressEscape)) {
|
|
29777
29621
|
options.closeOnPressEscape = false;
|
|
29778
29622
|
}
|
|
29779
|
-
if (isNil(options
|
|
29623
|
+
if (isNil(options?.beforeClose)) {
|
|
29780
29624
|
const localBeforeClose = options.beforeClose;
|
|
29781
|
-
const localConfirmButtonText = options
|
|
29782
|
-
const localShowCancelButton = options
|
|
29625
|
+
const localConfirmButtonText = options?.confirmButtonText;
|
|
29626
|
+
const localShowCancelButton = options?.showCancelButton;
|
|
29783
29627
|
options.beforeClose = (action, instance, done) => {
|
|
29784
29628
|
if (action === "confirm") {
|
|
29785
29629
|
useOverlay.show(0);
|
|
@@ -29812,12 +29656,12 @@
|
|
|
29812
29656
|
case "alert":
|
|
29813
29657
|
break;
|
|
29814
29658
|
case "confirm":
|
|
29815
|
-
if (isNil(options
|
|
29659
|
+
if (isNil(options?.showCancelButton)) {
|
|
29816
29660
|
options.showCancelButton = true;
|
|
29817
29661
|
}
|
|
29818
29662
|
break;
|
|
29819
29663
|
case "prompt":
|
|
29820
|
-
if (
|
|
29664
|
+
if (options?.showCancelButton == void 0) {
|
|
29821
29665
|
options.showCancelButton = true;
|
|
29822
29666
|
}
|
|
29823
29667
|
break;
|
|
@@ -29999,5 +29843,5 @@
|
|
|
29999
29843
|
exports2.vThrottle = vThrottle;
|
|
30000
29844
|
exports2.version = version;
|
|
30001
29845
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
30002
|
-
});
|
|
29846
|
+
}));
|
|
30003
29847
|
//# sourceMappingURL=index.full.js.map
|