<template>
    <div class="font12" @click="handleBtnClick()" style="display: flex; align-items: center">
        <div style="margin-right: 4px">
            <span>打印份数设置</span>
            <el-tooltip class="box-item" effect="dark" content="默认打印2份,关闭打印1份" placement="top">
                <el-icon style="cursor: pointer"><QuestionFilled /></el-icon>
            </el-tooltip>
        </div>

        <el-switch v-model="switchValue" />
    </div>
</template>

<script setup lang="ts">
import { QuestionFilled } from "@element-plus/icons-vue";
const props: any = defineProps<{
    selectionList?: any[];
    handleBtnItemCallback?: () => void;
    ruleForm: any;
}>();
console.log(props);
const switchValue = ref(true);

const emits = defineEmits<{
    (e: "handleBtnItemCallback", result: Record<string, any>): void;
}>();

// 提交事件
const handleBtnClick = () => {
    emits("handleBtnItemCallback", {
        type: "Switch",
        data: switchValue.value ? 2 : 1
    });
};
</script>

<style scoped>
@import "../index.scss";
</style>
