pukaad-ui-lib 1.429.2 → 1.430.0
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/module.json +1 -1
- package/dist/runtime/components/input/input-chat.vue +2 -0
- package/dist/runtime/components/input/input-file.d.vue.ts +2 -0
- package/dist/runtime/components/input/input-file.vue +7 -5
- package/dist/runtime/components/input/input-file.vue.d.ts +2 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -45,6 +45,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
45
45
|
showCover: boolean;
|
|
46
46
|
previewFullSize: boolean;
|
|
47
47
|
previewSize: number;
|
|
48
|
+
minVideoSeconds: number;
|
|
49
|
+
maxVideoSeconds: number;
|
|
48
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
51
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
50
52
|
declare const _default: typeof __VLS_export;
|
|
@@ -186,7 +186,9 @@ const props = defineProps({
|
|
|
186
186
|
column: { type: Boolean, required: false, default: false },
|
|
187
187
|
showCover: { type: Boolean, required: false, default: false },
|
|
188
188
|
previewFullSize: { type: Boolean, required: false, default: false },
|
|
189
|
-
previewSize: { type: Number, required: false, default: 98 }
|
|
189
|
+
previewSize: { type: Number, required: false, default: 98 },
|
|
190
|
+
minVideoSeconds: { type: Number, required: false, default: 10 },
|
|
191
|
+
maxVideoSeconds: { type: Number, required: false, default: 60 }
|
|
190
192
|
});
|
|
191
193
|
const isDrag = ref(false);
|
|
192
194
|
const { errorMessage, setErrors } = useField(props.name);
|
|
@@ -231,19 +233,19 @@ const createFileItem = async (file) => {
|
|
|
231
233
|
return null;
|
|
232
234
|
}
|
|
233
235
|
const duration = await getVideoDuration(file);
|
|
234
|
-
if (duration <
|
|
236
|
+
if (props.minVideoSeconds > 0 && duration < props.minVideoSeconds) {
|
|
235
237
|
$alert.show({
|
|
236
238
|
type: "error",
|
|
237
239
|
title: "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 !",
|
|
238
|
-
description:
|
|
240
|
+
description: `\u0E40\u0E19\u0E37\u0E48\u0E2D\u0E07\u0E08\u0E32\u0E01\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 ${props.minVideoSeconds} \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35`
|
|
239
241
|
});
|
|
240
242
|
return null;
|
|
241
243
|
}
|
|
242
|
-
if (duration >
|
|
244
|
+
if (props.maxVideoSeconds > 0 && duration > props.maxVideoSeconds) {
|
|
243
245
|
$alert.show({
|
|
244
246
|
type: "error",
|
|
245
247
|
title: "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 !",
|
|
246
|
-
description:
|
|
248
|
+
description: `\u0E40\u0E19\u0E37\u0E48\u0E2D\u0E07\u0E08\u0E32\u0E01\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E40\u0E01\u0E34\u0E19 ${props.maxVideoSeconds} \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35`
|
|
247
249
|
});
|
|
248
250
|
return null;
|
|
249
251
|
}
|
|
@@ -45,6 +45,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
45
45
|
showCover: boolean;
|
|
46
46
|
previewFullSize: boolean;
|
|
47
47
|
previewSize: number;
|
|
48
|
+
minVideoSeconds: number;
|
|
49
|
+
maxVideoSeconds: number;
|
|
48
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
51
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
50
52
|
declare const _default: typeof __VLS_export;
|