<template>
  <el-dialog title="添加店铺" center :visible="visible" @close="handleClose" :close-on-click-modal="false" append-to-body @selection-change="onSelect">
    <el-table size="mini" border :data="[{},{}]">
      <el-table-column type="selection" width="40" />
      <el-table-column label="店铺名称" />
      <el-table-column label="供应商名称" />
    </el-table>

    <div class="flex-end" style="margin-top:10px">
      <el-button size="mini" type="primary" @click="onSave">保存</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props:["visible"],
  computed:{
    _visible:{
      get(){
        return this.visible
      },
      set(newVal){
        this.$emit("update:visible", newVal)
      }
    }
  },
  data(){
    return {
      selected:[]
    }
  },
  methods:{
    handleClose(){
      this._visible = false
    },
    onSelect(list){
      this.selected = list
    },
    onSave(){
      this._visible = false
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
