Newer
Older
dcms_front / src / views / baseSource / components / deleteTool.vue
StephanieGitHub on 17 Mar 2021 1 KB MOD:整合基础资源、地理编码
<!--
 * @Description: 删除工具
 * @Author: 王晓颖
 * @Date: 2021-03-10 09:50:44
 -->
<template>
  <div :style="{'margin': margin}" class="draw-card">
    <el-button :disabled="disabled" class="icon-btn" title="批量删除" @click="onDelete('delete')">
      <img src="@/assets/global_images/delete.png">
    </el-button>
  </div>
</template>

<script>
  export default {
    name: 'DeleteTool',
    props: {
      margin: {
        type: String,
        default: '0px 8px'
      }, // 边距
      disabled: {
        type: Boolean,
        default: true
      } // 是否不允许操作
    },
    data() {
      return {}
    },
    methods: {
      // 点击框选
      onDelete(type) {
        this.$emit('click', type)
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .draw-card{
    margin: 0px 3px;
    .icon-btn{
      height: 40px;
      width: 40px;
      padding: 0px;
      -moz-box-shadow: 0px 1px 3px #d9d9d9; /* 老的 Firefox */
      box-shadow: 0px 1px 3px #d9d9d9;
      img{
        height: 18px;
        width: 18px;
      }
    }
  }

</style>