@factoringplus/pl-components-pack-v3 0.4.53 → 0.4.54
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.
|
@@ -36238,24 +36238,23 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
|
|
|
36238
36238
|
modelValue: { type: Array, default: () => [] },
|
|
36239
36239
|
header: { type: Boolean, default: true },
|
|
36240
36240
|
main: { type: Boolean, default: true },
|
|
36241
|
-
height: { type: String, default: "150" }
|
|
36241
|
+
height: { type: String, default: "150" },
|
|
36242
|
+
limit: { type: Number }
|
|
36242
36243
|
},
|
|
36243
36244
|
emits: [
|
|
36244
36245
|
"on-files-not-attached",
|
|
36245
36246
|
"on-file-not-accept",
|
|
36246
36247
|
"on-file-size-exceeded",
|
|
36247
36248
|
"on-file-empty",
|
|
36248
|
-
"on-
|
|
36249
|
-
"on-
|
|
36250
|
-
"input",
|
|
36251
|
-
"on-error"
|
|
36249
|
+
"on-file-not-limit",
|
|
36250
|
+
"on-change"
|
|
36252
36251
|
],
|
|
36253
36252
|
setup(__props, { emit: emit2 }) {
|
|
36254
36253
|
const props = __props;
|
|
36255
36254
|
ref(false);
|
|
36256
36255
|
const fileList = ref(props.modelValue);
|
|
36257
36256
|
const el = ref(null);
|
|
36258
|
-
const { modelValue } = toRefs(props);
|
|
36257
|
+
const { modelValue, limit } = toRefs(props);
|
|
36259
36258
|
watch(modelValue, (newValue) => {
|
|
36260
36259
|
fileList.value = newValue;
|
|
36261
36260
|
});
|
|
@@ -36264,6 +36263,11 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
|
|
|
36264
36263
|
emit2("on-files-not-attached", file, fileList2);
|
|
36265
36264
|
return;
|
|
36266
36265
|
}
|
|
36266
|
+
if (fileList2.length > limit.value) {
|
|
36267
|
+
fileList2.splice(-1);
|
|
36268
|
+
emit2("on-file-not-limit", file, fileList2);
|
|
36269
|
+
return;
|
|
36270
|
+
}
|
|
36267
36271
|
if (props.accept !== "any" || props.accept !== "\u043B\u044E\u0431\u043E\u0439") {
|
|
36268
36272
|
const fileArr = file.name.split(".");
|
|
36269
36273
|
const fileExtension = "." + fileArr[fileArr.length - 1].toLowerCase();
|
|
@@ -36574,7 +36578,8 @@ const ApiJs = function(optionsRequest, isGetResourse = false, token) {
|
|
|
36574
36578
|
...options.headers
|
|
36575
36579
|
},
|
|
36576
36580
|
data: formatDateObj(options.data, true),
|
|
36577
|
-
responseType: options.responseType
|
|
36581
|
+
responseType: options.responseType,
|
|
36582
|
+
signal: options.signal
|
|
36578
36583
|
}).then((resourse) => {
|
|
36579
36584
|
if (isGetResourse)
|
|
36580
36585
|
resolve(formatDateObj(resourse));
|