添加2v2页面
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
import HeaderProgress from "@/components/HeaderProgress.vue";
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
@@ -24,6 +25,7 @@ const onClick = () => {
|
||||
const loading = ref(false);
|
||||
const showLoader = ref(false);
|
||||
const pointBook = ref(null);
|
||||
const showProgress = ref(false);
|
||||
const updateLoading = (value) => {
|
||||
loading.value = value;
|
||||
};
|
||||
@@ -42,6 +44,9 @@ onMounted(() => {
|
||||
showLoader.value = true;
|
||||
}
|
||||
uni.$on("update-header-loading", updateLoading);
|
||||
if (currentPage.route === "pages/team-battle") {
|
||||
showProgress.value = true;
|
||||
}
|
||||
});
|
||||
onUnmounted(() => {
|
||||
uni.$off("update-header-loading", updateLoading);
|
||||
@@ -110,6 +115,9 @@ onUnmounted(() => {
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
<view v-if="showProgress" class="battle-progress">
|
||||
<HeaderProgress />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -176,4 +184,11 @@ onUnmounted(() => {
|
||||
padding: 5px 10px;
|
||||
margin: 3px;
|
||||
}
|
||||
.battle-progress {
|
||||
position: fixed;
|
||||
width: 60%;
|
||||
left: 20%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user