Newer
Older
dcms_front / src / views / baseSource / components / addTool.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 :title="title" class="icon-btn" icon="el-icon-plus" @click="addPoint"/>
  </div>
</template>

<script>
export default {
  name: 'AddTool',
  props: {
    title: {
      type: String,
      default: '添加部件'
    },
    squareShow: {
      type: Boolean,
      default: true
    }, // 矩形框选工具是否开启
    polygonShow: {
      type: Boolean,
      default: true
    }, // 多边形框选工具是否开启
    margin: {
      type: String,
      default: '0px 8px'
    } // 边距
  },
  data() {
    return {}
  },
  methods: {
    // 点击添加
    addPoint() {
      this.$notify({
        title: '开始' + this.title,
        message: '请在地图上选点'
      })
      this.$emit('click')
    }
  }
}
</script>

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

</style>