优化调起

This commit is contained in:
aixianling
2022-09-07 09:20:43 +08:00
parent e4ee17cdb3
commit 661674c5cb

View File

@@ -1,6 +1,5 @@
<template> <template>
<section class="AiConsole"> <section class="AiConsole">
<div class="vconsoleBtn" @click="$u.debounce(handleVConosle,500)"/>
</section> </section>
</template> </template>
@@ -13,7 +12,7 @@ export default {
} }
}, },
methods: { methods: {
handleVConosle() { handleConsole() {
if (this.count == 5) { if (this.count == 5) {
this.$injectLib("https://cdn.cunwuyun.cn/vconsole.min.js", () => { this.$injectLib("https://cdn.cunwuyun.cn/vconsole.min.js", () => {
new VConsole() new VConsole()
@@ -26,18 +25,14 @@ export default {
}, },
created() { created() {
this.count = 0 this.count = 0
window.addEventListener('touchstart', evt => {
if (evt.touches.length == 3) this.$u.debounce(this.handleConsole, 500)
})
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.AiConsole { .AiConsole {
.vconsoleBtn {
position: fixed;
top: 0;
width: 60px;
height: 60px;
z-index: 202203181519;
}
} }
</style> </style>