update
This commit is contained in:
@@ -1,14 +1,36 @@
|
||||
<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">
|
||||
<a-link :hoverable="false" @click="move(1)">
|
||||
<icon-arrow-rise/>
|
||||
上移
|
||||
</a-link>
|
||||
<a-link :hoverable="false">
|
||||
<a-link :hoverable="false" @click="move(0)">
|
||||
<icon-arrow-fall/>
|
||||
下移
|
||||
</a-link>
|
||||
|
||||
Reference in New Issue
Block a user