添加升级显示
This commit is contained in:
@@ -4,6 +4,7 @@ import IconButton from "@/components/IconButton.vue";
|
||||
import SButton from "@/components/SButton.vue";
|
||||
import ScreenHint from "@/components/ScreenHint.vue";
|
||||
import BowData from "@/components/BowData.vue";
|
||||
import UserUpgrade from "@/components/UserUpgrade.vue";
|
||||
import { wxShare } from "@/util";
|
||||
import { directionAdjusts } from "@/constants";
|
||||
const props = defineProps({
|
||||
@@ -31,6 +32,7 @@ const props = defineProps({
|
||||
const showPanel = ref(true);
|
||||
const showComment = ref(false);
|
||||
const showBowData = ref(false);
|
||||
const showUpgrade = ref(false);
|
||||
const finished = ref(false);
|
||||
const totalRing = ref(0);
|
||||
const closePanel = () => {
|
||||
@@ -40,6 +42,9 @@ const closePanel = () => {
|
||||
}, 300);
|
||||
};
|
||||
onMounted(() => {
|
||||
if (props.result.lvl) {
|
||||
showUpgrade.value = true;
|
||||
}
|
||||
if (props.result.arrows) {
|
||||
totalRing.value = props.result.arrows.reduce(
|
||||
(last, next) => last + next.ring,
|
||||
@@ -55,7 +60,7 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view v-if="result.arrows" class="container">
|
||||
<view class="container">
|
||||
<view :class="['container-header', showPanel ? 'scale-in' : 'scale-out']">
|
||||
<image :src="tipSrc" mode="widthFix" />
|
||||
<image src="../static/finish-frame.png" mode="widthFix" />
|
||||
@@ -144,6 +149,11 @@ onMounted(() => {
|
||||
:show="showBowData"
|
||||
:onClose="() => (showBowData = false)"
|
||||
/>
|
||||
<UserUpgrade
|
||||
:show="showUpgrade"
|
||||
:onClose="() => (showUpgrade = false)"
|
||||
:lvl="result.lvl"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user