export default function (item={}) {

    let labelValue = item.id ? [item.province_name,item.city_name,item.area_name] : undefined;
    return [
        {
            label:'收货人姓名',
            placeholder:'请输入姓名',
            rules:'',
            value: item.name || '',
            key:'name',
            maxLength:20
        },
        {
            label: '手机号',
            placeholder: '请输入手机号',
            key:'mobile',
            type:'number',
            value:item.mobile || '',
            maxLength:11,
            rules:{
                empty:'',
                mobile:'手机号格式错误'
            }
        },
        {
            label: '省市区',
            placeholder: '请选择省市区',
            component:'address',
            rules: '请选择地址',
            key:'province_id',
            value: item.id ? [item.province_id,item.city_id,item.area_id] : undefined,
            labelValue:labelValue,
            valueFormat: labelValue ? labelValue.join('') : ''
        },
        {
            label: '详细地址',
            placeholder: '请输入详细地址',
            rules: '',
            value:item.address || '',
            key:'address',
            maxLength:30,
        },
        {
            label:'是否设置默认',
            component: 'switch',
            key:'is_default',
            value: item.is_default || 0
        }
    ]
}