feat: 移除国家电话信息中的占位符,更新手机号输入框的占位符文本
This commit is contained in:
@@ -41,7 +41,6 @@ export const countries: PhoneCountry[] = [
|
|||||||
name: "中国大陆",
|
name: "中国大陆",
|
||||||
pattern: /^1[3-9]\d{9}$/,
|
pattern: /^1[3-9]\d{9}$/,
|
||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
placeholder: "13800138000",
|
|
||||||
icon: CircleFlagsZh,
|
icon: CircleFlagsZh,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -50,7 +49,6 @@ export const countries: PhoneCountry[] = [
|
|||||||
name: "中国香港",
|
name: "中国香港",
|
||||||
pattern: /^[5-9]\d{7}$/,
|
pattern: /^[5-9]\d{7}$/,
|
||||||
maxLength: 8,
|
maxLength: 8,
|
||||||
placeholder: "51234567",
|
|
||||||
icon: CircleFlagsCnHk,
|
icon: CircleFlagsCnHk,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -59,7 +57,6 @@ export const countries: PhoneCountry[] = [
|
|||||||
name: "中国台湾",
|
name: "中国台湾",
|
||||||
pattern: /^9\d{8}$/,
|
pattern: /^9\d{8}$/,
|
||||||
maxLength: 9,
|
maxLength: 9,
|
||||||
placeholder: "912345678",
|
|
||||||
icon: CircleFlagsTw,
|
icon: CircleFlagsTw,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -68,7 +65,6 @@ export const countries: PhoneCountry[] = [
|
|||||||
name: "美国",
|
name: "美国",
|
||||||
pattern: /^\d{10}$/,
|
pattern: /^\d{10}$/,
|
||||||
maxLength: 10,
|
maxLength: 10,
|
||||||
placeholder: "2025550123",
|
|
||||||
icon: CircleFlagsEnUs,
|
icon: CircleFlagsEnUs,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -14,6 +14,5 @@ export interface PhoneCountry {
|
|||||||
name: string;
|
name: string;
|
||||||
pattern: RegExp;
|
pattern: RegExp;
|
||||||
maxLength: number;
|
maxLength: number;
|
||||||
placeholder: string;
|
|
||||||
icon: FunctionalComponent<SVGAttributes>;
|
icon: FunctionalComponent<SVGAttributes>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ onUnmounted(() => {
|
|||||||
<ui-input
|
<ui-input
|
||||||
v-bind="field"
|
v-bind="field"
|
||||||
v-model="phoneNumber"
|
v-model="phoneNumber"
|
||||||
:placeholder="currentCountry.placeholder"
|
placeholder="请输入手机号"
|
||||||
:maxlength="currentCountry.maxLength"
|
:maxlength="currentCountry.maxLength"
|
||||||
type="tel"
|
type="tel"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user