CommandSendButton.vue
1.05 KB
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
43
44
45
46
47
48
49
50
51
<script lang="ts" setup>
  import icon from '/src/assets/icons/command.svg';
  const props = defineProps<{
    value?: boolean;
  }>();
  const emit = defineEmits(['update:value', 'change']);
  const handleChange = (event: Event) => {
    const _value = (event.target as HTMLInputElement).checked;
    emit('update:value', _value);
    emit('change', _value);
  };
</script>
<template>
  <div class="command-send-button">
    123
    <a href="javascript:;">
      <img :src="icon" alt="" />
    </a>
  </div>
</template>
<style scoped lang="less">
  .command-send-button {
    width: 80px;
    height: 60px;
    position: relative;
    a {
      position: absolute;
      box-sizing: border-box;
      cursor: pointer;
      text-decoration: none;
      color: #fff;
      background: #f2385a;
      top: 0;
      padding: 0 16px;
      height: 60px;
      width: 80px;
      overflow: hidden;
      font-size: 20px;
      line-height: 60px;
      border-radius: 10px;
      box-shadow: 0 15px 0 0 #f02046, 0 0 20px 0 #bbb;
      transition: all 0.2s;
    }
  }
</style>