2024-12-27 19:51:51 +08:00
|
|
|
<template>
|
|
|
|
<div class="find-game">
|
2025-01-07 19:44:05 +08:00
|
|
|
<div style="display: flex; flex-direction: column">
|
|
|
|
<span>no games created by cocos creator found!</span>
|
|
|
|
<span>{{ msg }}</span>
|
|
|
|
</div>
|
2025-01-24 11:26:51 +08:00
|
|
|
<Refresh @click="onBtnClickUpdatePage"></Refresh>
|
2024-12-27 19:51:51 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
2025-01-07 19:44:05 +08:00
|
|
|
import { defineComponent, ref } from "vue";
|
|
|
|
import { Msg, PluginEvent, ResponseSupportData } from "../../core/types";
|
2025-01-10 15:22:32 +08:00
|
|
|
import { ga } from "../../ga";
|
|
|
|
import { GA_Button } from "../../ga/type";
|
2025-01-07 19:44:05 +08:00
|
|
|
import { bridge } from "./bridge";
|
2025-01-24 11:26:51 +08:00
|
|
|
import Refresh from "./refresh.vue";
|
2024-12-28 14:25:23 +08:00
|
|
|
import { checkSupport } from "./util";
|
2024-12-27 19:51:51 +08:00
|
|
|
export default defineComponent({
|
|
|
|
name: "find",
|
2025-01-24 11:26:51 +08:00
|
|
|
components: { Refresh },
|
2024-12-27 19:51:51 +08:00
|
|
|
setup(props) {
|
2025-01-07 19:44:05 +08:00
|
|
|
bridge.on(Msg.ResponseSupport, (event: PluginEvent) => {
|
|
|
|
let data: ResponseSupportData = event.data;
|
|
|
|
const b: boolean = data.support;
|
|
|
|
if (b) {
|
|
|
|
msg.value = "";
|
|
|
|
} else {
|
|
|
|
msg.value = data.msg;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const msg = ref<string>("");
|
2024-12-27 19:51:51 +08:00
|
|
|
return {
|
2025-01-07 19:44:05 +08:00
|
|
|
msg,
|
2024-12-27 19:51:51 +08:00
|
|
|
onBtnClickUpdatePage() {
|
2025-01-10 15:22:32 +08:00
|
|
|
ga.clickButton(GA_Button.FreshManual);
|
2024-12-27 19:51:51 +08:00
|
|
|
checkSupport();
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
.find-game {
|
|
|
|
display: flex;
|
|
|
|
flex: 1;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
user-select: none;
|
|
|
|
|
|
|
|
span {
|
|
|
|
margin-right: 20px;
|
|
|
|
color: white;
|
|
|
|
font-size: 20px;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|