<template>
  <el-dialog
    v-dialogDrag
    title="关注品种"
    :visible.sync="isShow"
    width="410px"
    append-to-body
    center
    @close="diaClose"
    class="permission-dialog">
    <el-tag disable-transitions v-for="(item,index) in PermissionList" :key="index">{{item}}</el-tag>
    <span slot="footer">
        <el-button type="primary" @click="diaClose">确定</el-button>
    </span>
  </el-dialog>
  
</template>

<script>
export default {
    props: {
        isShow: {
            type: Boolean,
            require: true
        },
        item:{
            type:Object,
            default:{Permission:''}
        }
    },
    computed: {
        PermissionList() {
            return this.item.Permission?this.item.Permission.split(','):[]
        }
    },
    methods: {
        diaClose() {
            this.$emit('update:isShow',false)
        }
    },
}
</script>

<style lang="scss">
.permission-dialog{
.el-dialog__body{
    display: flex;
    flex-wrap: wrap;
    .el-tag{
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin: 0 10px 10px;
        width: 100px;
        height: 40px;
        line-height: 20px;
        font-size: 14px;
        white-space:normal;
    }
}
}

</style>