细节调整

This commit is contained in:
kron
2025-11-11 16:31:47 +08:00
parent 6df7986c47
commit 59a2b173a6
8 changed files with 46 additions and 32 deletions

View File

@@ -1,5 +1,6 @@
<script setup>
import { ref, onMounted } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import Container from "@/components/Container.vue";
import ScreenHint2 from "@/components/ScreenHint2.vue";
import SButton from "@/components/SButton.vue";
@@ -74,6 +75,15 @@ const onEditDone = (arrow) => {
if (currentArrow.value < amount.value - 1) currentArrow.value++;
};
onLoad(() => {
uni.enableAlertBeforeUnload({
message: "现在离开会导致未提交的数据丢失,是否继续?",
success: (res) => {
console.log("已启用离开提示");
},
});
});
onMounted(() => {
const pointBook = uni.getStorageSync("last-point-book");
if (pointBook.bowtargetType) {
@@ -96,12 +106,7 @@ onMounted(() => {
</script>
<template>
<Container
:bgType="2"
bgColor="#F5F5F5"
:whiteBackArrow="false"
:onBack="() => (showTip = true)"
>
<Container :bgType="2" bgColor="#F5F5F5" :whiteBackArrow="false">
<view class="container">
<BowTargetEdit
:onChange="onEditDone"