Newer
Older
smartcity_map_front / src / views / overview / components / deleteTool.vue
StephanieGitHub on 10 Mar 2021 1 KB ADD:新增工具栏相关组件
<!--
 * @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: {
    squareShow: {
      type: Boolean,
      default: true
    }, // 矩形框选工具是否开启
    polygonShow: {
      type: Boolean,
      default: true
    }, // 多边形框选工具是否开启
    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;
    img{
      height: 18px;
      width: 18px;
    }
  }
}

</style>