mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-20 00:48:43 +00:00
40 lines
929 B
Vue
40 lines
929 B
Vue
|
<template>
|
||
|
<div v-if="show" class="test">
|
||
|
<CCSection name="功能测试">
|
||
|
<CCButton @click="onClickHasCocosGame">Has CocosGame</CCButton>
|
||
|
<CCButton @click="onClickNoCocosGame">No CocosGame</CCButton>
|
||
|
</CCSection>
|
||
|
</div>
|
||
|
</template>
|
||
|
<script lang="ts">
|
||
|
import ccui from "@xuyanfeng/cc-ui";
|
||
|
import { defineComponent, ref } from "vue";
|
||
|
const { CCButton, CCSection } = ccui.components;
|
||
|
export default defineComponent({
|
||
|
name: "test",
|
||
|
components: { CCButton, CCSection },
|
||
|
emits: ["validGame"],
|
||
|
props: {
|
||
|
isCocosGame: { type: Boolean, default: false },
|
||
|
},
|
||
|
setup(props, { emit }) {
|
||
|
const show = ref(__DEV__);
|
||
|
return {
|
||
|
show,
|
||
|
onClickHasCocosGame() {
|
||
|
emit("validGame", true);
|
||
|
},
|
||
|
onClickNoCocosGame() {
|
||
|
emit("validGame", false);
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
});
|
||
|
</script>
|
||
|
<style scoped lang="less">
|
||
|
.test {
|
||
|
color: rgb(192, 56, 56);
|
||
|
font-size: 11%;
|
||
|
}
|
||
|
</style>
|