修复密码输入可访问性并统一新手机号为中国大陆区号
This commit is contained in:
1 parent
990b802553
commit
f6ab3c9087
15 files changed
+592
-362
No files matched your search
@@ -49,7 +49,8 @@ import CaptchaField from "~/components/CaptchaField.vue";
|
||||
import select from "primevue/select";
|
||||
import ClientLevelDialog from "~/components/ClientLevelDialog.vue";
|
||||
import { t as interval_t } from "~/lib/interval.js";
|
||||
import password from "primevue/password";
|
||||
import password from "~/components/PasswordField.vue";
|
||||
import PhoneCodeField from "~/components/PhoneCodeField.vue";
|
||||
import skeleton from "primevue/skeleton";
|
||||
import toggleswitch from "primevue/toggleswitch";
|
||||
import { t as useCaptcha_t } from "~/lib/useCaptcha.js";
|
||||
@@ -204,8 +205,7 @@ var Ce = {
|
||||
_t = {
|
||||
class: `field`,
|
||||
},
|
||||
vt = [`id`, `for`],
|
||||
yt = [`id`],
|
||||
vt = [`for`],
|
||||
bt = {
|
||||
class: `inline`,
|
||||
},
|
||||
@@ -729,7 +729,6 @@ var Ce = {
|
||||
}
|
||||
}
|
||||
let q = reactive({
|
||||
phone_code: 86,
|
||||
newPhone: ``,
|
||||
code: ``,
|
||||
}),
|
||||
@@ -799,7 +798,7 @@ var Ce = {
|
||||
try {
|
||||
if (!q.newPhone.trim()) throw Error(`请输入新手机号`);
|
||||
(await jn(`phone`, `update`, {
|
||||
phone_code: q.phone_code,
|
||||
phone_code: 86,
|
||||
phone: q.newPhone.trim(),
|
||||
}),
|
||||
(O.value = `验证码已发送`));
|
||||
@@ -815,7 +814,7 @@ var Ce = {
|
||||
(M(), (Y.value = !0));
|
||||
try {
|
||||
(await b.put(`/account/phone`, {
|
||||
phone_code: q.phone_code,
|
||||
phone_code: 86,
|
||||
phone: q.newPhone,
|
||||
code: q.code,
|
||||
}),
|
||||
@@ -1406,6 +1405,7 @@ var Ce = {
|
||||
toggleMask: ``,
|
||||
fluid: ``,
|
||||
placeholder: `输入当前密码`,
|
||||
autocomplete: `current-password`,
|
||||
},
|
||||
null,
|
||||
8,
|
||||
@@ -1617,6 +1617,7 @@ var Ce = {
|
||||
toggleMask: ``,
|
||||
fluid: ``,
|
||||
placeholder: `输入新密码`,
|
||||
autocomplete: `new-password`,
|
||||
},
|
||||
null,
|
||||
8,
|
||||
@@ -1647,6 +1648,7 @@ var Ce = {
|
||||
toggleMask: ``,
|
||||
fluid: ``,
|
||||
placeholder: `再次输入新密码`,
|
||||
autocomplete: `new-password`,
|
||||
},
|
||||
null,
|
||||
8,
|
||||
@@ -2068,88 +2070,18 @@ var Ce = {
|
||||
createElementVNode(
|
||||
`label`,
|
||||
{
|
||||
id: `${unref(x)}-phone-label`,
|
||||
for: `${unref(x)}-new-phone`,
|
||||
},
|
||||
`新手机号`,
|
||||
8,
|
||||
vt,
|
||||
),
|
||||
createElementVNode(
|
||||
`span`,
|
||||
{
|
||||
id: `${unref(x)}-phone-code-label`,
|
||||
class: `sr-only`,
|
||||
},
|
||||
`国际区号`,
|
||||
8,
|
||||
yt,
|
||||
),
|
||||
createElementVNode(
|
||||
`div`,
|
||||
bt,
|
||||
[
|
||||
createVNode(
|
||||
g,
|
||||
{
|
||||
modelValue:
|
||||
unref(q)
|
||||
.phone_code,
|
||||
"onUpdate:modelValue":
|
||||
(r[19] ||= (
|
||||
e,
|
||||
) =>
|
||||
(unref(
|
||||
q,
|
||||
).phone_code =
|
||||
e)),
|
||||
"aria-labelledby": `${unref(x)}-phone-label ${unref(x)}-phone-code-label`,
|
||||
options:
|
||||
unref(Zt),
|
||||
optionLabel: `phone_code`,
|
||||
optionValue: `phone_code`,
|
||||
filter: ``,
|
||||
class: `code-select`,
|
||||
},
|
||||
{
|
||||
option: withCtx(
|
||||
({
|
||||
option: t,
|
||||
}) => [
|
||||
createTextVNode(
|
||||
`+` +
|
||||
toDisplayString(
|
||||
t.phone_code,
|
||||
) +
|
||||
` ` +
|
||||
toDisplayString(
|
||||
t.name,
|
||||
),
|
||||
1,
|
||||
),
|
||||
],
|
||||
),
|
||||
value: withCtx(
|
||||
({
|
||||
value: t,
|
||||
}) => [
|
||||
createTextVNode(
|
||||
`+` +
|
||||
toDisplayString(
|
||||
t,
|
||||
),
|
||||
1,
|
||||
),
|
||||
],
|
||||
),
|
||||
_: 1,
|
||||
},
|
||||
8,
|
||||
[
|
||||
`modelValue`,
|
||||
`aria-labelledby`,
|
||||
`options`,
|
||||
],
|
||||
PhoneCodeField,
|
||||
),
|
||||
createVNode(
|
||||
l,
|
||||
|
||||
Reference in new issue
Block a user