48 lines
786 B
Vue
48 lines
786 B
Vue
<template>
|
|
<section class="AiConsole">
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "AiConsole",
|
|
props: {
|
|
show: Boolean
|
|
},
|
|
data() {
|
|
return {
|
|
count: {},
|
|
}
|
|
},
|
|
methods: {
|
|
handleConsole() {
|
|
if (this.count == 5) {
|
|
this.$injectLib("https://cdn.cunwuyun.cn/vconsole.min.js", () => {
|
|
new VConsole()
|
|
this.count++
|
|
})
|
|
} else {
|
|
this.count++
|
|
}
|
|
}
|
|
},
|
|
created() {
|
|
if (this.show) {
|
|
this.count = 5
|
|
this.handleConsole()
|
|
} else {
|
|
this.count = 0
|
|
window.addEventListener('touchstart', evt => {
|
|
if (evt.touches.length == 3) this.$u.debounce(this.handleConsole, 500)
|
|
})
|
|
}
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.AiConsole {
|
|
}
|
|
</style>
|