bl-common-vue3 3.8.77 → 3.8.79
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/package.json
CHANGED
|
@@ -174,7 +174,7 @@ export default defineComponent({
|
|
|
174
174
|
{
|
|
175
175
|
nation_code: phoneCountry.toString(),
|
|
176
176
|
nation_name: '',
|
|
177
|
-
phone_match_rule: '
|
|
177
|
+
phone_match_rule: '^\\d+$', // 默认为仅数字的正则。
|
|
178
178
|
id: -1
|
|
179
179
|
}
|
|
180
180
|
]
|
|
@@ -193,7 +193,9 @@ export default defineComponent({
|
|
|
193
193
|
},
|
|
194
194
|
success: (res) => {
|
|
195
195
|
state.phoneCountryList = res.list || [];
|
|
196
|
-
|
|
196
|
+
formState.value.phone_country = props?.data?.phone_country && props?.data?.phone_country != '0' ? props?.data?.phone_country.toString() : undefined;
|
|
197
|
+
formState.value.phone = props?.data?.phone || "";
|
|
198
|
+
handleNotInPhoneCountryList(props?.data?.phone_country)
|
|
197
199
|
phoneCountryHandleInit()
|
|
198
200
|
},
|
|
199
201
|
fail: () => {},
|
|
@@ -202,18 +204,23 @@ export default defineComponent({
|
|
|
202
204
|
|
|
203
205
|
getPhoneCountryList();
|
|
204
206
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
handleNotInPhoneCountryList(val?.phone_country)
|
|
207
|
+
const dataStr = computed(() => {
|
|
208
|
+
return JSON.stringify(props.data)
|
|
209
|
+
})
|
|
209
210
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
watch(
|
|
212
|
+
() => dataStr.value,
|
|
213
|
+
(newVal, oldVal) => {
|
|
214
|
+
if(newVal && newVal != oldVal) {
|
|
215
|
+
const val = props.data
|
|
216
|
+
if ((val.phone_country || val.phone) && (formState.value.phone_country !== val.phone_country || formState.value.phone !== val.phone)) {
|
|
217
|
+
formState.value.phone_country = val && val.phone_country && val.phone_country != '0' ? val.phone_country.toString() : undefined;
|
|
218
|
+
formState.value.phone = val.phone || "";
|
|
219
|
+
handleNotInPhoneCountryList(formState.value.phone_country)
|
|
220
|
+
phoneCountryHandleInit()
|
|
221
|
+
}
|
|
222
|
+
}
|
|
215
223
|
},
|
|
216
|
-
{ deep: true, immediate: true }
|
|
217
224
|
);
|
|
218
225
|
|
|
219
226
|
// 获取手机号校验结果
|
|
@@ -397,6 +397,12 @@ export default defineComponent({
|
|
|
397
397
|
isVisit:{
|
|
398
398
|
type: Boolean,
|
|
399
399
|
default: false
|
|
400
|
+
},
|
|
401
|
+
roomParams: {
|
|
402
|
+
type: Object,
|
|
403
|
+
default: () => {
|
|
404
|
+
return {};
|
|
405
|
+
},
|
|
400
406
|
}
|
|
401
407
|
},
|
|
402
408
|
setup(props, { emit }) {
|
|
@@ -1611,6 +1617,7 @@ export default defineComponent({
|
|
|
1611
1617
|
let paramsObj = {
|
|
1612
1618
|
village_id: layOrBuild.extra.village_id,
|
|
1613
1619
|
layer_id: layOrBuild.id,
|
|
1620
|
+
...props.roomParams,
|
|
1614
1621
|
};
|
|
1615
1622
|
if (noLayer.value) {
|
|
1616
1623
|
delete paramsObj.layer_id;
|
|
@@ -1737,6 +1744,7 @@ export default defineComponent({
|
|
|
1737
1744
|
layer_id: room?.extra?.layer_id,
|
|
1738
1745
|
parent_room_id: room.id,
|
|
1739
1746
|
build_id: room?.extra?.build_id,
|
|
1747
|
+
...props.roomParams,
|
|
1740
1748
|
};
|
|
1741
1749
|
if (props.roomType?.length) {
|
|
1742
1750
|
paramsObj.room_type = props.roomType.join(',');
|