<template>
    <el-dialog title="预览" :visible.sync="previewData.dialogFormVisible" :fullscreen="true">
        <el-form v-model="previewData" border>
            <el-form-item label="轮播图名称" label-width="120px">
                <span>{{previewData.title}}</span>
            </el-form-item>
        	 <el-table-column label="图片信息" 
            v-for="item in previewData.content" :key="item.id" v-if="item.is_show === '1'">
                <el-form-item label="序号" label-width="120px">
                    <span>{{item.sort}}</span>
                </el-form-item>
                <el-form-item label="图片" label-width="120px">
                    <img :src="item.url" />
                </el-form-item>
                <el-form-item label="缩略图" label-width="120px">
                    <img :src="item.thumbnail_url" />
                </el-form-item>
                <el-form-item label="图片名称" label-width="120px">
                    <span>{{item.name}}</span>
                </el-form-item>
                <el-form-item label="图片链接" label-width="120px">
                    <span>{{item.redirect_url}}</span>
                </el-form-item>
                <el-form-item label="状态" label-width="120px">
                    <span>{{item.is_show === '1' ? '显示' : '隐藏' }}</span>
                </el-form-item>
            </el-table-column>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="previewData.dialogFormVisible = false">确 定</el-button>
        </div>
    </el-dialog>
</template>
<script>
    export default{
        name: 'preview',
        props: {
            previewData: {
                type: Object,
                default: () => {}
            }
        },
        data() {
            return {
                previewDatas: {}
            };
        },
        methods: {
            previewDialogData(data) {
                // this.previewDatas = data;
            }
        },
    };
</script>