2020-04-01 20:13:57 +00:00
|
|
|
<template>
|
2022-01-30 15:48:36 +00:00
|
|
|
<BaseButton>
|
2020-04-01 20:13:57 +00:00
|
|
|
<icon icon="sort-up" v-if="order === 'asc'"/>
|
2022-01-30 15:48:36 +00:00
|
|
|
<icon icon="sort-up" v-else-if="order === 'desc'" rotation="180"/>
|
2020-04-01 20:13:57 +00:00
|
|
|
<icon icon="sort" v-else/>
|
2022-01-30 15:48:36 +00:00
|
|
|
</BaseButton>
|
2020-04-01 20:13:57 +00:00
|
|
|
</template>
|
|
|
|
|
2022-01-30 15:48:36 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
import {PropType} from 'vue'
|
|
|
|
import BaseButton from '@/components/base/BaseButton.vue'
|
|
|
|
|
|
|
|
type Order = 'asc' | 'desc' | 'none'
|
|
|
|
|
|
|
|
defineProps({
|
|
|
|
order: {
|
|
|
|
type: String as PropType<Order>,
|
|
|
|
default: 'none',
|
2020-09-05 20:35:52 +00:00
|
|
|
},
|
2022-01-30 15:48:36 +00:00
|
|
|
})
|
2020-04-01 20:13:57 +00:00
|
|
|
</script>
|