<script setup>

import {Message} from "@arco-design/web-vue";

const emits = defineEmits(['success']);
const {api, id} = defineProps({
    api: {
        type: Function,
        default: async () => {
        },
    },
    id: {
        type: Number,
        default: null,
    },
});
const move = async (status) => {
    const {code, msg} = await api({
        type: status,
        id: id,
    });
    if (code === 1) Message.success(msg);
    emits('success');
}
</script>

<template>
    <div class="flex gap-[10px]">
        <a-link :hoverable="false" @click="move(1)">
            <icon-arrow-rise/>
            上移
        </a-link>
        <a-link :hoverable="false" @click="move(0)">
            <icon-arrow-fall/>
            下移
        </a-link>
    </div>
</template>

<style scoped lang="scss">

</style>
