<template>
    <div class="main-content">
        <div class="form-area">
            <el-form size="default" :model="form" label-width="120px">
                <el-form-item label="分组" style="width: 80%">
                    <el-select v-model="form.set" placeholder="请选择">
                       <el-option label="活动展览" :value="1"></el-option>
                       <el-option label="比赛项目" :value="2"></el-option>
                       <el-option label="星途揽月" :value="3"></el-option>
                       <el-option label="星途追风" :value="4"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="车系" style="width: 80%">
                    <el-select v-model="form.series" placeholder="请选择">
                       <el-option label="车系1" :value="1"></el-option>
                       <el-option label="车系2" :value="2"></el-option>
                       <el-option label="车系3" :value="3"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="标签" style="width: 80%">
                    <el-input placeholder="多个标签请用,隔开" type="textarea" v-model="form.tag" />
                </el-form-item>
                <el-form-item label="素材描述" style="width: 80%">
                    <el-input type="textarea" v-model="form.description" />
                </el-form-item>
                <el-form-item label="素材内容" style="width: 100%">
                    <uploadFile @change="handlerUpload" :config="{ limit: 1, accept: '.jpg, .jpeg, .png, .gif'}">
                        <el-button>上传文件</el-button>
                    </uploadFile>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="confirm">提交</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>

<script>
import {defineComponent,reactive} from 'vue'
export default defineComponent({
    name: 'v-matUpload',
    setup() {
        const activeId = reactive({
            value: 0
        });
        const form = reactive({
            series: 1,
            set: 1,
            tag: '',
            description: ''
        });
        return {
            form,
            activeId
        }
    },
    methods: {
        confirm() {
            this.$router.go(-1);
        },
        //素材上传
        handlerUpload() {

        }
    }
})
</script>

<style lang="less">
.form-area {
    width: 600px
}
</style>