@maxax/ui 1.1.37 → 1.1.39
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/components/basic-button-import-max/BasicButtonImportMax.vue.d.ts +22 -14
- package/dist/components/basic-button-import-max/BasicButtonImportMax.vue.d.ts.map +1 -1
- package/dist/components/basic-button-import-max/{BasicButtonImportMaxModal.vue.d.ts → PreviewModal.vue.d.ts} +10 -8
- package/dist/components/basic-button-import-max/PreviewModal.vue.d.ts.map +1 -0
- package/dist/components/basic-button-import-max/{BasicButtonImportUploadModal.vue.d.ts → UploadModal.vue.d.ts} +4 -4
- package/dist/components/basic-button-import-max/UploadModal.vue.d.ts.map +1 -0
- package/dist/components/basic-button-import-max/interface.d.ts +19 -10
- package/dist/components/basic-button-import-max/interface.d.ts.map +1 -1
- package/dist/components/basic-table/format.d.ts.map +1 -1
- package/dist/i18n-BuUiimFQ.cjs +5698 -0
- package/dist/i18n-BuUiimFQ.cjs.map +1 -0
- package/dist/i18n-YnPB7vlv.js +5683 -0
- package/dist/i18n-YnPB7vlv.js.map +1 -0
- package/dist/index.cjs +2346 -2330
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +171 -155
- package/dist/index.mjs.map +1 -1
- package/dist/locale/i18n.d.ts +6 -0
- package/dist/locale/i18n.d.ts.map +1 -0
- package/dist/locale/lang/en.d.ts.map +1 -1
- package/dist/locale/lang/zh-cn.d.ts.map +1 -1
- package/dist/locales.cjs +8 -125
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.d.ts +1 -0
- package/dist/locales.d.ts.map +1 -1
- package/dist/locales.mjs +6 -123
- package/dist/locales.mjs.map +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/light.css +1 -1
- package/package.json +4 -3
- package/dist/components/basic-button-import-max/BasicButtonImportMaxModal.vue.d.ts.map +0 -1
- package/dist/components/basic-button-import-max/BasicButtonImportUploadModal.vue.d.ts.map +0 -1
- package/dist/utils-1HQXBF85.js +0 -147
- package/dist/utils-1HQXBF85.js.map +0 -1
- package/dist/utils-Di7K635D.cjs +0 -146
- package/dist/utils-Di7K635D.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { camelize, isNumber, isString, removeClass, addClass, pascalCase, isClie
|
|
|
2
2
|
import { shallowRef, shallowReadonly, onUnmounted, onMounted, nextTick, getCurrentScope, onScopeDispose, toValue, getCurrentInstance, watch, computed, unref, Fragment, isVNode, Comment, Text, watchEffect, onBeforeUnmount, inject, ref, isRef, toRaw, defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, h, useAttrs, mergeProps, createBlock, createCommentVNode, withCtx, createTextVNode, toDisplayString, createVNode, useSlots, createSlots, provide, reactive, toRefs, resolveComponent, Transition, withDirectives, withModifiers, normalizeStyle, withKeys, resolveDynamicComponent, vShow, render as render$1, useTemplateRef, renderList, normalizeProps, guardReactiveProps, triggerRef, TransitionGroup, toRef, vModelText, createApp, toHandlers, mergeDefaults } from "vue";
|
|
3
3
|
import BScroll from "@better-scroll/core";
|
|
4
4
|
import { NTooltip, NButton, NInput, NButtonGroup, NDropdown, NModal, NProgress, NSwitch, NCard, NCascader, NDatePicker, NDrawer, NDrawerContent, NSelect, NInputNumber, NUpload, NAutoComplete, NDynamicTags, NTreeSelect, NTimePicker, NCheckbox, NCheckboxGroup, NRadio, NRadioButton, NRadioGroup, NSlider, NTransfer, NDivider, NColorPicker, NRate, NCol, NFormItem, NForm, NRow, NPopover, NTabs, NTabPane, NScrollbar, NEmpty, NPagination, NSpin } from "naive-ui";
|
|
5
|
-
import { b as buildLocaleContext, z as zhCN } from "./
|
|
5
|
+
import { b as buildLocaleContext, z as zhCN, t } from "./i18n-YnPB7vlv.js";
|
|
6
6
|
import { merge, cloneDeep as cloneDeep$1, uniqBy, isBoolean as isBoolean$1, isFunction as isFunction$1, isArray as isArray$1, isString as isString$1, isEqual, get, concat, partition, omit, has, set, unset, isNumber as isNumber$1, isPlainObject } from "lodash-es";
|
|
7
7
|
import { VxePager } from "vxe-pc-ui";
|
|
8
8
|
import { VxeUI, VxePager as VxePager2 } from "vxe-pc-ui";
|
|
@@ -426,8 +426,8 @@ function createEasingFunction([p0, p1, p2, p3]) {
|
|
|
426
426
|
const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;
|
|
427
427
|
const b = (a1, a2) => 3 * a2 - 6 * a1;
|
|
428
428
|
const c = (a1) => 3 * a1;
|
|
429
|
-
const calcBezier = (
|
|
430
|
-
const getSlope = (
|
|
429
|
+
const calcBezier = (t2, a1, a2) => ((a(a1, a2) * t2 + b(a1, a2)) * t2 + c(a1)) * t2;
|
|
430
|
+
const getSlope = (t2, a1, a2) => 3 * a(a1, a2) * t2 * t2 + 2 * b(a1, a2) * t2 + c(a1);
|
|
431
431
|
const getTforX = (x) => {
|
|
432
432
|
let aGuessT = x;
|
|
433
433
|
for (let i = 0; i < 4; ++i) {
|
|
@@ -443,11 +443,11 @@ function createEasingFunction([p0, p1, p2, p3]) {
|
|
|
443
443
|
function lerp(a, b, alpha) {
|
|
444
444
|
return a + alpha * (b - a);
|
|
445
445
|
}
|
|
446
|
-
function defaultInterpolation(a, b,
|
|
446
|
+
function defaultInterpolation(a, b, t2) {
|
|
447
447
|
const aVal = toValue(a);
|
|
448
448
|
const bVal = toValue(b);
|
|
449
|
-
if (typeof aVal === "number" && typeof bVal === "number") return lerp(aVal, bVal,
|
|
450
|
-
if (Array.isArray(aVal) && Array.isArray(bVal)) return aVal.map((v, i) => lerp(v, toValue(bVal[i]),
|
|
449
|
+
if (typeof aVal === "number" && typeof bVal === "number") return lerp(aVal, bVal, t2);
|
|
450
|
+
if (Array.isArray(aVal) && Array.isArray(bVal)) return aVal.map((v, i) => lerp(v, toValue(bVal[i]), t2));
|
|
451
451
|
throw new TypeError("Unknown transition type, specify an interpolation function.");
|
|
452
452
|
}
|
|
453
453
|
function normalizeEasing(easing) {
|
|
@@ -810,13 +810,13 @@ function useLocale(localeOverrides) {
|
|
|
810
810
|
return buildLocaleContext(computed(() => locale.value || zhCN));
|
|
811
811
|
}
|
|
812
812
|
function useBasicDrawerModal(params = {}) {
|
|
813
|
-
const { t } = useLocale();
|
|
813
|
+
const { t: t2 } = useLocale();
|
|
814
814
|
const visibleRef = ref(false);
|
|
815
815
|
const { bool: loadingRef, setTrue: showLoading, setFalse: hideLoading } = useBoolean();
|
|
816
816
|
const typeRef = ref("other");
|
|
817
817
|
const dataRef = ref({});
|
|
818
818
|
const titleRef = computed(() => {
|
|
819
|
-
return
|
|
819
|
+
return t2(`max.basic.${typeRef.value}`) || "";
|
|
820
820
|
});
|
|
821
821
|
function show(context) {
|
|
822
822
|
var _a;
|
|
@@ -2956,11 +2956,11 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
2956
2956
|
full: { type: Boolean }
|
|
2957
2957
|
},
|
|
2958
2958
|
setup(__props) {
|
|
2959
|
-
const { t } = useLocale();
|
|
2959
|
+
const { t: t2 } = useLocale();
|
|
2960
2960
|
return (_ctx, _cache) => {
|
|
2961
2961
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
2962
2962
|
key: String(__props.full),
|
|
2963
|
-
"tooltip-content": __props.full ? unref(
|
|
2963
|
+
"tooltip-content": __props.full ? unref(t2)("max.icon.fullscreenExit") : unref(t2)("max.icon.fullscreen")
|
|
2964
2964
|
}, {
|
|
2965
2965
|
default: withCtx(() => [
|
|
2966
2966
|
__props.full ? (openBlock(), createBlock(unref(XBasicSvgIcon), {
|
|
@@ -3025,7 +3025,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
3025
3025
|
},
|
|
3026
3026
|
setup(__props) {
|
|
3027
3027
|
const props = __props;
|
|
3028
|
-
const { t } = useLocale();
|
|
3028
|
+
const { t: t2 } = useLocale();
|
|
3029
3029
|
const icon = computed(() => {
|
|
3030
3030
|
const icons = {
|
|
3031
3031
|
0: {
|
|
@@ -3044,7 +3044,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
3044
3044
|
return (_ctx, _cache) => {
|
|
3045
3045
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
3046
3046
|
key: String(__props.collapsed),
|
|
3047
|
-
"tooltip-content": __props.collapsed ? unref(
|
|
3047
|
+
"tooltip-content": __props.collapsed ? unref(t2)("max.icon.expand") : unref(t2)("max.icon.collapse"),
|
|
3048
3048
|
"tooltip-placement": "bottom-start",
|
|
3049
3049
|
"z-index": __props.zIndex
|
|
3050
3050
|
}, {
|
|
@@ -3063,11 +3063,11 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
3063
3063
|
},
|
|
3064
3064
|
setup(__props) {
|
|
3065
3065
|
const props = __props;
|
|
3066
|
-
const { t } = useLocale();
|
|
3066
|
+
const { t: t2 } = useLocale();
|
|
3067
3067
|
const icon = computed(() => props.pin ? "mdi-pin-off" : "mdi-pin");
|
|
3068
3068
|
return (_ctx, _cache) => {
|
|
3069
3069
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
3070
|
-
"tooltip-content": __props.pin ? unref(
|
|
3070
|
+
"tooltip-content": __props.pin ? unref(t2)("max.icon.unpin") : unref(t2)("max.icon.pin"),
|
|
3071
3071
|
"tooltip-placement": "bottom-start",
|
|
3072
3072
|
"z-index": 100
|
|
3073
3073
|
}, {
|
|
@@ -3085,11 +3085,11 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
3085
3085
|
loading: { type: Boolean }
|
|
3086
3086
|
},
|
|
3087
3087
|
setup(__props) {
|
|
3088
|
-
const { t } = useLocale();
|
|
3088
|
+
const { t: t2 } = useLocale();
|
|
3089
3089
|
const { b } = useNamespace("reload-button");
|
|
3090
3090
|
return (_ctx, _cache) => {
|
|
3091
3091
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
3092
|
-
"tooltip-content": unref(
|
|
3092
|
+
"tooltip-content": unref(t2)("max.icon.reload")
|
|
3093
3093
|
}, {
|
|
3094
3094
|
default: withCtx(() => [
|
|
3095
3095
|
createVNode(unref(XBasicSvgIcon), {
|
|
@@ -3396,7 +3396,7 @@ const _sfc_main$U = defineComponent({
|
|
|
3396
3396
|
emits: ["vanish", "action"],
|
|
3397
3397
|
setup(props, { emit }) {
|
|
3398
3398
|
const { locale, zIndex: zIndex2, ns, themeOverrides } = useConfigProvider("basic-message-box");
|
|
3399
|
-
const { t } = locale;
|
|
3399
|
+
const { t: t2 } = locale;
|
|
3400
3400
|
const { nextZIndex } = zIndex2;
|
|
3401
3401
|
const visible = ref(false);
|
|
3402
3402
|
const iconMap = {
|
|
@@ -3463,7 +3463,7 @@ const _sfc_main$U = defineComponent({
|
|
|
3463
3463
|
if (props.boxType === "prompt") {
|
|
3464
3464
|
const inputPattern = state.inputPattern;
|
|
3465
3465
|
if (state.inputValue && inputPattern && !inputPattern.test(state.inputValue || "")) {
|
|
3466
|
-
state.editorErrorMessage = state.inputErrorMessage ||
|
|
3466
|
+
state.editorErrorMessage = state.inputErrorMessage || t2("max.messagebox.error");
|
|
3467
3467
|
state.validateError = true;
|
|
3468
3468
|
return false;
|
|
3469
3469
|
}
|
|
@@ -3471,7 +3471,7 @@ const _sfc_main$U = defineComponent({
|
|
|
3471
3471
|
if (isFunction(inputValidator)) {
|
|
3472
3472
|
const validateResult = inputValidator(state.inputValue);
|
|
3473
3473
|
if (validateResult === false) {
|
|
3474
|
-
state.editorErrorMessage = state.inputErrorMessage ||
|
|
3474
|
+
state.editorErrorMessage = state.inputErrorMessage || t2("max.messagebox.error");
|
|
3475
3475
|
state.validateError = true;
|
|
3476
3476
|
return false;
|
|
3477
3477
|
}
|
|
@@ -3592,7 +3592,7 @@ const _sfc_main$U = defineComponent({
|
|
|
3592
3592
|
return {
|
|
3593
3593
|
...toRefs(state),
|
|
3594
3594
|
ns,
|
|
3595
|
-
t,
|
|
3595
|
+
t: t2,
|
|
3596
3596
|
overlayEvent,
|
|
3597
3597
|
visible,
|
|
3598
3598
|
hasMessage,
|
|
@@ -3935,9 +3935,9 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3935
3935
|
const props = __props;
|
|
3936
3936
|
const emit = __emit;
|
|
3937
3937
|
const { b, e } = useNamespace("basic-action-footer");
|
|
3938
|
-
const { t } = useLocale();
|
|
3938
|
+
const { t: t2 } = useLocale();
|
|
3939
3939
|
function onDeleteClickHandler() {
|
|
3940
|
-
XBasicMessageBox.confirm(
|
|
3940
|
+
XBasicMessageBox.confirm(t2("max.notification.delete"), t2("max.basic.warning")).then(() => {
|
|
3941
3941
|
emit("delete");
|
|
3942
3942
|
}).catch(() => {
|
|
3943
3943
|
});
|
|
@@ -4040,7 +4040,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
4040
4040
|
emits: ["click"],
|
|
4041
4041
|
setup(__props, { emit: __emit }) {
|
|
4042
4042
|
const emit = __emit;
|
|
4043
|
-
const { t } = useLocale();
|
|
4043
|
+
const { t: t2 } = useLocale();
|
|
4044
4044
|
const attrs = useAttrs();
|
|
4045
4045
|
function onClickHandler() {
|
|
4046
4046
|
emit("click");
|
|
@@ -4052,7 +4052,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
4052
4052
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
4053
4053
|
default: withCtx(() => [
|
|
4054
4054
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4055
|
-
createTextVNode(toDisplayString(unref(
|
|
4055
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.add")), 1)
|
|
4056
4056
|
])
|
|
4057
4057
|
]),
|
|
4058
4058
|
_: 3
|
|
@@ -4065,7 +4065,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4065
4065
|
emits: ["click"],
|
|
4066
4066
|
setup(__props, { emit: __emit }) {
|
|
4067
4067
|
const emit = __emit;
|
|
4068
|
-
const { t } = useLocale();
|
|
4068
|
+
const { t: t2 } = useLocale();
|
|
4069
4069
|
const attrs = useAttrs();
|
|
4070
4070
|
function onClickHandler() {
|
|
4071
4071
|
emit("click");
|
|
@@ -4077,7 +4077,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4077
4077
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
4078
4078
|
default: withCtx(() => [
|
|
4079
4079
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4080
|
-
createTextVNode(toDisplayString(unref(
|
|
4080
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.delete")), 1)
|
|
4081
4081
|
])
|
|
4082
4082
|
]),
|
|
4083
4083
|
_: 3
|
|
@@ -4155,7 +4155,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
4155
4155
|
emits: ["click"],
|
|
4156
4156
|
setup(__props, { emit: __emit }) {
|
|
4157
4157
|
const emit = __emit;
|
|
4158
|
-
const { t } = useLocale();
|
|
4158
|
+
const { t: t2 } = useLocale();
|
|
4159
4159
|
const attrs = useAttrs();
|
|
4160
4160
|
function onClickHandler() {
|
|
4161
4161
|
emit("click");
|
|
@@ -4167,7 +4167,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
4167
4167
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
4168
4168
|
default: withCtx(() => [
|
|
4169
4169
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4170
|
-
createTextVNode(toDisplayString(unref(
|
|
4170
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.edit")), 1)
|
|
4171
4171
|
])
|
|
4172
4172
|
]),
|
|
4173
4173
|
_: 3
|
|
@@ -4188,7 +4188,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4188
4188
|
},
|
|
4189
4189
|
setup(__props) {
|
|
4190
4190
|
const props = __props;
|
|
4191
|
-
const { t } = useLocale();
|
|
4191
|
+
const { t: t2 } = useLocale();
|
|
4192
4192
|
const attrs = useAttrs();
|
|
4193
4193
|
async function downloadFileRemote() {
|
|
4194
4194
|
if (!props.exportApi) return false;
|
|
@@ -4218,7 +4218,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4218
4218
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
4219
4219
|
default: withCtx(() => [
|
|
4220
4220
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4221
|
-
createTextVNode(toDisplayString(unref(
|
|
4221
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.export")), 1)
|
|
4222
4222
|
])
|
|
4223
4223
|
]),
|
|
4224
4224
|
_: 3
|
|
@@ -4276,7 +4276,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
4276
4276
|
setup(__props, { emit: __emit }) {
|
|
4277
4277
|
const props = __props;
|
|
4278
4278
|
const emit = __emit;
|
|
4279
|
-
const { t } = useLocale();
|
|
4279
|
+
const { t: t2 } = useLocale();
|
|
4280
4280
|
const attrs = useAttrs();
|
|
4281
4281
|
const uid2 = ref(guid());
|
|
4282
4282
|
const fileInputRef = useTemplateRef("fileInputRef");
|
|
@@ -4353,7 +4353,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
4353
4353
|
onChange: onFileChange
|
|
4354
4354
|
}, null, 44, _hoisted_1$b)),
|
|
4355
4355
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4356
|
-
createTextVNode(toDisplayString(unref(
|
|
4356
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.import")), 1)
|
|
4357
4357
|
])
|
|
4358
4358
|
]),
|
|
4359
4359
|
_: 3
|
|
@@ -4366,7 +4366,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
4366
4366
|
emits: ["click"],
|
|
4367
4367
|
setup(__props, { emit: __emit }) {
|
|
4368
4368
|
const emit = __emit;
|
|
4369
|
-
const { t } = useLocale();
|
|
4369
|
+
const { t: t2 } = useLocale();
|
|
4370
4370
|
const attrs = useAttrs();
|
|
4371
4371
|
function onClickHandler() {
|
|
4372
4372
|
emit("click");
|
|
@@ -4378,7 +4378,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
4378
4378
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
4379
4379
|
default: withCtx(() => [
|
|
4380
4380
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4381
|
-
createTextVNode(toDisplayString(unref(
|
|
4381
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.print")), 1)
|
|
4382
4382
|
])
|
|
4383
4383
|
]),
|
|
4384
4384
|
_: 3
|
|
@@ -4667,7 +4667,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
4667
4667
|
const progressVisible = ref(false);
|
|
4668
4668
|
const progressPercent = ref(0);
|
|
4669
4669
|
const attrs = useAttrs();
|
|
4670
|
-
const { t } = useLocale();
|
|
4670
|
+
const { t: t2 } = useLocale();
|
|
4671
4671
|
const cOptions = computed(() => {
|
|
4672
4672
|
var _a;
|
|
4673
4673
|
return ((_a = props.options) != null ? _a : []).map((option) => {
|
|
@@ -4736,7 +4736,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
4736
4736
|
}, unref(attrs), { onClick: onMultiExportClick }), {
|
|
4737
4737
|
default: withCtx(() => [
|
|
4738
4738
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4739
|
-
createTextVNode(toDisplayString(unref(
|
|
4739
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.export")), 1)
|
|
4740
4740
|
])
|
|
4741
4741
|
]),
|
|
4742
4742
|
_: 3
|
|
@@ -4747,7 +4747,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
4747
4747
|
}, unref(attrs), { onClick: onSingleExportClick }), {
|
|
4748
4748
|
default: withCtx(() => [
|
|
4749
4749
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4750
|
-
createTextVNode(toDisplayString(unref(
|
|
4750
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.export")), 1)
|
|
4751
4751
|
])
|
|
4752
4752
|
]),
|
|
4753
4753
|
_: 3
|
|
@@ -4770,7 +4770,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
4770
4770
|
type: "circle",
|
|
4771
4771
|
percentage: progressPercent.value
|
|
4772
4772
|
}, null, 8, ["percentage"]),
|
|
4773
|
-
createElementVNode("p", null, toDisplayString(unref(
|
|
4773
|
+
createElementVNode("p", null, toDisplayString(unref(t2)("max.basic.downloading")), 1)
|
|
4774
4774
|
], 2)
|
|
4775
4775
|
], 2)
|
|
4776
4776
|
]),
|
|
@@ -5151,7 +5151,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5151
5151
|
emits: ["click"],
|
|
5152
5152
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
5153
5153
|
const props = __props;
|
|
5154
|
-
const { t } = useLocale();
|
|
5154
|
+
const { t: t2 } = useLocale();
|
|
5155
5155
|
const attrs = useAttrs();
|
|
5156
5156
|
const schemaRef = ref(null);
|
|
5157
5157
|
ref(null);
|
|
@@ -5201,7 +5201,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5201
5201
|
return;
|
|
5202
5202
|
}
|
|
5203
5203
|
if (schema.message) {
|
|
5204
|
-
XBasicMessageBox.confirm(schema.message,
|
|
5204
|
+
XBasicMessageBox.confirm(schema.message, t2("max.basic.warning"), schema.messageBoxProps || {}).then(() => {
|
|
5205
5205
|
var _a2;
|
|
5206
5206
|
(_a2 = schema.confirm) == null ? void 0 : _a2.call(schema, { field, schema, action: "confirm" });
|
|
5207
5207
|
}).catch(() => {
|
|
@@ -6004,7 +6004,7 @@ function createTableContext(instance) {
|
|
|
6004
6004
|
provide(key, instance);
|
|
6005
6005
|
}
|
|
6006
6006
|
function useTableFooter(propsRef, getDataSourceRef) {
|
|
6007
|
-
const { t } = useLocale();
|
|
6007
|
+
const { t: t2 } = useLocale();
|
|
6008
6008
|
const getIsEmptyData = computed(() => {
|
|
6009
6009
|
return (unref(getDataSourceRef) || []).length === 0;
|
|
6010
6010
|
});
|
|
@@ -6020,7 +6020,7 @@ function useTableFooter(propsRef, getDataSourceRef) {
|
|
|
6020
6020
|
if (sumFields.length) {
|
|
6021
6021
|
const sumPage = columns.map((column, columnIndex) => {
|
|
6022
6022
|
if (columnIndex === 0) {
|
|
6023
|
-
return
|
|
6023
|
+
return t2("max.table.sum");
|
|
6024
6024
|
}
|
|
6025
6025
|
if (sumFields.includes(column.field)) {
|
|
6026
6026
|
return calculate.sumBy(data, column.field);
|
|
@@ -6032,7 +6032,7 @@ function useTableFooter(propsRef, getDataSourceRef) {
|
|
|
6032
6032
|
if (avgFields.length) {
|
|
6033
6033
|
const avgPage = columns.map((column, columnIndex) => {
|
|
6034
6034
|
if (columnIndex === 0) {
|
|
6035
|
-
return
|
|
6035
|
+
return t2("max.table.avg");
|
|
6036
6036
|
}
|
|
6037
6037
|
if (avgFields.includes(column.field)) {
|
|
6038
6038
|
return calculate.sumBy(data, column.field) / data.length;
|
|
@@ -6328,7 +6328,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6328
6328
|
const emit = __emit;
|
|
6329
6329
|
const attrs = useAttrs();
|
|
6330
6330
|
const { b, e, is } = useNamespace("basic-table");
|
|
6331
|
-
const { t } = useLocale();
|
|
6331
|
+
const { t: t2 } = useLocale();
|
|
6332
6332
|
const slots = useSlots();
|
|
6333
6333
|
const innerPropsRef = ref({});
|
|
6334
6334
|
const getProps = computed(() => {
|
|
@@ -6490,7 +6490,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6490
6490
|
], -1)),
|
|
6491
6491
|
createElementVNode("p", {
|
|
6492
6492
|
class: normalizeClass(unref(e)("empty-text"))
|
|
6493
|
-
}, toDisplayString(unref(
|
|
6493
|
+
}, toDisplayString(unref(t2)("max.table.empty")), 3)
|
|
6494
6494
|
], 2)
|
|
6495
6495
|
]),
|
|
6496
6496
|
pager: withCtx(() => {
|
|
@@ -6517,7 +6517,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6517
6517
|
onClick: unref(clearSelectedRowKeys)
|
|
6518
6518
|
}, {
|
|
6519
6519
|
default: withCtx(() => [
|
|
6520
|
-
createTextVNode(toDisplayString(unref(
|
|
6520
|
+
createTextVNode(toDisplayString(unref(t2)("max.basic.clear")), 1)
|
|
6521
6521
|
]),
|
|
6522
6522
|
_: 1
|
|
6523
6523
|
}, 8, ["onClick"])
|
|
@@ -6525,9 +6525,9 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6525
6525
|
createElementVNode("div", {
|
|
6526
6526
|
class: normalizeClass(unref(e)("selection-count"))
|
|
6527
6527
|
}, [
|
|
6528
|
-
createElementVNode("span", null, toDisplayString(unref(
|
|
6528
|
+
createElementVNode("span", null, toDisplayString(unref(t2)("max.basic.selected")), 1),
|
|
6529
6529
|
createElementVNode("span", _hoisted_1$9, toDisplayString(unref(getSelectRows)().length), 1),
|
|
6530
|
-
createElementVNode("span", null, toDisplayString(unref(
|
|
6530
|
+
createElementVNode("span", null, toDisplayString(unref(t2)("max.basic.item")), 1)
|
|
6531
6531
|
], 2)
|
|
6532
6532
|
], 2)) : createCommentVNode("", true),
|
|
6533
6533
|
renderSlot(_ctx.$slots, "selection-wrapper-after")
|
|
@@ -6588,6 +6588,11 @@ const vxeTableFormatter = {
|
|
|
6588
6588
|
}
|
|
6589
6589
|
return row[`${field}Rid`] ? `${row[`${field}Code`]} - ${row[`${field}Rid`]}` : row[`${field}Code`];
|
|
6590
6590
|
}
|
|
6591
|
+
},
|
|
6592
|
+
FYN: {
|
|
6593
|
+
cellFormatMethod({ cellValue }) {
|
|
6594
|
+
return cellValue ? t("basic.yes") : t("basic.no");
|
|
6595
|
+
}
|
|
6591
6596
|
}
|
|
6592
6597
|
};
|
|
6593
6598
|
VxeUI2.formats.mixin(vxeTableFormatter);
|
|
@@ -6596,7 +6601,7 @@ VxeUI2.setConfig({
|
|
|
6596
6601
|
});
|
|
6597
6602
|
const XBasicTable = withInstall(_sfc_main$F);
|
|
6598
6603
|
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
6599
|
-
__name: "
|
|
6604
|
+
__name: "PreviewModal",
|
|
6600
6605
|
props: {
|
|
6601
6606
|
previewWidth: {},
|
|
6602
6607
|
previewColumns: {},
|
|
@@ -6610,16 +6615,18 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6610
6615
|
const emit = __emit;
|
|
6611
6616
|
const basicTableRef = useTemplateRef("basicTableRef");
|
|
6612
6617
|
const { b: bm, e: em } = useNamespace("basic-button-import-max-modal");
|
|
6613
|
-
const { t } = useLocale();
|
|
6614
|
-
const tableDataCount = ref(0);
|
|
6618
|
+
const { t: t2 } = useLocale();
|
|
6615
6619
|
const tableData = ref([]);
|
|
6620
|
+
const errorData = ref([]);
|
|
6616
6621
|
const { visible, show, hide } = useBasicDrawerModal({
|
|
6617
6622
|
async onShow(context) {
|
|
6618
|
-
var _a, _b
|
|
6623
|
+
var _a, _b;
|
|
6619
6624
|
await nextTick();
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6625
|
+
const list = ((_a = context.data) == null ? void 0 : _a.list) || [];
|
|
6626
|
+
const errorList = list.filter((item) => item.errorMsg);
|
|
6627
|
+
tableData.value = list;
|
|
6628
|
+
errorData.value = errorList;
|
|
6629
|
+
(_b = basicTableRef.value) == null ? void 0 : _b.setTableData(list);
|
|
6623
6630
|
}
|
|
6624
6631
|
});
|
|
6625
6632
|
const previewModalStyle = computed(() => {
|
|
@@ -6632,8 +6639,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6632
6639
|
showHeaderOverflow: "tooltip",
|
|
6633
6640
|
height: 400,
|
|
6634
6641
|
toolbarConfig: {
|
|
6635
|
-
|
|
6636
|
-
custom: false
|
|
6642
|
+
enabled: false
|
|
6637
6643
|
},
|
|
6638
6644
|
showCheckboxColumn: false,
|
|
6639
6645
|
...props.previewTableProps,
|
|
@@ -6641,10 +6647,9 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6641
6647
|
};
|
|
6642
6648
|
});
|
|
6643
6649
|
function onConfirm() {
|
|
6644
|
-
var _a
|
|
6645
|
-
const
|
|
6646
|
-
|
|
6647
|
-
emit("confirm", { data, records });
|
|
6650
|
+
var _a;
|
|
6651
|
+
const records = ((_a = basicTableRef.value) == null ? void 0 : _a.getSelectRows()) || [];
|
|
6652
|
+
emit("confirm", { data: tableData.value, records, errors: errorData.value });
|
|
6648
6653
|
}
|
|
6649
6654
|
__expose({
|
|
6650
6655
|
show,
|
|
@@ -6661,7 +6666,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6661
6666
|
style: normalizeStyle(previewModalStyle.value)
|
|
6662
6667
|
}, {
|
|
6663
6668
|
header: withCtx(() => [
|
|
6664
|
-
createElementVNode("span", null, toDisplayString(props.previewTitle || unref(
|
|
6669
|
+
createElementVNode("span", null, toDisplayString(props.previewTitle || unref(t2)("max.import.previewTitle")), 1)
|
|
6665
6670
|
]),
|
|
6666
6671
|
footer: withCtx(() => [
|
|
6667
6672
|
createElementVNode("span", {
|
|
@@ -6669,12 +6674,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6669
6674
|
}, [
|
|
6670
6675
|
createElementVNode("div", {
|
|
6671
6676
|
class: normalizeClass(unref(em)("footer-left"))
|
|
6672
|
-
},
|
|
6673
|
-
props.showPreviewCount ? (openBlock(), createElementBlock("span", {
|
|
6674
|
-
key: 0,
|
|
6675
|
-
class: normalizeClass(unref(em)("preview-count"))
|
|
6676
|
-
}, toDisplayString(unref(t)("max.import.totalCount")) + ": " + toDisplayString(tableDataCount.value), 3)) : createCommentVNode("", true)
|
|
6677
|
-
], 2),
|
|
6677
|
+
}, null, 2),
|
|
6678
6678
|
createElementVNode("span", {
|
|
6679
6679
|
class: normalizeClass(unref(em)("footer-right"))
|
|
6680
6680
|
}, [
|
|
@@ -6683,7 +6683,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6683
6683
|
onClick: unref(hide)
|
|
6684
6684
|
}, {
|
|
6685
6685
|
default: withCtx(() => [
|
|
6686
|
-
createTextVNode(toDisplayString(unref(
|
|
6686
|
+
createTextVNode(toDisplayString(unref(t2)("max.button.cancel")), 1)
|
|
6687
6687
|
]),
|
|
6688
6688
|
_: 1
|
|
6689
6689
|
}, 8, ["class", "onClick"]),
|
|
@@ -6692,7 +6692,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6692
6692
|
onClick: onConfirm
|
|
6693
6693
|
}, {
|
|
6694
6694
|
default: withCtx(() => [
|
|
6695
|
-
createTextVNode(toDisplayString(unref(
|
|
6695
|
+
createTextVNode(toDisplayString(unref(t2)("max.button.confirm")), 1)
|
|
6696
6696
|
]),
|
|
6697
6697
|
_: 1
|
|
6698
6698
|
})
|
|
@@ -6701,9 +6701,21 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6701
6701
|
]),
|
|
6702
6702
|
default: withCtx(() => [
|
|
6703
6703
|
renderSlot(_ctx.$slots, "preview-table-before", {
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
})
|
|
6704
|
+
tableData: tableData.value,
|
|
6705
|
+
errorData: errorData.value
|
|
6706
|
+
}, () => [
|
|
6707
|
+
props.showPreviewCount ? (openBlock(), createElementBlock("span", {
|
|
6708
|
+
key: 0,
|
|
6709
|
+
class: normalizeClass(unref(em)("preview-count"))
|
|
6710
|
+
}, [
|
|
6711
|
+
createElementVNode("span", {
|
|
6712
|
+
class: normalizeClass(unref(em)("total-count"))
|
|
6713
|
+
}, toDisplayString(unref(t2)("max.import.totalCount")) + ": " + toDisplayString(tableData.value.length), 3),
|
|
6714
|
+
createElementVNode("span", {
|
|
6715
|
+
class: normalizeClass(unref(em)("error-count"))
|
|
6716
|
+
}, toDisplayString(unref(t2)("max.import.errorCount")) + ": " + toDisplayString(errorData.value.length), 3)
|
|
6717
|
+
], 2)) : createCommentVNode("", true)
|
|
6718
|
+
]),
|
|
6707
6719
|
createElementVNode("div", {
|
|
6708
6720
|
class: normalizeClass(unref(em)("preview-table"))
|
|
6709
6721
|
}, [
|
|
@@ -6713,8 +6725,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6713
6725
|
}), null, 16)
|
|
6714
6726
|
], 2),
|
|
6715
6727
|
renderSlot(_ctx.$slots, "preview-table-after", {
|
|
6716
|
-
|
|
6717
|
-
|
|
6728
|
+
tableData: tableData.value,
|
|
6729
|
+
errorData: errorData.value
|
|
6718
6730
|
})
|
|
6719
6731
|
]),
|
|
6720
6732
|
_: 3
|
|
@@ -7418,7 +7430,7 @@ const BasicUploadListItem = /* @__PURE__ */ defineComponent({
|
|
|
7418
7430
|
namespace
|
|
7419
7431
|
} = useNamespace("basic-upload-list-item");
|
|
7420
7432
|
const {
|
|
7421
|
-
t
|
|
7433
|
+
t: t2
|
|
7422
7434
|
} = useLocale();
|
|
7423
7435
|
const prefixCls = b();
|
|
7424
7436
|
const showProgress = shallowRef(false);
|
|
@@ -7514,7 +7526,7 @@ const BasicUploadListItem = /* @__PURE__ */ defineComponent({
|
|
|
7514
7526
|
}, null),
|
|
7515
7527
|
callback: () => onClose == null ? void 0 : onClose(file),
|
|
7516
7528
|
prefixCls,
|
|
7517
|
-
title:
|
|
7529
|
+
title: t2("max.upload.removeFile")
|
|
7518
7530
|
}) : null;
|
|
7519
7531
|
const downloadActionIconRenderer = actionIconRender ? actionIconRender({
|
|
7520
7532
|
customIcon: customDownloadIcon ? customDownloadIcon({
|
|
@@ -7524,7 +7536,7 @@ const BasicUploadListItem = /* @__PURE__ */ defineComponent({
|
|
|
7524
7536
|
}, null),
|
|
7525
7537
|
callback: () => onDownload == null ? void 0 : onDownload(file),
|
|
7526
7538
|
prefixCls,
|
|
7527
|
-
title:
|
|
7539
|
+
title: t2("max.upload.downloadFile")
|
|
7528
7540
|
}) : null;
|
|
7529
7541
|
const removeIcon = showRemoveIcon ? removeActionIconRenderer : null;
|
|
7530
7542
|
const downloadIcon = showDownloadIcon && mergedStatus.value === "done" ? downloadActionIconRenderer : null;
|
|
@@ -7560,7 +7572,7 @@ const BasicUploadListItem = /* @__PURE__ */ defineComponent({
|
|
|
7560
7572
|
"rel": "noopener noreferrer",
|
|
7561
7573
|
"style": (file == null ? void 0 : file.url) || (file == null ? void 0 : file.thumbUrl) ? void 0 : previewStyle,
|
|
7562
7574
|
"onClick": (e) => onPreview == null ? void 0 : onPreview(file, e),
|
|
7563
|
-
"title":
|
|
7575
|
+
"title": t2("max.upload.previewFile"),
|
|
7564
7576
|
"class": [`${prefixCls}-action`, {
|
|
7565
7577
|
picture: listType === "picture"
|
|
7566
7578
|
}]
|
|
@@ -7588,7 +7600,7 @@ const BasicUploadListItem = /* @__PURE__ */ defineComponent({
|
|
|
7588
7600
|
[`${prefixCls}-container`]: true,
|
|
7589
7601
|
[`${className}`]: Boolean(className)
|
|
7590
7602
|
};
|
|
7591
|
-
const message = (file == null ? void 0 : file.response) && typeof (file == null ? void 0 : file.response) === "string" ? file == null ? void 0 : file.response : ((_a2 = file == null ? void 0 : file.error) == null ? void 0 : _a2.statusText) || ((_b = file == null ? void 0 : file.error) == null ? void 0 : _b.message) ||
|
|
7603
|
+
const message = (file == null ? void 0 : file.response) && typeof (file == null ? void 0 : file.response) === "string" ? file == null ? void 0 : file.response : ((_a2 = file == null ? void 0 : file.error) == null ? void 0 : _a2.statusText) || ((_b = file == null ? void 0 : file.error) == null ? void 0 : _b.message) || t2("max.upload.uploadFailed");
|
|
7592
7604
|
const item = mergedStatus.value === "error" ? [dom, createVNode("span", {
|
|
7593
7605
|
"class": `${prefixCls}-error-tooltip`,
|
|
7594
7606
|
"title": message
|
|
@@ -7780,7 +7792,7 @@ const BasicUploadList = /* @__PURE__ */ defineComponent({
|
|
|
7780
7792
|
expose
|
|
7781
7793
|
}) {
|
|
7782
7794
|
const {
|
|
7783
|
-
t
|
|
7795
|
+
t: t2
|
|
7784
7796
|
} = useLocale();
|
|
7785
7797
|
const motionAppear = shallowRef(false);
|
|
7786
7798
|
onMounted(() => {
|
|
@@ -7868,7 +7880,7 @@ const BasicUploadList = /* @__PURE__ */ defineComponent({
|
|
|
7868
7880
|
"icon": "ri:loader-2-line"
|
|
7869
7881
|
}, null)]) : fileIcon;
|
|
7870
7882
|
} else if (props.listType === "picture-card") {
|
|
7871
|
-
icon = isLoading ?
|
|
7883
|
+
icon = isLoading ? t2("max.upload.uploading") : fileIcon;
|
|
7872
7884
|
}
|
|
7873
7885
|
return icon;
|
|
7874
7886
|
};
|
|
@@ -8377,7 +8389,7 @@ const BasicUpload = /* @__PURE__ */ defineComponent({
|
|
|
8377
8389
|
const XBasicUpload = withInstall(BasicUpload);
|
|
8378
8390
|
const _hoisted_1$8 = { key: 0 };
|
|
8379
8391
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
8380
|
-
__name: "
|
|
8392
|
+
__name: "UploadModal",
|
|
8381
8393
|
props: {
|
|
8382
8394
|
width: {},
|
|
8383
8395
|
showTplButton: { type: Boolean },
|
|
@@ -8388,7 +8400,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8388
8400
|
const props = __props;
|
|
8389
8401
|
const emit = __emit;
|
|
8390
8402
|
const { b: bm, e: em } = useNamespace("basic-button-import-max-modal");
|
|
8391
|
-
const { t } = useLocale();
|
|
8403
|
+
const { t: t2 } = useLocale();
|
|
8392
8404
|
const fileList = ref([]);
|
|
8393
8405
|
const checked = ref(false);
|
|
8394
8406
|
const { visible, show, hide, loading, showLoading, hideLoading } = useBasicDrawerModal({
|
|
@@ -8402,14 +8414,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8402
8414
|
const beforeUpload = (file) => {
|
|
8403
8415
|
const isLt2M = (file.size || 0) / 1024 / 1024 < 50;
|
|
8404
8416
|
if (!isLt2M) {
|
|
8405
|
-
XBasicNotification.error(
|
|
8417
|
+
XBasicNotification.error(t2("max.import.fileSizeLimit"));
|
|
8406
8418
|
return false;
|
|
8407
8419
|
}
|
|
8408
8420
|
return false;
|
|
8409
8421
|
};
|
|
8410
8422
|
function onConfirm() {
|
|
8411
8423
|
if (fileList.value.length === 0) {
|
|
8412
|
-
XBasicNotification.error(
|
|
8424
|
+
XBasicNotification.error(t2("max.import.uploadFile"));
|
|
8413
8425
|
return;
|
|
8414
8426
|
}
|
|
8415
8427
|
const file = fileList.value[0].originFileObj;
|
|
@@ -8445,7 +8457,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8445
8457
|
props.showCoverSwitch ? (openBlock(), createElementBlock("span", _hoisted_1$8, [
|
|
8446
8458
|
createElementVNode("span", {
|
|
8447
8459
|
class: normalizeClass([unref(em)("footer-text"), { [unref(em)("footer-text--checked")]: checked.value }])
|
|
8448
|
-
}, toDisplayString(unref(
|
|
8460
|
+
}, toDisplayString(unref(t2)("max.import.updateExisting")), 3),
|
|
8449
8461
|
createVNode(unref(NSwitch), {
|
|
8450
8462
|
checked: checked.value,
|
|
8451
8463
|
"onUpdate:checked": _cache[1] || (_cache[1] = ($event) => checked.value = $event),
|
|
@@ -8461,7 +8473,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8461
8473
|
onClick: unref(hide)
|
|
8462
8474
|
}, {
|
|
8463
8475
|
default: withCtx(() => [
|
|
8464
|
-
createTextVNode(toDisplayString(unref(
|
|
8476
|
+
createTextVNode(toDisplayString(unref(t2)("max.import.cancel")), 1)
|
|
8465
8477
|
]),
|
|
8466
8478
|
_: 1
|
|
8467
8479
|
}, 8, ["class", "onClick"]),
|
|
@@ -8471,7 +8483,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8471
8483
|
onClick: onConfirm
|
|
8472
8484
|
}, {
|
|
8473
8485
|
default: withCtx(() => [
|
|
8474
|
-
createTextVNode(toDisplayString(unref(
|
|
8486
|
+
createTextVNode(toDisplayString(unref(t2)("max.import.confirm")), 1)
|
|
8475
8487
|
]),
|
|
8476
8488
|
_: 1
|
|
8477
8489
|
}, 8, ["loading"])
|
|
@@ -8500,7 +8512,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8500
8512
|
], 2),
|
|
8501
8513
|
createElementVNode("p", {
|
|
8502
8514
|
class: normalizeClass(unref(em)("upload-text"))
|
|
8503
|
-
}, toDisplayString(unref(
|
|
8515
|
+
}, toDisplayString(unref(t2)("max.import.uploadTip")), 3)
|
|
8504
8516
|
]),
|
|
8505
8517
|
_: 1
|
|
8506
8518
|
}, 8, ["file-list"]),
|
|
@@ -8508,7 +8520,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8508
8520
|
key: 0,
|
|
8509
8521
|
class: normalizeClass(unref(em)("tips"))
|
|
8510
8522
|
}, [
|
|
8511
|
-
createElementVNode("span", null, toDisplayString(unref(
|
|
8523
|
+
createElementVNode("span", null, toDisplayString(unref(t2)("max.import.allowedFormats")), 1),
|
|
8512
8524
|
createVNode(unref(XBasicButton), {
|
|
8513
8525
|
type: "primary",
|
|
8514
8526
|
size: "tiny",
|
|
@@ -8517,7 +8529,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8517
8529
|
onClick: downloadTemplate
|
|
8518
8530
|
}, {
|
|
8519
8531
|
default: withCtx(() => [
|
|
8520
|
-
createTextVNode(toDisplayString(unref(
|
|
8532
|
+
createTextVNode(toDisplayString(unref(t2)("max.import.downloadTemplate")), 1)
|
|
8521
8533
|
]),
|
|
8522
8534
|
_: 1
|
|
8523
8535
|
})
|
|
@@ -8545,7 +8557,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8545
8557
|
previewColumns: {},
|
|
8546
8558
|
previewTableProps: {},
|
|
8547
8559
|
previewTitle: {},
|
|
8548
|
-
showPreviewCount: { type: Boolean },
|
|
8560
|
+
showPreviewCount: { type: Boolean, default: true },
|
|
8549
8561
|
saveApi: {},
|
|
8550
8562
|
beforeSaveInterceptor: {},
|
|
8551
8563
|
beforeFetchSave: {},
|
|
@@ -8558,11 +8570,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8558
8570
|
const previewModalRef = useTemplateRef("previewModalRef");
|
|
8559
8571
|
const uploadModalRef = useTemplateRef("uploadModalRef");
|
|
8560
8572
|
const { b } = useNamespace("basic-button-import-max");
|
|
8561
|
-
const { t } = useLocale();
|
|
8573
|
+
const { t: t2 } = useLocale();
|
|
8562
8574
|
const attrs = useAttrs();
|
|
8563
8575
|
const currentFile = ref(null);
|
|
8564
8576
|
const currentChecked = ref(false);
|
|
8565
8577
|
async function runBeforeSaveGuard(payload) {
|
|
8578
|
+
if (payload.errors.length > 0) {
|
|
8579
|
+
XBasicNotification.error("存在校验失败的数据,请检查");
|
|
8580
|
+
return false;
|
|
8581
|
+
}
|
|
8566
8582
|
if (!props.beforeSaveInterceptor || !isFunction$1(props.beforeSaveInterceptor)) return true;
|
|
8567
8583
|
try {
|
|
8568
8584
|
const result = await props.beforeSaveInterceptor(payload);
|
|
@@ -8598,7 +8614,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8598
8614
|
(_b = previewModalRef.value) == null ? void 0 : _b.show({ type: "other", data: { list: resultItems } });
|
|
8599
8615
|
return;
|
|
8600
8616
|
}
|
|
8601
|
-
emit("import", { data: res, checked, file });
|
|
8617
|
+
emit("import", { data: res, checked, file, records: [] });
|
|
8602
8618
|
(_c = uploadModalRef.value) == null ? void 0 : _c.hide();
|
|
8603
8619
|
} catch (error) {
|
|
8604
8620
|
console.error(error);
|
|
@@ -8614,13 +8630,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8614
8630
|
}
|
|
8615
8631
|
const { templateApi } = props;
|
|
8616
8632
|
if (!templateApi) {
|
|
8617
|
-
XBasicNotification.error(
|
|
8633
|
+
XBasicNotification.error(t2("max.import.noTemplateApi"));
|
|
8618
8634
|
return;
|
|
8619
8635
|
}
|
|
8620
8636
|
try {
|
|
8621
8637
|
const { error, response } = await templateApi();
|
|
8622
8638
|
if (error) return;
|
|
8623
|
-
XBasicNotification.success(
|
|
8639
|
+
XBasicNotification.success(t2("max.import.exportSuccess"));
|
|
8624
8640
|
downloadFileByResponseData(response);
|
|
8625
8641
|
} catch (error) {
|
|
8626
8642
|
console.error(error);
|
|
@@ -8631,18 +8647,18 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8631
8647
|
onImport(file, checked, true);
|
|
8632
8648
|
return;
|
|
8633
8649
|
}
|
|
8634
|
-
XBasicMessageBox.confirm(
|
|
8635
|
-
confirmButtonText:
|
|
8636
|
-
cancelButtonText:
|
|
8650
|
+
XBasicMessageBox.confirm(t2("max.import.confirmImport"), {
|
|
8651
|
+
confirmButtonText: t2("max.import.confirm"),
|
|
8652
|
+
cancelButtonText: t2("max.import.cancel")
|
|
8637
8653
|
}).then(() => {
|
|
8638
8654
|
onImport(file, checked);
|
|
8639
8655
|
}).catch(() => {
|
|
8640
8656
|
});
|
|
8641
8657
|
}
|
|
8642
|
-
async function onPreviewConfirm({ data, records }) {
|
|
8658
|
+
async function onPreviewConfirm({ data, records, errors }) {
|
|
8643
8659
|
var _a, _b, _c, _d;
|
|
8644
8660
|
if (!currentFile.value) return false;
|
|
8645
|
-
const canSave = await runBeforeSaveGuard({ data, records, checked: currentChecked.value, file: currentFile.value });
|
|
8661
|
+
const canSave = await runBeforeSaveGuard({ data, records, errors, checked: currentChecked.value, file: currentFile.value });
|
|
8646
8662
|
if (!canSave) return false;
|
|
8647
8663
|
if (!props.saveApi) {
|
|
8648
8664
|
emit("preview", { data, checked: currentChecked.value, file: currentFile.value, records });
|
|
@@ -8676,7 +8692,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8676
8692
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
8677
8693
|
default: withCtx(() => [
|
|
8678
8694
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
8679
|
-
createTextVNode(toDisplayString(unref(
|
|
8695
|
+
createTextVNode(toDisplayString(unref(t2)("max.import.import")), 1)
|
|
8680
8696
|
])
|
|
8681
8697
|
]),
|
|
8682
8698
|
_: 3
|
|
@@ -9321,7 +9337,7 @@ const BasicCheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
|
9321
9337
|
is
|
|
9322
9338
|
} = useNamespace("checkbox-group");
|
|
9323
9339
|
const {
|
|
9324
|
-
t
|
|
9340
|
+
t: t2
|
|
9325
9341
|
} = useLocale();
|
|
9326
9342
|
const {
|
|
9327
9343
|
disabled
|
|
@@ -9482,7 +9498,7 @@ const BasicCheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
|
9482
9498
|
"indeterminate": indeterminate.value,
|
|
9483
9499
|
"onChange": handleSelectAll,
|
|
9484
9500
|
"uninjectGroupContext": true
|
|
9485
|
-
}, _isSlot$2(_slot =
|
|
9501
|
+
}, _isSlot$2(_slot = t2("max.checkbox.selectAll")) ? _slot : {
|
|
9486
9502
|
default: () => [_slot]
|
|
9487
9503
|
});
|
|
9488
9504
|
};
|
|
@@ -9831,7 +9847,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
9831
9847
|
e
|
|
9832
9848
|
} = useNamespace("basic-drag-verify");
|
|
9833
9849
|
const {
|
|
9834
|
-
t
|
|
9850
|
+
t: t2
|
|
9835
9851
|
} = useLocale();
|
|
9836
9852
|
const state = reactive({
|
|
9837
9853
|
isMoving: false,
|
|
@@ -9906,10 +9922,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
9906
9922
|
};
|
|
9907
9923
|
});
|
|
9908
9924
|
const textRef = computed(() => {
|
|
9909
|
-
return props.text ||
|
|
9925
|
+
return props.text || t2("max.dragVerify.text");
|
|
9910
9926
|
});
|
|
9911
9927
|
const successTextRef = computed(() => {
|
|
9912
|
-
return props.successText ||
|
|
9928
|
+
return props.successText || t2("max.dragVerify.successText");
|
|
9913
9929
|
});
|
|
9914
9930
|
watch(() => state.isPassing, (isPassing) => {
|
|
9915
9931
|
if (isPassing) {
|
|
@@ -10286,7 +10302,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
10286
10302
|
const props = __props;
|
|
10287
10303
|
const emit = __emit;
|
|
10288
10304
|
const { b } = useNamespace("basic-drawer");
|
|
10289
|
-
const { t } = useLocale();
|
|
10305
|
+
const { t: t2 } = useLocale();
|
|
10290
10306
|
const attrs = useAttrs();
|
|
10291
10307
|
const visibleRef = ref(false);
|
|
10292
10308
|
const getBindValues = computed(() => {
|
|
@@ -10296,10 +10312,10 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
10296
10312
|
};
|
|
10297
10313
|
});
|
|
10298
10314
|
const positiveText = computed(() => {
|
|
10299
|
-
return props.positiveText ||
|
|
10315
|
+
return props.positiveText || t2("max.button.confirm");
|
|
10300
10316
|
});
|
|
10301
10317
|
const negativeText = computed(() => {
|
|
10302
|
-
return props.negativeText ||
|
|
10318
|
+
return props.negativeText || t2("max.button.cancel");
|
|
10303
10319
|
});
|
|
10304
10320
|
async function onPositiveClickHandler() {
|
|
10305
10321
|
if (props.blurOnConfirm) {
|
|
@@ -10426,7 +10442,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
10426
10442
|
setup(__props) {
|
|
10427
10443
|
const props = __props;
|
|
10428
10444
|
const { b, e } = useNamespace("basic-edit-batch-action");
|
|
10429
|
-
const { t } = useLocale();
|
|
10445
|
+
const { t: t2 } = useLocale();
|
|
10430
10446
|
const { resetAction, submitAction } = useBasicEditBatchContext();
|
|
10431
10447
|
const getResetBtnOptions = computed(() => {
|
|
10432
10448
|
const { resetButtonOptions } = props;
|
|
@@ -10452,7 +10468,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
10452
10468
|
onClick: unref(resetAction)
|
|
10453
10469
|
}), {
|
|
10454
10470
|
default: withCtx(() => [
|
|
10455
|
-
createTextVNode(toDisplayString(getResetBtnOptions.value.text || unref(
|
|
10471
|
+
createTextVNode(toDisplayString(getResetBtnOptions.value.text || unref(t2)("max.basic.reset")), 1)
|
|
10456
10472
|
]),
|
|
10457
10473
|
_: 1
|
|
10458
10474
|
}, 16, ["class", "onClick"])) : createCommentVNode("", true),
|
|
@@ -10465,7 +10481,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
10465
10481
|
onClick: unref(submitAction)
|
|
10466
10482
|
}), {
|
|
10467
10483
|
default: withCtx(() => [
|
|
10468
|
-
createTextVNode(toDisplayString(getSubmitBtnOptions.value.text || unref(
|
|
10484
|
+
createTextVNode(toDisplayString(getSubmitBtnOptions.value.text || unref(t2)("max.button.confirm")), 1)
|
|
10469
10485
|
]),
|
|
10470
10486
|
_: 1
|
|
10471
10487
|
}, 16, ["class", "onClick"])) : createCommentVNode("", true),
|
|
@@ -11138,7 +11154,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
11138
11154
|
e
|
|
11139
11155
|
} = useNamespace("basic-edit-batch-item");
|
|
11140
11156
|
const {
|
|
11141
|
-
t
|
|
11157
|
+
t: t2
|
|
11142
11158
|
} = useLocale();
|
|
11143
11159
|
const getValues = computed(() => {
|
|
11144
11160
|
const {
|
|
@@ -11248,13 +11264,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
11248
11264
|
}
|
|
11249
11265
|
function createPlaceholderMessage(component) {
|
|
11250
11266
|
if (component.includes("Input") || component.includes("Complete")) {
|
|
11251
|
-
return
|
|
11267
|
+
return t2("max.placeholder.input");
|
|
11252
11268
|
}
|
|
11253
11269
|
if (component.includes("Picker") || component.includes("Group")) {
|
|
11254
|
-
return
|
|
11270
|
+
return t2("max.placeholder.picker");
|
|
11255
11271
|
}
|
|
11256
11272
|
if (component.includes("Select") || component.includes("TreeSelect") || component.includes("Cascader")) {
|
|
11257
|
-
return
|
|
11273
|
+
return t2("max.placeholder.select");
|
|
11258
11274
|
}
|
|
11259
11275
|
return "";
|
|
11260
11276
|
}
|
|
@@ -12073,7 +12089,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
12073
12089
|
const props = __props;
|
|
12074
12090
|
const emit = __emit;
|
|
12075
12091
|
const { b, e } = useNamespace("basic-form-action");
|
|
12076
|
-
const { t } = useLocale();
|
|
12092
|
+
const { t: t2 } = useLocale();
|
|
12077
12093
|
const { resetAction, submitAction } = useBasicFormContext();
|
|
12078
12094
|
const actionColOpt = computed(() => {
|
|
12079
12095
|
const { showAdvancedButton, actionSpan: span, actionColOptions } = props;
|
|
@@ -12139,7 +12155,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
12139
12155
|
onClick: unref(resetAction)
|
|
12140
12156
|
}), {
|
|
12141
12157
|
default: withCtx(() => [
|
|
12142
|
-
createTextVNode(toDisplayString(getResetBtnOptions.value.text || unref(
|
|
12158
|
+
createTextVNode(toDisplayString(getResetBtnOptions.value.text || unref(t2)("max.basic.reset")), 1)
|
|
12143
12159
|
]),
|
|
12144
12160
|
_: 1
|
|
12145
12161
|
}, 16, ["class", "onClick"])) : createCommentVNode("", true),
|
|
@@ -12149,7 +12165,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
12149
12165
|
onClick: unref(submitAction)
|
|
12150
12166
|
}), {
|
|
12151
12167
|
default: withCtx(() => [
|
|
12152
|
-
createTextVNode(toDisplayString(getSubmitBtnOptions.value.text || unref(
|
|
12168
|
+
createTextVNode(toDisplayString(getSubmitBtnOptions.value.text || unref(t2)("max.basic.submit")), 1)
|
|
12153
12169
|
]),
|
|
12154
12170
|
_: 1
|
|
12155
12171
|
}, 16, ["class", "onClick"])) : createCommentVNode("", true),
|
|
@@ -12159,7 +12175,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
12159
12175
|
onClick: toggleAdvanced
|
|
12160
12176
|
}), {
|
|
12161
12177
|
default: withCtx(() => [
|
|
12162
|
-
createElementVNode("span", null, toDisplayString(__props.isAdvanced ? unref(
|
|
12178
|
+
createElementVNode("span", null, toDisplayString(__props.isAdvanced ? unref(t2)("max.basic.collapse") : unref(t2)("max.basic.open")), 1),
|
|
12163
12179
|
createVNode(unref(XBasicArrow), {
|
|
12164
12180
|
expand: !__props.isAdvanced
|
|
12165
12181
|
}, null, 8, ["expand"])
|
|
@@ -12455,7 +12471,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
12455
12471
|
e
|
|
12456
12472
|
} = useNamespace("basic-form-item");
|
|
12457
12473
|
const {
|
|
12458
|
-
t
|
|
12474
|
+
t: t2
|
|
12459
12475
|
} = useLocale();
|
|
12460
12476
|
const getValues = computed(() => {
|
|
12461
12477
|
const {
|
|
@@ -12570,13 +12586,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
12570
12586
|
}
|
|
12571
12587
|
function createPlaceholderMessage(component) {
|
|
12572
12588
|
if (component.includes("Input") || component.includes("Complete")) {
|
|
12573
|
-
return
|
|
12589
|
+
return t2("max.placeholder.input");
|
|
12574
12590
|
}
|
|
12575
12591
|
if (component.includes("Picker") || component.includes("Group")) {
|
|
12576
|
-
return
|
|
12592
|
+
return t2("max.placeholder.picker");
|
|
12577
12593
|
}
|
|
12578
12594
|
if (component.includes("Select") || component.includes("TreeSelect") || component.includes("Cascader")) {
|
|
12579
|
-
return
|
|
12595
|
+
return t2("max.placeholder.select");
|
|
12580
12596
|
}
|
|
12581
12597
|
return "";
|
|
12582
12598
|
}
|
|
@@ -12656,7 +12672,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
12656
12672
|
}
|
|
12657
12673
|
const characterInx = rules.findIndex((val) => val.max);
|
|
12658
12674
|
if (characterInx !== -1 && !rules[characterInx].validator) {
|
|
12659
|
-
(_a = rules[characterInx]).message || (_a.message =
|
|
12675
|
+
(_a = rules[characterInx]).message || (_a.message = t2("max.form.max", {
|
|
12660
12676
|
max: rules[characterInx].max || 0
|
|
12661
12677
|
}));
|
|
12662
12678
|
}
|
|
@@ -17705,7 +17721,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
17705
17721
|
const uncontrolledValueRef = ref(props.defaultValue || "");
|
|
17706
17722
|
const controlledValueRef = toRef(props, "value");
|
|
17707
17723
|
const mergedValueRef = useMergedState$1(controlledValueRef, uncontrolledValueRef);
|
|
17708
|
-
const { t } = useLocale();
|
|
17724
|
+
const { t: t2 } = useLocale();
|
|
17709
17725
|
const iconList = ref(IconJson);
|
|
17710
17726
|
const copyIconList = cloneDeep$2(iconList.value);
|
|
17711
17727
|
const totalPage = ref(0);
|
|
@@ -17832,7 +17848,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
17832
17848
|
createVNode(unref(NInput), {
|
|
17833
17849
|
value: filterValue.value,
|
|
17834
17850
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => filterValue.value = $event),
|
|
17835
|
-
placeholder: unref(
|
|
17851
|
+
placeholder: unref(t2)("max.iconPicker.searchIcon"),
|
|
17836
17852
|
clearable: ""
|
|
17837
17853
|
}, null, 8, ["value", "placeholder"]),
|
|
17838
17854
|
createVNode(unref(NTabs), {
|
|
@@ -17870,7 +17886,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
17870
17886
|
}), 128))
|
|
17871
17887
|
]),
|
|
17872
17888
|
withDirectives(createVNode(unref(NEmpty), {
|
|
17873
|
-
description: unref(
|
|
17889
|
+
description: unref(t2)("max.iconPicker.iconNotExist"),
|
|
17874
17890
|
"image-size": 60
|
|
17875
17891
|
}, null, 8, ["description"]), [
|
|
17876
17892
|
[vShow, pageList.value.length === 0]
|
|
@@ -17904,7 +17920,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
17904
17920
|
onClick: onClear
|
|
17905
17921
|
}, {
|
|
17906
17922
|
default: withCtx(() => [
|
|
17907
|
-
createTextVNode(toDisplayString(unref(
|
|
17923
|
+
createTextVNode(toDisplayString(unref(t2)("max.iconPicker.clear")), 1)
|
|
17908
17924
|
]),
|
|
17909
17925
|
_: 1
|
|
17910
17926
|
})
|
|
@@ -19393,7 +19409,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
19393
19409
|
const emit = __emit;
|
|
19394
19410
|
const attrs = useAttrs();
|
|
19395
19411
|
const { b, e, is } = useNamespace("basic-list-page");
|
|
19396
|
-
const { t } = useLocale();
|
|
19412
|
+
const { t: t2 } = useLocale();
|
|
19397
19413
|
const innerPropsRef = ref();
|
|
19398
19414
|
const getProps = computed(() => {
|
|
19399
19415
|
return { ...props, ...unref(innerPropsRef) };
|
|
@@ -19494,7 +19510,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
19494
19510
|
], -1)),
|
|
19495
19511
|
createElementVNode("p", {
|
|
19496
19512
|
class: normalizeClass(unref(e)("empty-text"))
|
|
19497
|
-
}, toDisplayString(unref(
|
|
19513
|
+
}, toDisplayString(unref(t2)("max.table.empty")), 3)
|
|
19498
19514
|
], 2)) : createCommentVNode("", true),
|
|
19499
19515
|
createElementVNode("div", {
|
|
19500
19516
|
class: normalizeClass(["list-page-wrapper", [unref(e)("wrapper"), getListClassName.value]])
|
|
@@ -19844,7 +19860,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
19844
19860
|
const props = __props;
|
|
19845
19861
|
const emit = __emit;
|
|
19846
19862
|
const { b, e } = useNamespace("basic-modal");
|
|
19847
|
-
const { t } = useLocale();
|
|
19863
|
+
const { t: t2 } = useLocale();
|
|
19848
19864
|
const attrs = useAttrs();
|
|
19849
19865
|
const visibleRef = ref(false);
|
|
19850
19866
|
const getBindValues = computed(() => {
|
|
@@ -19859,10 +19875,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
19859
19875
|
};
|
|
19860
19876
|
});
|
|
19861
19877
|
const positiveText = computed(() => {
|
|
19862
|
-
return props.positiveText ||
|
|
19878
|
+
return props.positiveText || t2("max.button.confirm");
|
|
19863
19879
|
});
|
|
19864
19880
|
const negativeText = computed(() => {
|
|
19865
|
-
return props.negativeText ||
|
|
19881
|
+
return props.negativeText || t2("max.button.cancel");
|
|
19866
19882
|
});
|
|
19867
19883
|
const cardContentStyle = computed(() => {
|
|
19868
19884
|
return { maxHeight: props.maxHeight || "500px" };
|
|
@@ -23687,14 +23703,14 @@ const BasicRegion = /* @__PURE__ */ defineComponent({
|
|
|
23687
23703
|
b
|
|
23688
23704
|
} = useNamespace("basic-region");
|
|
23689
23705
|
const {
|
|
23690
|
-
t
|
|
23706
|
+
t: t2
|
|
23691
23707
|
} = useLocale();
|
|
23692
23708
|
const regionSource = useRegionData(props.data || defaultRegionData$1);
|
|
23693
23709
|
const uncontrolledValueRef = ref(props.defaultValue || []);
|
|
23694
23710
|
const controlledValueRef = toRef(props, "modelValue");
|
|
23695
23711
|
const mergedValue = useMergedState$1(controlledValueRef, uncontrolledValueRef);
|
|
23696
23712
|
const tabs = computed(() => {
|
|
23697
|
-
const defaultTabs = [
|
|
23713
|
+
const defaultTabs = [t2("max.region.province"), t2("max.region.city"), t2("max.region.district")];
|
|
23698
23714
|
if (props.tabLabels && props.tabLabels.length) return props.tabLabels.slice(0, props.level);
|
|
23699
23715
|
return defaultTabs.slice(0, props.level);
|
|
23700
23716
|
});
|
|
@@ -23703,7 +23719,7 @@ const BasicRegion = /* @__PURE__ */ defineComponent({
|
|
|
23703
23719
|
const map = regionSource.value.map;
|
|
23704
23720
|
return (unref(mergedValue) || []).map((code) => map[code]).filter(Boolean);
|
|
23705
23721
|
});
|
|
23706
|
-
const placeholderText = computed(() => props.placeholder ||
|
|
23722
|
+
const placeholderText = computed(() => props.placeholder || t2("max.region.placeholder"));
|
|
23707
23723
|
const headerTitle = computed(() => props.title || (selectedNodes.value.length ? selectedNodes.value.map((item) => item.name).join("") : placeholderText.value));
|
|
23708
23724
|
const provinceOptions = computed(() => regionSource.value.provinces);
|
|
23709
23725
|
const cityOptions = computed(() => {
|
|
@@ -23774,7 +23790,7 @@ const BasicRegion = /* @__PURE__ */ defineComponent({
|
|
|
23774
23790
|
}, [headerTitle.value]), props.clearable && createVNode("button", {
|
|
23775
23791
|
"type": "button",
|
|
23776
23792
|
"class": "rg-header-control",
|
|
23777
|
-
"title":
|
|
23793
|
+
"title": t2("max.region.clear"),
|
|
23778
23794
|
"disabled": !clearEnabled.value,
|
|
23779
23795
|
"onClick": clear
|
|
23780
23796
|
}, [createVNode(XBasicSvgIcon, {
|
|
@@ -23800,7 +23816,7 @@ const BasicRegion = /* @__PURE__ */ defineComponent({
|
|
|
23800
23816
|
"onClick": () => handleSelect(activeTab.value, option)
|
|
23801
23817
|
}, [option.name])), !options.length && createVNode("div", {
|
|
23802
23818
|
"class": "rg-empty"
|
|
23803
|
-
}, [
|
|
23819
|
+
}, [t2("max.table.empty")])])])]);
|
|
23804
23820
|
};
|
|
23805
23821
|
}
|
|
23806
23822
|
});
|
|
@@ -23903,7 +23919,7 @@ const BasicRegionSelect = /* @__PURE__ */ defineComponent({
|
|
|
23903
23919
|
is
|
|
23904
23920
|
} = useNamespace("basic-region-select");
|
|
23905
23921
|
const {
|
|
23906
|
-
t
|
|
23922
|
+
t: t2
|
|
23907
23923
|
} = useLocale();
|
|
23908
23924
|
const regionSource = useRegionData(props.data || defaultRegionData);
|
|
23909
23925
|
const uncontrolledValueRef = ref(props.defaultValue || []);
|
|
@@ -23918,7 +23934,7 @@ const BasicRegionSelect = /* @__PURE__ */ defineComponent({
|
|
|
23918
23934
|
if (selectedNodes.value.length) {
|
|
23919
23935
|
return selectedNodes.value.map((item) => item.name).join("");
|
|
23920
23936
|
}
|
|
23921
|
-
return props.placeholder ||
|
|
23937
|
+
return props.placeholder || t2("max.region.placeholder");
|
|
23922
23938
|
});
|
|
23923
23939
|
const showClearIcon = computed(() => {
|
|
23924
23940
|
var _a;
|
|
@@ -26810,7 +26826,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
26810
26826
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
26811
26827
|
const props = __props;
|
|
26812
26828
|
const emit = __emit;
|
|
26813
|
-
const { t } = useLocale();
|
|
26829
|
+
const { t: t2 } = useLocale();
|
|
26814
26830
|
const EXCLUDED_TREE_NODE_EVENTS = ["set-data", "checked-change"];
|
|
26815
26831
|
const slots = useSlots();
|
|
26816
26832
|
const treeListeners = TREE_EVENTS.reduce(
|
|
@@ -26856,10 +26872,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
26856
26872
|
return keyword.value;
|
|
26857
26873
|
}
|
|
26858
26874
|
const placeholder = computed(() => {
|
|
26859
|
-
return props.searchPlaceholder ||
|
|
26875
|
+
return props.searchPlaceholder || t2("max.treeSearch.searchPlaceholder");
|
|
26860
26876
|
});
|
|
26861
26877
|
const checkedButtonText = computed(() => {
|
|
26862
|
-
return props.checkedButtonText ||
|
|
26878
|
+
return props.checkedButtonText || t2("max.treeSearch.checkedButtonText");
|
|
26863
26879
|
});
|
|
26864
26880
|
function search(keyword1) {
|
|
26865
26881
|
let searchKeyword = keyword1;
|
|
@@ -27268,7 +27284,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
27268
27284
|
setup(__props) {
|
|
27269
27285
|
const props = __props;
|
|
27270
27286
|
const { b, e, is } = useNamespace("basic-view-bar");
|
|
27271
|
-
const { t } = useLocale();
|
|
27287
|
+
const { t: t2 } = useLocale();
|
|
27272
27288
|
const navWrap = ref();
|
|
27273
27289
|
const navScroll = ref();
|
|
27274
27290
|
const scrollable = ref(false);
|
|
@@ -27346,14 +27362,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
27346
27362
|
}, [
|
|
27347
27363
|
createElementVNode("div", {
|
|
27348
27364
|
class: normalizeClass({ [unref(is)("hide")]: !scrollable.value, [unref(e)("prev")]: true }),
|
|
27349
|
-
title: unref(
|
|
27365
|
+
title: unref(t2)("max.viewBar.prev"),
|
|
27350
27366
|
onClick: scrollPrev
|
|
27351
27367
|
}, [
|
|
27352
27368
|
createVNode(unref(XBasicSvgIcon), { icon: "ri:arrow-left-s-line" })
|
|
27353
27369
|
], 10, _hoisted_1),
|
|
27354
27370
|
createElementVNode("div", {
|
|
27355
27371
|
class: normalizeClass({ [unref(is)("hide")]: !scrollable.value, [unref(e)("next")]: true }),
|
|
27356
|
-
title: unref(
|
|
27372
|
+
title: unref(t2)("max.viewBar.next"),
|
|
27357
27373
|
onClick: scrollNext
|
|
27358
27374
|
}, [
|
|
27359
27375
|
createVNode(unref(XBasicSvgIcon), { icon: "ri:arrow-right-s-line" })
|
|
@@ -27904,9 +27920,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
27904
27920
|
const props = __props;
|
|
27905
27921
|
const emit = __emit;
|
|
27906
27922
|
const { b } = useNamespace("basic-drawer-footer");
|
|
27907
|
-
const { t } = useLocale();
|
|
27923
|
+
const { t: t2 } = useLocale();
|
|
27908
27924
|
function onDeleteClickHandler() {
|
|
27909
|
-
XBasicMessageBox.confirm(
|
|
27925
|
+
XBasicMessageBox.confirm(t2("max.notification.delete"), t2("max.basic.warning")).then(() => {
|
|
27910
27926
|
emit("delete");
|
|
27911
27927
|
}).catch(() => {
|
|
27912
27928
|
});
|
|
@@ -28079,15 +28095,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28079
28095
|
setup(__props) {
|
|
28080
28096
|
const props = __props;
|
|
28081
28097
|
const { b } = useNamespace("basic-trigger-button");
|
|
28082
|
-
const { t } = useLocale();
|
|
28098
|
+
const { t: t2 } = useLocale();
|
|
28083
28099
|
function basicButtonHandler2() {
|
|
28084
28100
|
var _a;
|
|
28085
28101
|
if (props.message) {
|
|
28086
28102
|
XBasicMessageBox.confirm(props.message, {
|
|
28087
28103
|
type: "info",
|
|
28088
|
-
title:
|
|
28089
|
-
confirmButtonText:
|
|
28090
|
-
cancelButtonText:
|
|
28104
|
+
title: t2("max.messagebox.alert"),
|
|
28105
|
+
confirmButtonText: t2("max.button.confirm"),
|
|
28106
|
+
cancelButtonText: t2("max.button.cancel"),
|
|
28091
28107
|
...props.messageBoxProps || {},
|
|
28092
28108
|
callback: (action) => {
|
|
28093
28109
|
var _a2, _b, _c;
|