@vunk/form 2.17.2 → 2.18.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/components/date-picker-range/index.cjs +10 -3
- package/components/date-picker-range/index.mjs +10 -3
- package/components/date-picker-range/src/ctx.d.ts +2 -2
- package/components/date-picker-range/src/index.vue.d.ts +8 -5
- package/components/dialog-input-collection/index.cjs +55 -33
- package/components/dialog-input-collection/index.mjs +48 -26
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -0
- package/components/dialog-input-collection/src/index.vue.d.ts +2 -0
- package/components/download-plus/index.cjs +24 -13
- package/components/download-plus/index.mjs +25 -14
- package/components/download-plus/src/index.vue.d.ts +1 -0
- package/components/esri-input-geojson/index.cjs +12 -7
- package/components/esri-input-geojson/index.mjs +12 -7
- package/components/esri-input-geojson/src/ctx.d.ts +1 -1
- package/components/esri-input-geojson/src/index.vue.d.ts +4 -3
- package/components/form-item/index.cjs +17 -14
- package/components/form-item/index.mjs +18 -15
- package/components/input-collection/index.cjs +11 -6
- package/components/input-collection/index.mjs +6 -1
- package/components/input-collection/src/core.vue.d.ts +1 -0
- package/components/input-link/index.cjs +19 -9
- package/components/input-link/index.mjs +16 -6
- package/components/input-link/src/ctx.d.ts +3 -3
- package/components/input-link/src/index.vue.d.ts +9 -6
- package/components/radio/src/index.vue.d.ts +2 -2
- package/components/radio/src/option.vue.d.ts +1 -1
- package/components/radio/src/wraper.vue.d.ts +1 -1
- package/components/tables-select/index.cjs +6 -3
- package/components/tables-select/index.mjs +6 -3
- package/components/tables-select/src/index.vue.d.ts +1 -0
- package/components/upload/index.cjs +39 -26
- package/components/upload/index.mjs +38 -25
- package/components/upload/src/ctx.d.ts +1 -1
- package/components/upload/src/file.vue.d.ts +4 -3
- package/components/upload/src/index.vue.d.ts +7 -5
- package/components/upload/src/wraper.vue.d.ts +2 -2
- package/components/upload-plus/index.cjs +56 -37
- package/components/upload-plus/index.mjs +57 -38
- package/components/upload-plus/src/index.vue.d.ts +1 -0
- package/components/var-datetime-picker/index.cjs +18 -15
- package/components/var-datetime-picker/index.mjs +18 -15
- package/components/var-datetime-picker/src/index.vue.d.ts +1 -0
- package/composables/element-plus/index.cjs +23 -0
- package/composables/element-plus/index.d.ts +1 -0
- package/composables/element-plus/index.mjs +21 -0
- package/composables/element-plus/useLocale.d.ts +8 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1 -0
- package/locale/index.cjs +110 -0
- package/locale/index.d.ts +2 -0
- package/locale/index.mjs +107 -0
- package/locale/lang/en.d.ts +53 -0
- package/locale/lang/index.cjs +2 -0
- package/locale/lang/index.d.ts +0 -0
- package/locale/lang/index.mjs +1 -0
- package/locale/lang/zh-cn.d.ts +53 -0
- package/package.json +16 -1
|
@@ -14,6 +14,7 @@ var platform = require('@skzz/platform/shared/fetch/platform');
|
|
|
14
14
|
var index$1 = require('../index.cjs');
|
|
15
15
|
var composables = require('@vunk/core/composables');
|
|
16
16
|
var _class = require('@vunk/shared/class');
|
|
17
|
+
var elementPlus$1 = require('@vunk/form/composables/element-plus');
|
|
17
18
|
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
18
19
|
|
|
19
20
|
const props = {
|
|
@@ -18251,6 +18252,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
18251
18252
|
const ToggleHandler = _class.ToggleHandler;
|
|
18252
18253
|
const props = __props;
|
|
18253
18254
|
const emit = __emit;
|
|
18255
|
+
const { tr } = elementPlus$1.useLocale();
|
|
18254
18256
|
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props);
|
|
18255
18257
|
const uuid = Math.random().toString(36).slice(-8);
|
|
18256
18258
|
const containerFile = composables.useModelComputed({
|
|
@@ -18317,14 +18319,14 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
18317
18319
|
fileStatus.value = Status.error;
|
|
18318
18320
|
elementPlus.ElMessage({
|
|
18319
18321
|
type: "error",
|
|
18320
|
-
message: "\u4E0A\u4F20\u5931\u8D25"
|
|
18322
|
+
message: tr("vkf.uploadPlus.uploadFailed", "\u4E0A\u4F20\u5931\u8D25")
|
|
18321
18323
|
});
|
|
18322
18324
|
return;
|
|
18323
18325
|
}
|
|
18324
18326
|
if (uploaded) {
|
|
18325
18327
|
elementPlus.ElMessage({
|
|
18326
18328
|
type: "success",
|
|
18327
|
-
message: "\u4E0A\u4F20\u6210\u529F"
|
|
18329
|
+
message: tr("vkf.uploadPlus.uploadSuccess", "\u4E0A\u4F20\u6210\u529F")
|
|
18328
18330
|
});
|
|
18329
18331
|
emit("success", mergedFile);
|
|
18330
18332
|
fileStatus.value = Status.done;
|
|
@@ -18358,7 +18360,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
18358
18360
|
fileStatus.value = Status.error;
|
|
18359
18361
|
elementPlus.ElMessage({
|
|
18360
18362
|
type: "error",
|
|
18361
|
-
message: "\u4E0A\u4F20\u5931\u8D25"
|
|
18363
|
+
message: tr("vkf.uploadPlus.uploadFailed", "\u4E0A\u4F20\u5931\u8D25")
|
|
18362
18364
|
});
|
|
18363
18365
|
});
|
|
18364
18366
|
};
|
|
@@ -18439,7 +18441,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
18439
18441
|
console.error("\u5408\u5E76\u5931\u8D25", err);
|
|
18440
18442
|
elementPlus.ElMessage({
|
|
18441
18443
|
type: "error",
|
|
18442
|
-
message: "\u5408\u5E76\u5931\u8D25"
|
|
18444
|
+
message: tr("vkf.uploadPlus.mergeFailed", "\u5408\u5E76\u5931\u8D25")
|
|
18443
18445
|
});
|
|
18444
18446
|
throw err;
|
|
18445
18447
|
}).finally(() => {
|
|
@@ -18470,7 +18472,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
18470
18472
|
vue.onBeforeUnmount(() => {
|
|
18471
18473
|
offlineToggle.remove();
|
|
18472
18474
|
});
|
|
18473
|
-
const __returned__ = { vLoading, ToggleHandler, props, emit, formItemBindProps, uuid, containerFile, fileStatus, containerHash, chunks, uploadingXhrs, filePrefixIcon, handleFileChange, handleUpload, handlePause, cUploadedChunks, merging, cFile, OnlineToggle, offlineToggle, get VkfFormItem() {
|
|
18475
|
+
const __returned__ = { vLoading, ToggleHandler, props, emit, tr, formItemBindProps, uuid, containerFile, fileStatus, containerHash, chunks, uploadingXhrs, filePrefixIcon, handleFileChange, handleUpload, handlePause, cUploadedChunks, merging, cFile, OnlineToggle, offlineToggle, get VkfFormItem() {
|
|
18474
18476
|
return formItem.VkfFormItem;
|
|
18475
18477
|
}, get ElInput() {
|
|
18476
18478
|
return elementPlus.ElInput;
|
|
@@ -18496,11 +18498,12 @@ const _hoisted_3 = {
|
|
|
18496
18498
|
key: 0,
|
|
18497
18499
|
class: "vkf-upload-plus-msg-x"
|
|
18498
18500
|
};
|
|
18499
|
-
const _hoisted_4 = {
|
|
18501
|
+
const _hoisted_4 = { class: "vkf-upload-plus-msg" };
|
|
18502
|
+
const _hoisted_5 = {
|
|
18500
18503
|
key: 1,
|
|
18501
18504
|
class: "vkf-upload-plus-cube-x"
|
|
18502
18505
|
};
|
|
18503
|
-
const
|
|
18506
|
+
const _hoisted_6 = ["id", "accept"];
|
|
18504
18507
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18505
18508
|
return vue.openBlock(), vue.createBlock(
|
|
18506
18509
|
$setup["VkfFormItem"],
|
|
@@ -18519,8 +18522,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18519
18522
|
}),
|
|
18520
18523
|
"model-value": $setup.containerFile?.name,
|
|
18521
18524
|
"prefix-icon": $setup.filePrefixIcon,
|
|
18522
|
-
placeholder: "\u8BF7\u9009\u62E9\u6587\u4EF6"
|
|
18523
|
-
}, null, 8, ["class", "model-value", "prefix-icon"]),
|
|
18525
|
+
placeholder: $setup.tr("vkf.uploadPlus.selectFile", "\u8BF7\u9009\u62E9\u6587\u4EF6")
|
|
18526
|
+
}, null, 8, ["class", "model-value", "prefix-icon", "placeholder"]),
|
|
18524
18527
|
$setup.fileStatus === $setup.Status.done ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
18525
18528
|
vue.createVNode($setup["ElIcon"], null, {
|
|
18526
18529
|
default: vue.withCtx(() => [
|
|
@@ -18529,15 +18532,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18529
18532
|
_: 1
|
|
18530
18533
|
/* STABLE */
|
|
18531
18534
|
}),
|
|
18532
|
-
|
|
18535
|
+
vue.createElementVNode(
|
|
18533
18536
|
"span",
|
|
18534
|
-
|
|
18535
|
-
" \u4E0A\u4F20\u6210\u529F
|
|
18536
|
-
|
|
18537
|
-
/*
|
|
18538
|
-
)
|
|
18537
|
+
_hoisted_4,
|
|
18538
|
+
vue.toDisplayString($setup.tr("vkf.uploadPlus.uploadSuccess", "\u4E0A\u4F20\u6210\u529F")),
|
|
18539
|
+
1
|
|
18540
|
+
/* TEXT */
|
|
18541
|
+
)
|
|
18539
18542
|
])) : vue.createCommentVNode("v-if", true),
|
|
18540
|
-
$setup.fileStatus === $setup.Status.uploading || $setup.fileStatus === $setup.Status.pause ? (vue.openBlock(), vue.createElementBlock("div",
|
|
18543
|
+
$setup.fileStatus === $setup.Status.uploading || $setup.fileStatus === $setup.Status.pause ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
18541
18544
|
(vue.openBlock(true), vue.createElementBlock(
|
|
18542
18545
|
vue.Fragment,
|
|
18543
18546
|
null,
|
|
@@ -18585,18 +18588,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18585
18588
|
class: "vkf-upload-plus-input",
|
|
18586
18589
|
accept: _ctx.accept,
|
|
18587
18590
|
onChange: $setup.handleFileChange
|
|
18588
|
-
}, null, 40,
|
|
18591
|
+
}, null, 40, _hoisted_6),
|
|
18589
18592
|
vue.createVNode($setup["ElButtonGroup"], { class: "vkf-upload-plus-btng" }, {
|
|
18590
18593
|
default: vue.withCtx(() => [
|
|
18591
18594
|
$setup.merging ? vue.withDirectives((vue.openBlock(), vue.createBlock($setup["ElButton"], {
|
|
18592
18595
|
key: 0,
|
|
18593
18596
|
type: "success"
|
|
18594
18597
|
}, {
|
|
18595
|
-
default: vue.withCtx(() =>
|
|
18596
|
-
vue.createTextVNode(
|
|
18597
|
-
|
|
18598
|
-
|
|
18599
|
-
|
|
18598
|
+
default: vue.withCtx(() => [
|
|
18599
|
+
vue.createTextVNode(
|
|
18600
|
+
vue.toDisplayString($setup.tr("vkf.uploadPlus.merge", "\u5408\u5E76")),
|
|
18601
|
+
1
|
|
18602
|
+
/* TEXT */
|
|
18603
|
+
)
|
|
18604
|
+
]),
|
|
18605
|
+
_: 1
|
|
18606
|
+
/* STABLE */
|
|
18600
18607
|
})), [
|
|
18601
18608
|
[$setup["vLoading"], $setup.merging]
|
|
18602
18609
|
]) : $setup.fileStatus === $setup.Status.uploading ? (vue.openBlock(), vue.createBlock($setup["ElButton"], {
|
|
@@ -18604,32 +18611,44 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18604
18611
|
type: "danger",
|
|
18605
18612
|
onClick: $setup.handlePause
|
|
18606
18613
|
}, {
|
|
18607
|
-
default: vue.withCtx(() =>
|
|
18608
|
-
vue.createTextVNode(
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
|
|
18614
|
+
default: vue.withCtx(() => [
|
|
18615
|
+
vue.createTextVNode(
|
|
18616
|
+
vue.toDisplayString($setup.tr("vkf.common.pause", "\u6682\u505C")),
|
|
18617
|
+
1
|
|
18618
|
+
/* TEXT */
|
|
18619
|
+
)
|
|
18620
|
+
]),
|
|
18621
|
+
_: 1
|
|
18622
|
+
/* STABLE */
|
|
18612
18623
|
})) : $setup.fileStatus === $setup.Status.done ? (vue.openBlock(), vue.createBlock($setup["ElButton"], {
|
|
18613
18624
|
key: 2,
|
|
18614
18625
|
type: "success",
|
|
18615
18626
|
disabled: ""
|
|
18616
18627
|
}, {
|
|
18617
|
-
default: vue.withCtx(() =>
|
|
18618
|
-
vue.createTextVNode(
|
|
18619
|
-
|
|
18620
|
-
|
|
18621
|
-
|
|
18628
|
+
default: vue.withCtx(() => [
|
|
18629
|
+
vue.createTextVNode(
|
|
18630
|
+
vue.toDisplayString($setup.tr("vkf.uploadPlus.uploaded", "\u5DF2\u4F20")),
|
|
18631
|
+
1
|
|
18632
|
+
/* TEXT */
|
|
18633
|
+
)
|
|
18634
|
+
]),
|
|
18635
|
+
_: 1
|
|
18636
|
+
/* STABLE */
|
|
18622
18637
|
})) : (vue.openBlock(), vue.createBlock($setup["ElButton"], {
|
|
18623
18638
|
key: 3,
|
|
18624
18639
|
type: "primary",
|
|
18625
18640
|
disabled: !$setup.containerFile,
|
|
18626
18641
|
onClick: $setup.handleUpload
|
|
18627
18642
|
}, {
|
|
18628
|
-
default: vue.withCtx(() =>
|
|
18629
|
-
vue.createTextVNode(
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18643
|
+
default: vue.withCtx(() => [
|
|
18644
|
+
vue.createTextVNode(
|
|
18645
|
+
vue.toDisplayString($setup.tr("vkf.common.upload", "\u4E0A\u4F20")),
|
|
18646
|
+
1
|
|
18647
|
+
/* TEXT */
|
|
18648
|
+
)
|
|
18649
|
+
]),
|
|
18650
|
+
_: 1
|
|
18651
|
+
/* STABLE */
|
|
18633
18652
|
}, 8, ["disabled"]))
|
|
18634
18653
|
]),
|
|
18635
18654
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, watchEffect, watch, ref, computed, onBeforeUnmount, openBlock, createBlock, mergeProps, withCtx, createElementVNode, createVNode, normalizeClass, createElementBlock, createCommentVNode, Fragment, renderList, normalizeStyle, withDirectives, createTextVNode } from 'vue';
|
|
1
|
+
import { defineComponent, watchEffect, watch, ref, computed, onBeforeUnmount, openBlock, createBlock, mergeProps, withCtx, createElementVNode, createVNode, normalizeClass, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList, normalizeStyle, withDirectives, createTextVNode } from 'vue';
|
|
2
2
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
3
3
|
import { ElMessage, ElInput, ElButtonGroup, ElButton, ElIcon, vLoading } from 'element-plus';
|
|
4
4
|
import { createFileChunk, calculateFileHashSample } from '@vunk/form/shared/upload';
|
|
@@ -10,6 +10,7 @@ import { restFetch as restFetch$1 } from '@skzz/platform/shared/fetch/platform';
|
|
|
10
10
|
import { l as success_filled_default, c as circle_close_filled_default, n as upload_filled_default } from '../index.mjs';
|
|
11
11
|
import { useModelComputed } from '@vunk/core/composables';
|
|
12
12
|
import { ToggleHandler } from '@vunk/shared/class';
|
|
13
|
+
import { useLocale } from '@vunk/form/composables/element-plus';
|
|
13
14
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
14
15
|
|
|
15
16
|
const props = {
|
|
@@ -18247,6 +18248,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18247
18248
|
const ToggleHandler$1 = ToggleHandler;
|
|
18248
18249
|
const props = __props;
|
|
18249
18250
|
const emit = __emit;
|
|
18251
|
+
const { tr } = useLocale();
|
|
18250
18252
|
const formItemBindProps = _VkfFormItemCtx.createBindProps(props);
|
|
18251
18253
|
const uuid = Math.random().toString(36).slice(-8);
|
|
18252
18254
|
const containerFile = useModelComputed({
|
|
@@ -18313,14 +18315,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18313
18315
|
fileStatus.value = Status.error;
|
|
18314
18316
|
ElMessage({
|
|
18315
18317
|
type: "error",
|
|
18316
|
-
message: "\u4E0A\u4F20\u5931\u8D25"
|
|
18318
|
+
message: tr("vkf.uploadPlus.uploadFailed", "\u4E0A\u4F20\u5931\u8D25")
|
|
18317
18319
|
});
|
|
18318
18320
|
return;
|
|
18319
18321
|
}
|
|
18320
18322
|
if (uploaded) {
|
|
18321
18323
|
ElMessage({
|
|
18322
18324
|
type: "success",
|
|
18323
|
-
message: "\u4E0A\u4F20\u6210\u529F"
|
|
18325
|
+
message: tr("vkf.uploadPlus.uploadSuccess", "\u4E0A\u4F20\u6210\u529F")
|
|
18324
18326
|
});
|
|
18325
18327
|
emit("success", mergedFile);
|
|
18326
18328
|
fileStatus.value = Status.done;
|
|
@@ -18354,7 +18356,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18354
18356
|
fileStatus.value = Status.error;
|
|
18355
18357
|
ElMessage({
|
|
18356
18358
|
type: "error",
|
|
18357
|
-
message: "\u4E0A\u4F20\u5931\u8D25"
|
|
18359
|
+
message: tr("vkf.uploadPlus.uploadFailed", "\u4E0A\u4F20\u5931\u8D25")
|
|
18358
18360
|
});
|
|
18359
18361
|
});
|
|
18360
18362
|
};
|
|
@@ -18435,7 +18437,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18435
18437
|
console.error("\u5408\u5E76\u5931\u8D25", err);
|
|
18436
18438
|
ElMessage({
|
|
18437
18439
|
type: "error",
|
|
18438
|
-
message: "\u5408\u5E76\u5931\u8D25"
|
|
18440
|
+
message: tr("vkf.uploadPlus.mergeFailed", "\u5408\u5E76\u5931\u8D25")
|
|
18439
18441
|
});
|
|
18440
18442
|
throw err;
|
|
18441
18443
|
}).finally(() => {
|
|
@@ -18466,7 +18468,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18466
18468
|
onBeforeUnmount(() => {
|
|
18467
18469
|
offlineToggle.remove();
|
|
18468
18470
|
});
|
|
18469
|
-
const __returned__ = { vLoading: vLoading$1, ToggleHandler: ToggleHandler$1, props, emit, formItemBindProps, uuid, containerFile, fileStatus, containerHash, chunks, uploadingXhrs, filePrefixIcon, handleFileChange, handleUpload, handlePause, cUploadedChunks, merging, cFile, OnlineToggle, offlineToggle, get VkfFormItem() {
|
|
18471
|
+
const __returned__ = { vLoading: vLoading$1, ToggleHandler: ToggleHandler$1, props, emit, tr, formItemBindProps, uuid, containerFile, fileStatus, containerHash, chunks, uploadingXhrs, filePrefixIcon, handleFileChange, handleUpload, handlePause, cUploadedChunks, merging, cFile, OnlineToggle, offlineToggle, get VkfFormItem() {
|
|
18470
18472
|
return VkfFormItem;
|
|
18471
18473
|
}, get ElInput() {
|
|
18472
18474
|
return ElInput;
|
|
@@ -18492,11 +18494,12 @@ const _hoisted_3 = {
|
|
|
18492
18494
|
key: 0,
|
|
18493
18495
|
class: "vkf-upload-plus-msg-x"
|
|
18494
18496
|
};
|
|
18495
|
-
const _hoisted_4 = {
|
|
18497
|
+
const _hoisted_4 = { class: "vkf-upload-plus-msg" };
|
|
18498
|
+
const _hoisted_5 = {
|
|
18496
18499
|
key: 1,
|
|
18497
18500
|
class: "vkf-upload-plus-cube-x"
|
|
18498
18501
|
};
|
|
18499
|
-
const
|
|
18502
|
+
const _hoisted_6 = ["id", "accept"];
|
|
18500
18503
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18501
18504
|
return openBlock(), createBlock(
|
|
18502
18505
|
$setup["VkfFormItem"],
|
|
@@ -18515,8 +18518,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18515
18518
|
}),
|
|
18516
18519
|
"model-value": $setup.containerFile?.name,
|
|
18517
18520
|
"prefix-icon": $setup.filePrefixIcon,
|
|
18518
|
-
placeholder: "\u8BF7\u9009\u62E9\u6587\u4EF6"
|
|
18519
|
-
}, null, 8, ["class", "model-value", "prefix-icon"]),
|
|
18521
|
+
placeholder: $setup.tr("vkf.uploadPlus.selectFile", "\u8BF7\u9009\u62E9\u6587\u4EF6")
|
|
18522
|
+
}, null, 8, ["class", "model-value", "prefix-icon", "placeholder"]),
|
|
18520
18523
|
$setup.fileStatus === $setup.Status.done ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
18521
18524
|
createVNode($setup["ElIcon"], null, {
|
|
18522
18525
|
default: withCtx(() => [
|
|
@@ -18525,15 +18528,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18525
18528
|
_: 1
|
|
18526
18529
|
/* STABLE */
|
|
18527
18530
|
}),
|
|
18528
|
-
|
|
18531
|
+
createElementVNode(
|
|
18529
18532
|
"span",
|
|
18530
|
-
|
|
18531
|
-
" \u4E0A\u4F20\u6210\u529F
|
|
18532
|
-
|
|
18533
|
-
/*
|
|
18534
|
-
)
|
|
18533
|
+
_hoisted_4,
|
|
18534
|
+
toDisplayString($setup.tr("vkf.uploadPlus.uploadSuccess", "\u4E0A\u4F20\u6210\u529F")),
|
|
18535
|
+
1
|
|
18536
|
+
/* TEXT */
|
|
18537
|
+
)
|
|
18535
18538
|
])) : createCommentVNode("v-if", true),
|
|
18536
|
-
$setup.fileStatus === $setup.Status.uploading || $setup.fileStatus === $setup.Status.pause ? (openBlock(), createElementBlock("div",
|
|
18539
|
+
$setup.fileStatus === $setup.Status.uploading || $setup.fileStatus === $setup.Status.pause ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
18537
18540
|
(openBlock(true), createElementBlock(
|
|
18538
18541
|
Fragment,
|
|
18539
18542
|
null,
|
|
@@ -18581,18 +18584,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18581
18584
|
class: "vkf-upload-plus-input",
|
|
18582
18585
|
accept: _ctx.accept,
|
|
18583
18586
|
onChange: $setup.handleFileChange
|
|
18584
|
-
}, null, 40,
|
|
18587
|
+
}, null, 40, _hoisted_6),
|
|
18585
18588
|
createVNode($setup["ElButtonGroup"], { class: "vkf-upload-plus-btng" }, {
|
|
18586
18589
|
default: withCtx(() => [
|
|
18587
18590
|
$setup.merging ? withDirectives((openBlock(), createBlock($setup["ElButton"], {
|
|
18588
18591
|
key: 0,
|
|
18589
18592
|
type: "success"
|
|
18590
18593
|
}, {
|
|
18591
|
-
default: withCtx(() =>
|
|
18592
|
-
createTextVNode(
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18594
|
+
default: withCtx(() => [
|
|
18595
|
+
createTextVNode(
|
|
18596
|
+
toDisplayString($setup.tr("vkf.uploadPlus.merge", "\u5408\u5E76")),
|
|
18597
|
+
1
|
|
18598
|
+
/* TEXT */
|
|
18599
|
+
)
|
|
18600
|
+
]),
|
|
18601
|
+
_: 1
|
|
18602
|
+
/* STABLE */
|
|
18596
18603
|
})), [
|
|
18597
18604
|
[$setup["vLoading"], $setup.merging]
|
|
18598
18605
|
]) : $setup.fileStatus === $setup.Status.uploading ? (openBlock(), createBlock($setup["ElButton"], {
|
|
@@ -18600,32 +18607,44 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18600
18607
|
type: "danger",
|
|
18601
18608
|
onClick: $setup.handlePause
|
|
18602
18609
|
}, {
|
|
18603
|
-
default: withCtx(() =>
|
|
18604
|
-
createTextVNode(
|
|
18605
|
-
|
|
18606
|
-
|
|
18607
|
-
|
|
18610
|
+
default: withCtx(() => [
|
|
18611
|
+
createTextVNode(
|
|
18612
|
+
toDisplayString($setup.tr("vkf.common.pause", "\u6682\u505C")),
|
|
18613
|
+
1
|
|
18614
|
+
/* TEXT */
|
|
18615
|
+
)
|
|
18616
|
+
]),
|
|
18617
|
+
_: 1
|
|
18618
|
+
/* STABLE */
|
|
18608
18619
|
})) : $setup.fileStatus === $setup.Status.done ? (openBlock(), createBlock($setup["ElButton"], {
|
|
18609
18620
|
key: 2,
|
|
18610
18621
|
type: "success",
|
|
18611
18622
|
disabled: ""
|
|
18612
18623
|
}, {
|
|
18613
|
-
default: withCtx(() =>
|
|
18614
|
-
createTextVNode(
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18624
|
+
default: withCtx(() => [
|
|
18625
|
+
createTextVNode(
|
|
18626
|
+
toDisplayString($setup.tr("vkf.uploadPlus.uploaded", "\u5DF2\u4F20")),
|
|
18627
|
+
1
|
|
18628
|
+
/* TEXT */
|
|
18629
|
+
)
|
|
18630
|
+
]),
|
|
18631
|
+
_: 1
|
|
18632
|
+
/* STABLE */
|
|
18618
18633
|
})) : (openBlock(), createBlock($setup["ElButton"], {
|
|
18619
18634
|
key: 3,
|
|
18620
18635
|
type: "primary",
|
|
18621
18636
|
disabled: !$setup.containerFile,
|
|
18622
18637
|
onClick: $setup.handleUpload
|
|
18623
18638
|
}, {
|
|
18624
|
-
default: withCtx(() =>
|
|
18625
|
-
createTextVNode(
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18639
|
+
default: withCtx(() => [
|
|
18640
|
+
createTextVNode(
|
|
18641
|
+
toDisplayString($setup.tr("vkf.common.upload", "\u4E0A\u4F20")),
|
|
18642
|
+
1
|
|
18643
|
+
/* TEXT */
|
|
18644
|
+
)
|
|
18645
|
+
]),
|
|
18646
|
+
_: 1
|
|
18647
|
+
/* STABLE */
|
|
18629
18648
|
}, 8, ["disabled"]))
|
|
18630
18649
|
]),
|
|
18631
18650
|
_: 1
|
|
@@ -248,6 +248,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
248
248
|
"onUpdate:file"?: (...args: any[] | unknown[]) => any;
|
|
249
249
|
}> & {}>;
|
|
250
250
|
emit: ((event: "success", file: FileInfo) => void) & ((event: "update:fileStatus", ...args: unknown[]) => void) & ((event: "update:fileStatus", ...args: any) => void) & ((event: "update:fileStatus", ...args: any[]) => void) & ((event: "update:file", ...args: unknown[]) => void) & ((event: "update:file", ...args: any) => void) & ((event: "update:file", ...args: any[]) => void);
|
|
251
|
+
tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
|
|
251
252
|
formItemBindProps: import("vue").ComputedRef<{}>;
|
|
252
253
|
uuid: string;
|
|
253
254
|
containerFile: import("vue").WritableComputedRef<File, File>;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var formItem = require('@vunk/form/components/form-item');
|
|
6
6
|
var vue = require('vue');
|
|
7
7
|
var composables = require('@vunk/form/composables');
|
|
8
|
+
var elementPlus$1 = require('@vunk/form/composables/element-plus');
|
|
8
9
|
var vant = require('vant');
|
|
9
10
|
var ui = require('@varlet/ui');
|
|
10
11
|
var elementPlus = require('element-plus');
|
|
@@ -134,10 +135,11 @@ var _sfc_main = vue.defineComponent({
|
|
|
134
135
|
ElTabPane: elementPlus.ElTabPane,
|
|
135
136
|
ElTabs: elementPlus.ElTabs
|
|
136
137
|
},
|
|
137
|
-
emits,
|
|
138
138
|
props,
|
|
139
|
+
emits,
|
|
139
140
|
setup(props2, { emit }) {
|
|
140
141
|
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
142
|
+
const { tr } = elementPlus$1.useLocale();
|
|
141
143
|
const varDatePickerType = vue.computed(() => {
|
|
142
144
|
return ElDatePickerTypeReflect[props2.type].varDatePickerType;
|
|
143
145
|
});
|
|
@@ -217,7 +219,8 @@ var _sfc_main = vue.defineComponent({
|
|
|
217
219
|
hasTime,
|
|
218
220
|
currentTab,
|
|
219
221
|
valueTime,
|
|
220
|
-
valueDate
|
|
222
|
+
valueDate,
|
|
223
|
+
tr
|
|
221
224
|
};
|
|
222
225
|
}
|
|
223
226
|
});
|
|
@@ -244,49 +247,49 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
244
247
|
vue.createVNode(_component_ElDatePicker, {
|
|
245
248
|
"popper-class": "var-datetime-picker-el-popover",
|
|
246
249
|
"model-value": _ctx.modelValue,
|
|
247
|
-
onFocus: _ctx.inputBlur,
|
|
248
250
|
type: _ctx.type,
|
|
249
251
|
readonly: true,
|
|
250
|
-
"value-format": _ctx.valueFormat
|
|
251
|
-
|
|
252
|
+
"value-format": _ctx.valueFormat,
|
|
253
|
+
onFocus: _ctx.inputBlur
|
|
254
|
+
}, null, 8, ["model-value", "type", "value-format", "onFocus"])
|
|
252
255
|
],
|
|
253
256
|
32
|
|
254
257
|
/* NEED_HYDRATION */
|
|
255
258
|
),
|
|
256
259
|
vue.createVNode(_component_Popup, {
|
|
257
|
-
position: "bottom",
|
|
258
260
|
show: _ctx.popupShow,
|
|
259
261
|
"onUpdate:show": _cache[4] || (_cache[4] = ($event) => _ctx.popupShow = $event),
|
|
262
|
+
position: "bottom",
|
|
260
263
|
round: ""
|
|
261
264
|
}, {
|
|
262
265
|
default: vue.withCtx(() => [
|
|
263
266
|
vue.createVNode(_component_ElTabs, {
|
|
267
|
+
modelValue: _ctx.currentTab,
|
|
268
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.currentTab = $event),
|
|
264
269
|
class: vue.normalizeClass(["var-datetime-picker-el-tabs", {
|
|
265
270
|
"is-hidden": !_ctx.hasTime
|
|
266
|
-
}])
|
|
267
|
-
modelValue: _ctx.currentTab,
|
|
268
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.currentTab = $event)
|
|
271
|
+
}])
|
|
269
272
|
}, {
|
|
270
273
|
default: vue.withCtx(() => [
|
|
271
274
|
vue.createVNode(_component_ElTabPane, {
|
|
272
|
-
label: _ctx.valueDate || "\u9009\u62E9\u65E5\u671F",
|
|
275
|
+
label: _ctx.valueDate || _ctx.tr("el.datepicker.selectDate", "\u9009\u62E9\u65E5\u671F"),
|
|
273
276
|
name: "date"
|
|
274
277
|
}, {
|
|
275
278
|
default: vue.withCtx(() => [
|
|
276
279
|
vue.createVNode(_component_DatePicker, {
|
|
277
|
-
type: _ctx.varDatePickerType,
|
|
278
|
-
range: _ctx.isRange,
|
|
279
280
|
modelValue: _ctx.valueDate,
|
|
280
281
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.valueDate = $event),
|
|
282
|
+
type: _ctx.varDatePickerType,
|
|
283
|
+
range: _ctx.isRange,
|
|
281
284
|
"allowed-dates": _ctx.allowedDates
|
|
282
|
-
}, null, 8, ["
|
|
285
|
+
}, null, 8, ["modelValue", "type", "range", "allowed-dates"])
|
|
283
286
|
]),
|
|
284
287
|
_: 1
|
|
285
288
|
/* STABLE */
|
|
286
289
|
}, 8, ["label"]),
|
|
287
290
|
_ctx.hasTime ? (vue.openBlock(), vue.createBlock(_component_ElTabPane, {
|
|
288
291
|
key: 0,
|
|
289
|
-
label: _ctx.valueTime || "\u9009\u62E9\u65F6\u95F4",
|
|
292
|
+
label: _ctx.valueTime || _ctx.tr("el.datepicker.selectTime", "\u9009\u62E9\u65F6\u95F4"),
|
|
290
293
|
name: "time"
|
|
291
294
|
}, {
|
|
292
295
|
default: vue.withCtx(() => [
|
|
@@ -302,7 +305,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
302
305
|
]),
|
|
303
306
|
_: 1
|
|
304
307
|
/* STABLE */
|
|
305
|
-
}, 8, ["
|
|
308
|
+
}, 8, ["modelValue", "class"])
|
|
306
309
|
]),
|
|
307
310
|
_: 1
|
|
308
311
|
/* STABLE */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
2
|
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode, createVNode, normalizeClass, createCommentVNode } from 'vue';
|
|
3
3
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
4
|
+
import { useLocale } from '@vunk/form/composables/element-plus';
|
|
4
5
|
import { Popup } from 'vant';
|
|
5
6
|
import { DatePicker, TimePicker } from '@varlet/ui';
|
|
6
7
|
import { ElDatePicker, ElTabPane, ElTabs, dayjs } from 'element-plus';
|
|
@@ -130,10 +131,11 @@ var _sfc_main = defineComponent({
|
|
|
130
131
|
ElTabPane,
|
|
131
132
|
ElTabs
|
|
132
133
|
},
|
|
133
|
-
emits,
|
|
134
134
|
props,
|
|
135
|
+
emits,
|
|
135
136
|
setup(props2, { emit }) {
|
|
136
137
|
const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
|
|
138
|
+
const { tr } = useLocale();
|
|
137
139
|
const varDatePickerType = computed(() => {
|
|
138
140
|
return ElDatePickerTypeReflect[props2.type].varDatePickerType;
|
|
139
141
|
});
|
|
@@ -213,7 +215,8 @@ var _sfc_main = defineComponent({
|
|
|
213
215
|
hasTime,
|
|
214
216
|
currentTab,
|
|
215
217
|
valueTime,
|
|
216
|
-
valueDate
|
|
218
|
+
valueDate,
|
|
219
|
+
tr
|
|
217
220
|
};
|
|
218
221
|
}
|
|
219
222
|
});
|
|
@@ -240,49 +243,49 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
240
243
|
createVNode(_component_ElDatePicker, {
|
|
241
244
|
"popper-class": "var-datetime-picker-el-popover",
|
|
242
245
|
"model-value": _ctx.modelValue,
|
|
243
|
-
onFocus: _ctx.inputBlur,
|
|
244
246
|
type: _ctx.type,
|
|
245
247
|
readonly: true,
|
|
246
|
-
"value-format": _ctx.valueFormat
|
|
247
|
-
|
|
248
|
+
"value-format": _ctx.valueFormat,
|
|
249
|
+
onFocus: _ctx.inputBlur
|
|
250
|
+
}, null, 8, ["model-value", "type", "value-format", "onFocus"])
|
|
248
251
|
],
|
|
249
252
|
32
|
|
250
253
|
/* NEED_HYDRATION */
|
|
251
254
|
),
|
|
252
255
|
createVNode(_component_Popup, {
|
|
253
|
-
position: "bottom",
|
|
254
256
|
show: _ctx.popupShow,
|
|
255
257
|
"onUpdate:show": _cache[4] || (_cache[4] = ($event) => _ctx.popupShow = $event),
|
|
258
|
+
position: "bottom",
|
|
256
259
|
round: ""
|
|
257
260
|
}, {
|
|
258
261
|
default: withCtx(() => [
|
|
259
262
|
createVNode(_component_ElTabs, {
|
|
263
|
+
modelValue: _ctx.currentTab,
|
|
264
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.currentTab = $event),
|
|
260
265
|
class: normalizeClass(["var-datetime-picker-el-tabs", {
|
|
261
266
|
"is-hidden": !_ctx.hasTime
|
|
262
|
-
}])
|
|
263
|
-
modelValue: _ctx.currentTab,
|
|
264
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.currentTab = $event)
|
|
267
|
+
}])
|
|
265
268
|
}, {
|
|
266
269
|
default: withCtx(() => [
|
|
267
270
|
createVNode(_component_ElTabPane, {
|
|
268
|
-
label: _ctx.valueDate || "\u9009\u62E9\u65E5\u671F",
|
|
271
|
+
label: _ctx.valueDate || _ctx.tr("el.datepicker.selectDate", "\u9009\u62E9\u65E5\u671F"),
|
|
269
272
|
name: "date"
|
|
270
273
|
}, {
|
|
271
274
|
default: withCtx(() => [
|
|
272
275
|
createVNode(_component_DatePicker, {
|
|
273
|
-
type: _ctx.varDatePickerType,
|
|
274
|
-
range: _ctx.isRange,
|
|
275
276
|
modelValue: _ctx.valueDate,
|
|
276
277
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.valueDate = $event),
|
|
278
|
+
type: _ctx.varDatePickerType,
|
|
279
|
+
range: _ctx.isRange,
|
|
277
280
|
"allowed-dates": _ctx.allowedDates
|
|
278
|
-
}, null, 8, ["
|
|
281
|
+
}, null, 8, ["modelValue", "type", "range", "allowed-dates"])
|
|
279
282
|
]),
|
|
280
283
|
_: 1
|
|
281
284
|
/* STABLE */
|
|
282
285
|
}, 8, ["label"]),
|
|
283
286
|
_ctx.hasTime ? (openBlock(), createBlock(_component_ElTabPane, {
|
|
284
287
|
key: 0,
|
|
285
|
-
label: _ctx.valueTime || "\u9009\u62E9\u65F6\u95F4",
|
|
288
|
+
label: _ctx.valueTime || _ctx.tr("el.datepicker.selectTime", "\u9009\u62E9\u65F6\u95F4"),
|
|
286
289
|
name: "time"
|
|
287
290
|
}, {
|
|
288
291
|
default: withCtx(() => [
|
|
@@ -298,7 +301,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
298
301
|
]),
|
|
299
302
|
_: 1
|
|
300
303
|
/* STABLE */
|
|
301
|
-
}, 8, ["
|
|
304
|
+
}, 8, ["modelValue", "class"])
|
|
302
305
|
]),
|
|
303
306
|
_: 1
|
|
304
307
|
/* STABLE */
|
|
@@ -115,6 +115,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
115
115
|
currentTab: import("vue").Ref<string, string>;
|
|
116
116
|
valueTime: import("vue").WritableComputedRef<string, string>;
|
|
117
117
|
valueDate: import("vue").WritableComputedRef<string, string>;
|
|
118
|
+
tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
|
|
118
119
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
119
120
|
'update:modelValue': any;
|
|
120
121
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var elementPlus = require('element-plus');
|
|
4
|
+
|
|
5
|
+
const translateFallback = (fallback, option) => {
|
|
6
|
+
return fallback.replace(
|
|
7
|
+
/\{(\w+)\}/g,
|
|
8
|
+
(_, key) => `${option?.[key] ?? `{${key}}`}`
|
|
9
|
+
);
|
|
10
|
+
};
|
|
11
|
+
const useLocale = (localeOverrides) => {
|
|
12
|
+
const locale = elementPlus.useLocale(localeOverrides);
|
|
13
|
+
const tr = (path, fallback, option) => {
|
|
14
|
+
const value = locale.t(path, option);
|
|
15
|
+
return value === path ? translateFallback(fallback, option) : value;
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
...locale,
|
|
19
|
+
tr
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.useLocale = useLocale;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLocale';
|