@witlink/usercenter 1.2.62 → 1.2.63
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/usercenter.es.js +32 -21
- package/dist/usercenter.umd.js +1 -1
- package/package.json +1 -1
package/dist/usercenter.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { useI18n } from "vue-i18n";
|
|
|
8
8
|
import { defineStore, createPinia } from "pinia";
|
|
9
9
|
import Axios from "axios";
|
|
10
10
|
import { notification, message, App, Drawer, Button, ConfigProvider, Modal, Checkbox as Checkbox$1, Divider as Divider$1 } from "ant-design-vue";
|
|
11
|
-
import { ref, render, h, reactive, inject, computed, provide, createCommentVNode, defineComponent, watch, onMounted, nextTick, onUnmounted, TransitionGroup, Teleport, resolveComponent, onActivated, onDeactivated, onBeforeUnmount, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString, createBlock,
|
|
11
|
+
import { ref, render, h, reactive, inject, computed, provide, createCommentVNode, defineComponent, watch, onMounted, nextTick, onUnmounted, TransitionGroup, Teleport, resolveComponent, onActivated, onDeactivated, onBeforeUnmount, openBlock, createElementBlock, createVNode, withCtx, unref, createElementVNode, createTextVNode, toDisplayString, createBlock, Fragment, renderList, normalizeClass, normalizeStyle, mergeProps, onBeforeMount, withDirectives, vShow, useSlots, createSlots, renderSlot, normalizeProps, guardReactiveProps, withModifiers, watchEffect, mergeModels, useModel, resolveDirective } from "vue";
|
|
12
12
|
import { getUserInfo as getUserInfo$1, hasPermission } from "@witlink/components/utils";
|
|
13
13
|
import en_US from "ant-design-vue/es/locale/en_US";
|
|
14
14
|
import zh_CN from "ant-design-vue/es/locale/zh_CN";
|
|
@@ -32097,6 +32097,15 @@ function updateMenuTreeOrder(params) {
|
|
|
32097
32097
|
data: params
|
|
32098
32098
|
});
|
|
32099
32099
|
}
|
|
32100
|
+
function useRequiredMessage() {
|
|
32101
|
+
const { t: t2 } = useI18n();
|
|
32102
|
+
const userStore = useUserStore();
|
|
32103
|
+
const requiredMessage = (labelKey) => {
|
|
32104
|
+
const suffix = t2("uc_common.isRequired");
|
|
32105
|
+
return userStore.userLanguage === "zh_CN" ? labelKey + suffix : labelKey + " " + suffix;
|
|
32106
|
+
};
|
|
32107
|
+
return { requiredMessage };
|
|
32108
|
+
}
|
|
32100
32109
|
const _hoisted_1$m = { class: "add-menu" };
|
|
32101
32110
|
const _hoisted_2$d = { class: "actions-wrap" };
|
|
32102
32111
|
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
@@ -32118,6 +32127,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
32118
32127
|
emits: ["close", "submit"],
|
|
32119
32128
|
setup(__props, { emit: __emit }) {
|
|
32120
32129
|
const userStore = useUserStore();
|
|
32130
|
+
const { requiredMessage } = useRequiredMessage();
|
|
32121
32131
|
const emits = __emit;
|
|
32122
32132
|
const props = __props;
|
|
32123
32133
|
const formRef = ref(null);
|
|
@@ -32181,7 +32191,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
32181
32191
|
createVNode(_component_a_form_item, {
|
|
32182
32192
|
label: _ctx.$t("uc_fun.fun_name"),
|
|
32183
32193
|
name: "funName",
|
|
32184
|
-
|
|
32194
|
+
rules: [
|
|
32195
|
+
{
|
|
32196
|
+
required: true,
|
|
32197
|
+
message: unref(requiredMessage)(_ctx.$t("uc_fun.fun_name"))
|
|
32198
|
+
}
|
|
32199
|
+
]
|
|
32185
32200
|
}, {
|
|
32186
32201
|
default: withCtx(() => [
|
|
32187
32202
|
createVNode(_component_a_input, {
|
|
@@ -32192,11 +32207,16 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
32192
32207
|
}, null, 8, ["placeholder", "value"])
|
|
32193
32208
|
]),
|
|
32194
32209
|
_: 1
|
|
32195
|
-
}, 8, ["label"]),
|
|
32210
|
+
}, 8, ["label", "rules"]),
|
|
32196
32211
|
createVNode(_component_a_form_item, {
|
|
32197
32212
|
label: _ctx.$t("uc_fun.url"),
|
|
32198
32213
|
name: "url",
|
|
32199
|
-
|
|
32214
|
+
rules: [
|
|
32215
|
+
{
|
|
32216
|
+
required: true,
|
|
32217
|
+
message: unref(requiredMessage)(_ctx.$t("uc_fun.url"))
|
|
32218
|
+
}
|
|
32219
|
+
]
|
|
32200
32220
|
}, {
|
|
32201
32221
|
default: withCtx(() => [
|
|
32202
32222
|
createVNode(_component_a_input, {
|
|
@@ -32207,7 +32227,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
32207
32227
|
}, null, 8, ["placeholder", "value"])
|
|
32208
32228
|
]),
|
|
32209
32229
|
_: 1
|
|
32210
|
-
}, 8, ["label"]),
|
|
32230
|
+
}, 8, ["label", "rules"]),
|
|
32211
32231
|
createVNode(_component_a_form_item, {
|
|
32212
32232
|
label: _ctx.$t("uc_fun.image"),
|
|
32213
32233
|
name: "image"
|
|
@@ -38062,7 +38082,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
38062
38082
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
38063
38083
|
value: form.userPwd,
|
|
38064
38084
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => form.userPwd = $event),
|
|
38065
|
-
autocomplete: "
|
|
38085
|
+
autocomplete: "new-password"
|
|
38066
38086
|
}, null, 8, ["placeholder", "value"])
|
|
38067
38087
|
]),
|
|
38068
38088
|
_: 1
|
|
@@ -38076,7 +38096,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
38076
38096
|
type: "password",
|
|
38077
38097
|
style: { "width": "100%" },
|
|
38078
38098
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
38079
|
-
autocomplete: "
|
|
38099
|
+
autocomplete: "new-password",
|
|
38080
38100
|
value: form.userPwd1,
|
|
38081
38101
|
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => form.userPwd1 = $event)
|
|
38082
38102
|
}, null, 8, ["placeholder", "value"])
|
|
@@ -38793,15 +38813,6 @@ function isValidEmail(email) {
|
|
|
38793
38813
|
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
38794
38814
|
return emailRegex.test(email);
|
|
38795
38815
|
}
|
|
38796
|
-
function useRequiredMessage() {
|
|
38797
|
-
const { t: t2 } = useI18n();
|
|
38798
|
-
const userStore = useUserStore();
|
|
38799
|
-
const requiredMessage = (labelKey) => {
|
|
38800
|
-
const suffix = t2("uc_common.isRequired");
|
|
38801
|
-
return userStore.userLanguage === "zh_CN" ? labelKey + suffix : labelKey + " " + suffix;
|
|
38802
|
-
};
|
|
38803
|
-
return { requiredMessage };
|
|
38804
|
-
}
|
|
38805
38816
|
const _hoisted_1$a = ["spinning"];
|
|
38806
38817
|
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
38807
38818
|
__name: "ModalEdit",
|
|
@@ -39103,7 +39114,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
39103
39114
|
createVNode(_component_a_input_password, {
|
|
39104
39115
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
39105
39116
|
maxLength: 20,
|
|
39106
|
-
autocomplete: "
|
|
39117
|
+
autocomplete: "new-password",
|
|
39107
39118
|
value: form.pwd,
|
|
39108
39119
|
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => form.pwd = $event)
|
|
39109
39120
|
}, null, 8, ["placeholder", "value"])
|
|
@@ -39118,7 +39129,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
39118
39129
|
createVNode(_component_a_input, {
|
|
39119
39130
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
39120
39131
|
maxLength: 50,
|
|
39121
|
-
autocomplete: "
|
|
39132
|
+
autocomplete: "new-password",
|
|
39122
39133
|
value: form.mobile,
|
|
39123
39134
|
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => form.mobile = $event)
|
|
39124
39135
|
}, null, 8, ["placeholder", "value"])
|
|
@@ -40924,7 +40935,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
40924
40935
|
value: formState.oldPwd,
|
|
40925
40936
|
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => formState.oldPwd = $event),
|
|
40926
40937
|
type: "password",
|
|
40927
|
-
autocomplete: "
|
|
40938
|
+
autocomplete: "new-password",
|
|
40928
40939
|
style: { "width": "320px" },
|
|
40929
40940
|
placeholder: _ctx.$t("uc_common.plsEnter")
|
|
40930
40941
|
}, null, 8, ["value", "placeholder"])
|
|
@@ -40940,7 +40951,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
40940
40951
|
value: formState.newPwd,
|
|
40941
40952
|
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => formState.newPwd = $event),
|
|
40942
40953
|
type: "password",
|
|
40943
|
-
autocomplete: "
|
|
40954
|
+
autocomplete: "new-password",
|
|
40944
40955
|
style: { "width": "320px" },
|
|
40945
40956
|
placeholder: _ctx.$t("uc_common.plsEnter")
|
|
40946
40957
|
}, null, 8, ["value", "placeholder"])
|
|
@@ -40956,7 +40967,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
40956
40967
|
value: formState.userPwd1,
|
|
40957
40968
|
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => formState.userPwd1 = $event),
|
|
40958
40969
|
type: "password",
|
|
40959
|
-
autocomplete: "
|
|
40970
|
+
autocomplete: "new-password",
|
|
40960
40971
|
style: { "width": "320px" },
|
|
40961
40972
|
placeholder: _ctx.$t("uc_common.plsEnter")
|
|
40962
40973
|
}, null, 8, ["value", "placeholder"])
|