？<template>
    <layout-form>
        <el-form :model="form" :loading="loading" :rules="rules" size='small' style="width:100%" label-width='120px' ref="form">
            <el-row>
                            <Field label="手机号" prop="phone" v-model="form.phone" placeholder="请输入手机号"/>
                <Field label="unionid" prop="unionid" v-model="form.unionid" placeholder="请输入unionid，同一个微信开放平台的唯一标识"/>
                <Field label="微信openId" prop="openId" v-model="form.openId" placeholder="请输入微信openId"/>
                <Field label="头像地址" prop="picImage" v-model="form.picImage" placeholder="请输入头像地址"/>
                <Field label="昵称" prop="nickname" v-model="form.nickname" placeholder="请输入昵称"/>
                <Field label="真实姓名" prop="realName" v-model="form.realName" placeholder="请输入真实姓名"/>
                <Field label="备注" prop="remark" v-model="form.remark" placeholder="请输入备注"/>
            </el-row>
            <form-buttons @submit='submitForm'/>
        </el-form>
    </layout-form>
</template>

<script>
    import form from "@/assets/mixins/form";
    export default {
        mixins: [form],
        data() {
            return {
                rules: {
                    phone:[{required: true, message: '请输入手机号', trigger: 'blur'},
                        {max: 15, message: '最多只能录入15个字符', trigger: 'blur'}],
                    unionid:[{required: true, message: '请输入unionid，同一个微信开放平台的唯一标识', trigger: 'blur'},
                        {max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
                    openId:[{required: true, message: '请输入微信openId', trigger: 'blur'},
                        {max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
                    picImage:[{required: true, message: '请输入头像地址', trigger: 'blur'},
                        {max: 500, message: '最多只能录入500个字符', trigger: 'blur'}],
                    nickname:[{required: true, message: '请输入昵称', trigger: 'blur'},
                        {max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
                    realName:[{required: true, message: '请输入真实姓名', trigger: 'blur'},
                        {max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
                    gender:[{required: true, message: '请输入1：男，2：女', trigger: 'blur'},
                        {max: 20, message: '最多只能录入20个字符', trigger: 'blur'}],
                    lastLoginTime:[{required: true, message: '请输入最后登录时间', trigger: 'blur'},],
                    remark:[{required: true, message: '请输入备注', trigger: 'blur'},
                        {max: 200, message: '最多只能录入200个字符', trigger: 'blur'}],
                    status:[{required: true, message: '请输入用户状态，0:正常，1:禁用,默认0', trigger: 'blur'},{type: 'integer', trigger: 'blur'}],
                    createUserName:[{required: true, message: '请输入创建用户名称', trigger: 'blur'},
                        {max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
                }
            };
        }
    };
</script>