chore(@vben/playground): Add new slider captcha element and adjust references (#4490)

Add a new slider captcha action reference (`el6`) to support additional functionality and update related template and event handler to use this new reference.
pull/48/MERGE
handsomeFu 2024-09-24 14:15:41 +08:00 committed by GitHub
parent f815dcf3ae
commit 79c87c9f46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -27,6 +27,7 @@ const el2 = ref<SliderCaptchaActionType>();
const el3 = ref<SliderCaptchaActionType>(); const el3 = ref<SliderCaptchaActionType>();
const el4 = ref<SliderCaptchaActionType>(); const el4 = ref<SliderCaptchaActionType>();
const el5 = ref<SliderCaptchaActionType>(); const el5 = ref<SliderCaptchaActionType>();
const el6 = ref<SliderCaptchaActionType>();
</script> </script>
<template> <template>
@ -95,7 +96,7 @@ const el5 = ref<SliderCaptchaActionType>();
</Card> </Card>
<Card class="mb-5" title="自定义内容(slot)"> <Card class="mb-5" title="自定义内容(slot)">
<div class="flex items-center justify-center p-4 px-[30%]"> <div class="flex items-center justify-center p-4 px-[30%]">
<SliderCaptcha ref="el5" @success="handleSuccess"> <SliderCaptcha ref="el6" @success="handleSuccess">
<template #text="{ isPassing }"> <template #text="{ isPassing }">
<template v-if="isPassing"> <template v-if="isPassing">
<Bell class="mr-2 size-4" /> <Bell class="mr-2 size-4" />
@ -107,7 +108,7 @@ const el5 = ref<SliderCaptchaActionType>();
</template> </template>
</template> </template>
</SliderCaptcha> </SliderCaptcha>
<Button class="ml-2" type="primary" @click="handleBtnClick(el5)"> <Button class="ml-2" type="primary" @click="handleBtnClick(el6)">
还原 还原
</Button> </Button>
</div> </div>