liuxiaolong
2019-05-06 3e0536f508aad49f743e7bfabca34e3980a1b6e2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<template>
    <b-btn variant="primary" class="btn-circle" @click="setLockState">
      <span v-if="isLock" class="fas fa-lock"></span>
      <span v-if="!isLock" class="fas fa-lock-open"></span>
    </b-btn>
</template>
<script>
export default {
  name: 'circleLockBtn',
  data() {
    return {
      // isLock: true
    }
  },
  props: {
    isLock: {
      default: true,
      type: Boolean
    }
  },
  computed: {
    orgId() {
      return this.$store.getters.basicUserInfo.orgId
    }
  },
  methods: {
    setLockState() {
      // this.isLock = !this.isLock
      this.$emit('change', this.isLock)
    }
  }
}
</script>
<style lang="scss">
.btn-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  text-align: center;
  padding: 0;
}
</style>