<script setup>

import {ref} from "vue"

const emits = defineEmits(["change"])

const {isVisible} = (function () {
	return {
		isVisible: ref(false)
	}
})()

const show = function () {
	isVisible.value = !isVisible.value
	emits("change", isVisible.value)
}


</script>

<template>
	<tbody>
	<tr>
		<td colspan="2">
			<a href="" @click.prevent="show()"><span v-if="!isVisible">更多选项</span><span v-if="isVisible">收起选项</span><i class="pi" :class="{'pi-angle-down':!isVisible, 'pi-angle-up':isVisible}"></i></a>
		</td>
	</tr>
	</tbody>
</template>

<style scoped>
</style>
