File size: 740 Bytes
b5ba7a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<script lang="ts">
import { GroupOutlined, UngroupOutlined } from '@ant-design/icons-vue';
import IconSwitch from './IconSwitch.vue';

export default {
  props: {
    grouped: {
      type: Boolean,
      required: true,
    },
  },
  components: {
    GroupOutlined, UngroupOutlined, IconSwitch,
  },
};
</script>

<template>
    <div class="group-switch" title="Group/Ungroup object">
        <IconSwitch :model-value="grouped" @update:modelValue="$emit('update:grouped', $event)">
          <template #enable-state>
            <group-outlined></group-outlined>
          </template>
          <template #disable-state>
            <ungroup-outlined></ungroup-outlined>
          </template>
        </IconSwitch>
    </div>
</template>