<template>
    <layout-view>
        <el-descriptions  :title="title" :column="column" :size="size" :colon="false" border>
            <template slot="title">
                <i class="el-icon-tickets"></i>
                基本详细信息
            </template>
            <template slot="extra">
                <el-button type="primary" @click="$router.go(-1)" size="small">返回</el-button>
            </template>
                                    <el-descriptions-item label="分类id" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.categoryId}}
                        </el-descriptions-item>
                        <el-descriptions-item label="分类名称" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.categoryName}}
                        </el-descriptions-item>
                        <el-descriptions-item label="标题" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.title}}
                        </el-descriptions-item>
                        <el-descriptions-item label="标题logo" label-class-name="labelClass" content-class-name="contentClass">
                            <imageUpload v-model="form.titleLogoPath" prePath="/file/preview"/>
                        </el-descriptions-item>
                        <el-descriptions-item label="内容" label-class-name="labelClass" content-class-name="contentClass">
                            <editor v-model="form.content" :min-height="256"/>
                        </el-descriptions-item>
                        <el-descriptions-item label="置顶 " label-class-name="labelClass" content-class-name="contentClass">
                            {{ util_formatters("top", form.top) }}
                        </el-descriptions-item>
                        <el-descriptions-item label="浏览次数" label-class-name="labelClass" content-class-name="contentClass">
                            {{form.viewNums}}
                        </el-descriptions-item>
                        <el-descriptions-item label="发布时间" label-class-name="labelClass" content-class-name="contentClass">
                            {{ util_formatterDate(form.publishTime)}}
                        </el-descriptions-item>
        </el-descriptions>

    </layout-view>
</template>

<script>
    import view from "@/assets/mixins/view";
    import ImageUpload from '@/components/ImageUpload';
    import Editor from '@/components/Editor';
    export default {
        mixins: [view],
        components: {
            ImageUpload,
            Editor,
        },
        methods: {

        },
        data() {
            return {
                size:"small",
                column:2,
                toString:[
                    "top",
                    "viewNums",
                ],
                toArrays: [

                ],
                toDate: [

                ]
            }
        }
    }
</script>
<style lang="less">
    .labelClass{
        width: 200px;
    }
    .el-descriptions__body{
        margin-left: 5px;
        margin-right: 5px;
        color: #606266;
        background-color: #FFF;
    }
    .contentClass{
        width: 600px;
    }
</style>