UI优化
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import useStore from "@/store";
|
||||
import { simulShootAPI } from "@/apis";
|
||||
import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
const { device } = storeToRefs(store);
|
||||
const isIos = ref(true);
|
||||
|
||||
const props = defineProps({
|
||||
@@ -18,12 +13,6 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const simulShoot = async () => {
|
||||
if (device.value.deviceId) {
|
||||
await simulShootAPI(device.value.deviceId);
|
||||
}
|
||||
};
|
||||
|
||||
const onClick = () => {
|
||||
if (props.onBack) props.onBack();
|
||||
else uni.navigateBack();
|
||||
@@ -41,7 +30,6 @@ onMounted(() => {
|
||||
<image src="../static/back.png" mode="widthFix" />
|
||||
</view>
|
||||
<text>{{ title }}</text>
|
||||
<view class="simul" @click="simulShoot">模拟射箭</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -67,8 +55,4 @@ onMounted(() => {
|
||||
.container > text {
|
||||
color: #fff;
|
||||
}
|
||||
.simul {
|
||||
color: #fff;
|
||||
margin-left: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user