feat: 移除国家电话信息中的占位符,更新手机号输入框的占位符文本

This commit is contained in:
2026-02-02 15:11:10 +07:00
parent 27c7e5d451
commit 899b66840e
3 changed files with 1 additions and 6 deletions

View File

@@ -41,7 +41,6 @@ export const countries: PhoneCountry[] = [
name: "中国大陆",
pattern: /^1[3-9]\d{9}$/,
maxLength: 11,
placeholder: "13800138000",
icon: CircleFlagsZh,
},
{
@@ -50,7 +49,6 @@ export const countries: PhoneCountry[] = [
name: "中国香港",
pattern: /^[5-9]\d{7}$/,
maxLength: 8,
placeholder: "51234567",
icon: CircleFlagsCnHk,
},
{
@@ -59,7 +57,6 @@ export const countries: PhoneCountry[] = [
name: "中国台湾",
pattern: /^9\d{8}$/,
maxLength: 9,
placeholder: "912345678",
icon: CircleFlagsTw,
},
{
@@ -68,7 +65,6 @@ export const countries: PhoneCountry[] = [
name: "美国",
pattern: /^\d{10}$/,
maxLength: 10,
placeholder: "2025550123",
icon: CircleFlagsEnUs,
},
];

View File

@@ -14,6 +14,5 @@ export interface PhoneCountry {
name: string;
pattern: RegExp;
maxLength: number;
placeholder: string;
icon: FunctionalComponent<SVGAttributes>;
}

View File

@@ -148,7 +148,7 @@ onUnmounted(() => {
<ui-input
v-bind="field"
v-model="phoneNumber"
:placeholder="currentCountry.placeholder"
placeholder="请输入手机号"
:maxlength="currentCountry.maxLength"
type="tel"
>