hookehuyr

地址控件联调

<!--
* @Date: 2022-08-30 14:32:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-08 14:57:16
* @LastEditTime: 2022-12-29 15:42:46
* @FilePath: /data-table/src/components/AreaPickerField/index.vue
* @Description: 省市区选择控件
-->
<template>
<div class="area-picker-field">
<div v-if="HideShow" class="area-picker-field">
<div class="label">{{ item.component_props.label }}<span v-if="item.component_props.required">&nbsp;*</span></div>
<van-field
name="ignore"
......@@ -22,7 +22,7 @@
<van-field
name="ignore"
v-model="address"
:placeholder="item.component_props.placeholder"
placeholder="请填写详细地址"
@blur="onBlur"
:rules="item.rules"
:border="false"
......@@ -54,7 +54,10 @@ import { areaList } from "@vant/area-data";
const props = defineProps({
item: Object,
});
// 隐藏显示
const HideShow = computed(() => {
return !props.item.component_props.disabled
})
const emit = defineEmits(["active"]);
const show_empty = ref(false);
......
......@@ -85,7 +85,7 @@ export function createComponentType(data) {
if (item.component_props.tag === 'select') {
item.component = PickerField;
}
if (item.component_props.tag === 'area_picker') {
if (item.component_props.tag === 'address') {
item.component = AreaPickerField;
}
if (item.component_props.tag === 'date') {
......