@cloudbase/weda-ui-mp 3.25.0 → 3.25.1
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.
|
@@ -5,14 +5,14 @@ const pattern = {
|
|
|
5
5
|
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
6
6
|
url: new RegExp(
|
|
7
7
|
'^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
|
|
8
|
-
'i'
|
|
8
|
+
'i',
|
|
9
9
|
),
|
|
10
10
|
cn: /^[\u2E80-\uFE4F]+$/,
|
|
11
11
|
enName: /^[\da-zA-Z\s]{2,}$/,
|
|
12
12
|
cnName: /^[\u2E80-\uFE4F]{2,6}(?:·[\u2E80-\uFE4F]{2,6})*$/,
|
|
13
13
|
userName: /^[\da-zA-Z\u2E80-\uFE4F \s]{2,}$/,
|
|
14
14
|
carId:
|
|
15
|
-
/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/,
|
|
15
|
+
/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]{1}$/,
|
|
16
16
|
mobile: /^1[3-9]\d{9}$/,
|
|
17
17
|
tel: /(^(0\d{2,3}-)?|^\(\d{3}\)?|^(400|800)-?)(\d{3,8})(-\d{1,4})?$/,
|
|
18
18
|
internationalTel:
|
|
@@ -27,8 +27,7 @@ const pattern = {
|
|
|
27
27
|
passport:
|
|
28
28
|
/^1[45][0-9]{7}|([E|e]\d{8})|([P|p|S|s]\d{7})|([S|s|G|g]\d{8})|([Gg|Tt|Ss|Ll|Qq|Dd|Aa|Ff]\d{8})|([H|h|M|m]\d{8,10})$/,
|
|
29
29
|
num: /^-?[0-9]+\.?[0-9]*$/,
|
|
30
|
-
money:
|
|
31
|
-
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
|
|
30
|
+
money: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
|
|
32
31
|
id: /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/,
|
|
33
32
|
};
|
|
34
33
|
|
|
@@ -122,7 +122,7 @@ Component({
|
|
|
122
122
|
case 'submit': {
|
|
123
123
|
// 调用父级表单容器的提交
|
|
124
124
|
parentForm = this.$widget.closest((w) => w.getConfig?.().componentType === 'form');
|
|
125
|
-
if (parentForm
|
|
125
|
+
if (parentForm?.submit) {
|
|
126
126
|
parentForm.submit();
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
@@ -135,7 +135,7 @@ Component({
|
|
|
135
135
|
case 'reset': {
|
|
136
136
|
// 调用父级表单容器的重置
|
|
137
137
|
parentForm = this.$widget.closest((w) => w.getConfig?.().componentType === 'form');
|
|
138
|
-
if (parentForm
|
|
138
|
+
if (parentForm?.reset) {
|
|
139
139
|
parentForm.reset();
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
@@ -146,7 +146,8 @@ Component({
|
|
|
146
146
|
break;
|
|
147
147
|
}
|
|
148
148
|
default:
|
|
149
|
-
|
|
149
|
+
// eslint-disable-next-line rulesdir/no-trigger-builtin-events-manually
|
|
150
|
+
this.triggerEvent('tap', e.detail);
|
|
150
151
|
}
|
|
151
152
|
},
|
|
152
153
|
updateWidgetAPI() {
|