<!-- add 编辑页测试 -->
<template>
    <el-scrollbar class="vue-box">
        <div class="c-card">
            <div class="submit-box--page">
                <el-steps :active="1" align-center simple style="margin-bottom: 50px;">
                    <el-step title="用户添加" icon="el-icon-Plus" />
                    <el-step title="填写信息" icon="el-icon-Edit" />
                </el-steps>
                <el-form :inline="false" label-width="8em">
                    <el-form-item label="用户id：">
                        <el-input v-model="state.model.id" />
                    </el-form-item>
                    <in-input name="普通输入：" v-model="state.model.name"></in-input>
                    <in-input type="num" name="数字输入：" v-model="state.model.age"></in-input>
                    <in-input type="password" name="密码输入：" v-model="state.model.password"></in-input>
                    <in-input type="date" name="日期输入：" v-model="state.model.createTime"></in-input>
                    <in-input type="datetime" name="日期时间：" v-model="state.model.createTime2"></in-input>
                    <in-input type="time" name="时间输入：" v-model="state.model.createTime3"></in-input>
                    <in-input type="textarea" name="多行输入：" v-model="state.model.name"></in-input>
                    <in-list type="text-list" name="文本列表：" v-model="state.model.urlList"></in-list>
                    <in-input type="slider" name="滑块参数：" v-model="state.model.widthValue"></in-input>
                    <in-input type="color" name="颜色选择：" v-model="state.model.color"></in-input>
                    <in-input type="rate" name="评分组件：" v-model="state.model.rate"></in-input>
                    <in-money-f name="金额输入：" v-model="state.model.moneyFen"></in-money-f>
                    <in-input type="img" name="图片上传：" v-model="state.model.img"></in-input>
                    <in-input type="audio" name="音频上传：" v-model="state.model.audio"></in-input>
                    <in-input type="video" name="视频上传：" v-model="state.model.video"></in-input>
                    <in-input type="file" name="文件上传：" v-model="state.model.file"></in-input>
                    <in-list type="img-list" name="多图上传：" v-model="state.model.imgList"></in-list>
                    <in-list type="audio-list" name="音频列表：" v-model="state.model.audioList"></in-list>
                    <in-list type="video-list" name="视频列表：" v-model="state.model.videoList"></in-list>
                    <in-list type="file-list" name="文件列表：" v-model="state.model.fileList"></in-list>
                    <in-list type="img-video-list" name="图视结合：" v-model="state.model.imgVideoList"></in-list>
                    <in-rich-text name="富文本编辑：" v-model="state.model.content"></in-rich-text>
                    <in-enum name="枚举单选：" v-model="state.model.status" :jv="{1: '正常', 2: '禁用'}" jtype="1" br></in-enum>
                    <in-enum name="单选文字：" v-model="state.model.status" :jv="{1: '正常', 2: '禁用'}" jtype="2" br></in-enum>
                    <in-enum name="单选按钮：" v-model="state.model.status" :jv="{1: '正常', 2: '禁用'}" jtype="3" br></in-enum>
                    <in-enum name="单选下拉框：" v-model="state.model.status" :jv="{1: '正常', 2: '禁用'}" jtype="4" br></in-enum>
                    <in-item name="自定义slot："><span>自定义slot内容</span></in-item>
                    <in-item>
                        <el-button class="btn-13" type="primary" icon="el-icon-Plus" @click="onSubmit">提交</el-button>
                    </in-item>
                    <div style="height: 200px"></div>
                </el-form>
            </div>
        </div>
    </el-scrollbar>
</template>

<script setup name="data-add">
import {getCurrentInstance, reactive} from "vue";
import router from "../../router";
const { proxy } = getCurrentInstance();

// ------------------ 数据 ------------------
const state = reactive({
    model: {
        id: router.currentRoute.value.meta.id || 0,
        name: '',
        password: '',
        age: 18,
        createTime: '',
        createTime2: '',
        createTime3: '',
        widthValue: 20,
        color: '#409eff',
        rate: 3,
        moneyFen: 101,
        img: '',
        audio: '',
        video: '',
        file: '',
        imgList: '',
        audioList: '',
        videoList: '',
        fileList: '',
        imgVideoList: '',
        urlList: '',
        content: '',
        status: 1,
    }
})

// 提交 
const onSubmit = () => {
    console.log('submit!', JSON.stringify(state.model))
};


</script>

<style scoped lang="scss">
.submit-box--page{
    max-width: 800px;
}
</style>
