<script setup>

import useUtils from "@/utils/utils.js"
import {ref} from "vue"

const utils = useUtils()

const props = defineProps(["v-server-id", "v-config-code"])

const {serverId, configCode} = (function () {
	return {
		serverId: ref(props.vServerId),
		configCode: ref(props.vConfigCode)
	}
})()

const copy = function () {
	utils.popup("/servers/server/settings/copy?serverId=" + serverId.value + "&configCode=" + configCode.value, {
		callback: function () {
			utils.success("批量复制成功")
		}
	})
}


</script>

<template>
	<a href="" @click.prevent="copy" class="flex flex-row items-center"><span style="font-size: 0.95em">批量</span>&nbsp;<i class="icon copy small"></i></a>
</template>

<style scoped>
</style>
