mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
♻️ geetest 组件函数化调用
This commit is contained in:
@@ -17,12 +17,11 @@
|
||||
<div class="btn-list">
|
||||
<v-btn class="test-btn" @click="getGC">获取极验</v-btn>
|
||||
</div>
|
||||
<to-geetest v-model="visible"></to-geetest>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import ToGeetest from "../../components/overlay/to-geetest.vue";
|
||||
import showGeetest from "../../components/func/geetest";
|
||||
|
||||
const visible = ref<boolean>(false);
|
||||
|
||||
@@ -30,8 +29,8 @@ onMounted(async () => {
|
||||
visible.value = false;
|
||||
});
|
||||
|
||||
function getGC(): void {
|
||||
visible.value = true;
|
||||
async function getGC(): Promise<void> {
|
||||
await showGeetest();
|
||||
}
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
|
||||
Reference in New Issue
Block a user