UI完善
This commit is contained in:
@@ -249,12 +249,12 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.delete-btn {
|
.delete-btn {
|
||||||
right: -24px;
|
|
||||||
bottom: -24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drag-btn {
|
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.drag-btn {
|
||||||
|
right: -24px;
|
||||||
|
bottom: -24px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ const goBack = () => {
|
|||||||
<view
|
<view
|
||||||
class="content"
|
class="content"
|
||||||
:style="{
|
:style="{
|
||||||
height: isHome ? '100vh' : `calc(100vh - ${isIos ? 180 : 150}rpx)`,
|
height: isHome ? '100vh' : `calc(100vh - ${isIos ? 190 : 160}rpx)`,
|
||||||
overflow,
|
overflow,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, onMounted, onUnmounted } from "vue";
|
import { ref, watch, onMounted, onUnmounted } from "vue";
|
||||||
|
import { getPointBookConfigAPI } from "@/apis";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
itemIndex: {
|
itemIndex: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -88,7 +89,7 @@ watch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
onMounted(() => {
|
const loadConfig = () => {
|
||||||
const config = uni.getStorageSync("point-book-config");
|
const config = uni.getStorageSync("point-book-config");
|
||||||
if (config) {
|
if (config) {
|
||||||
if (props.itemIndex === 0) {
|
if (props.itemIndex === 0) {
|
||||||
@@ -97,6 +98,16 @@ onMounted(() => {
|
|||||||
data.value = config.targetOption;
|
data.value = config.targetOption;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
onMounted(async () => {
|
||||||
|
const config = uni.getStorageSync("point-book-config");
|
||||||
|
if (config) {
|
||||||
|
loadConfig();
|
||||||
|
} else {
|
||||||
|
const config = await getPointBookConfigAPI();
|
||||||
|
uni.setStorageSync("point-book-config", config);
|
||||||
|
loadConfig();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -247,6 +258,9 @@ onMounted(() => {
|
|||||||
width: 85px;
|
width: 85px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
.container > view:first-child > text:nth-child(2) {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
.container > view:first-child > button {
|
.container > view:first-child > button {
|
||||||
width: 85px;
|
width: 85px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="container" :style="{ paddingTop: isIos ? '80rpx' : '50rpx' }">
|
<view class="container" :style="{ paddingTop: isIos ? '90rpx' : '60rpx' }">
|
||||||
<view class="back-btn" @click="onClick">
|
<view class="back-btn" @click="onClick">
|
||||||
<image v-if="whiteBackArrow" src="../static/back.png" mode="widthFix" />
|
<image v-if="whiteBackArrow" src="../static/back.png" mode="widthFix" />
|
||||||
<image
|
<image
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ onMounted(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.container > view:first-child > view:last-child {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
.labels {
|
.labels {
|
||||||
align-items: flex-end !important;
|
align-items: flex-end !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { ref, onMounted, onUnmounted } from "vue";
|
|||||||
import Container from "@/components/Container.vue";
|
import Container from "@/components/Container.vue";
|
||||||
import EditOption from "@/components/EditOption.vue";
|
import EditOption from "@/components/EditOption.vue";
|
||||||
import SButton from "@/components/SButton.vue";
|
import SButton from "@/components/SButton.vue";
|
||||||
import { getPointBookConfigAPI } from "@/apis";
|
|
||||||
|
|
||||||
const clickable = ref(false);
|
const clickable = ref(false);
|
||||||
const expandIndex = ref(-1);
|
const expandIndex = ref(-1);
|
||||||
@@ -32,7 +31,6 @@ const onSelect = (itemIndex, value) => {
|
|||||||
else if (itemIndex === 1) distance.value = value;
|
else if (itemIndex === 1) distance.value = value;
|
||||||
else if (itemIndex === 2) bowtargetType.value = value;
|
else if (itemIndex === 2) bowtargetType.value = value;
|
||||||
else if (itemIndex === 3) amountGroup.value = value;
|
else if (itemIndex === 3) amountGroup.value = value;
|
||||||
if (itemIndex < 3) expandIndex.value += 1;
|
|
||||||
if (
|
if (
|
||||||
bowType.value &&
|
bowType.value &&
|
||||||
distance.value &&
|
distance.value &&
|
||||||
@@ -55,10 +53,6 @@ const toEditPage = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const config = await getPointBookConfigAPI();
|
|
||||||
if (config) {
|
|
||||||
uni.setStorageSync("point-book-config", config);
|
|
||||||
}
|
|
||||||
const pointBook = uni.getStorageSync("point-book");
|
const pointBook = uni.getStorageSync("point-book");
|
||||||
if (pointBook) {
|
if (pointBook) {
|
||||||
bowType.value = pointBook.bowType;
|
bowType.value = pointBook.bowType;
|
||||||
@@ -112,6 +106,7 @@ onMounted(async () => {
|
|||||||
</view>
|
</view>
|
||||||
<view :style="{ marginBottom: '20px' }">
|
<view :style="{ marginBottom: '20px' }">
|
||||||
<SButton
|
<SButton
|
||||||
|
:rounded="50"
|
||||||
:disabled="!clickable"
|
:disabled="!clickable"
|
||||||
:onClick="toEditPage"
|
:onClick="toEditPage"
|
||||||
disabledColor="#DDDDDD"
|
disabledColor="#DDDDDD"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { onLoad } from "@dcloudio/uni-app";
|
|||||||
import Container from "@/components/Container.vue";
|
import Container from "@/components/Container.vue";
|
||||||
import BowTargetEdit from "@/components/BowTargetEdit.vue";
|
import BowTargetEdit from "@/components/BowTargetEdit.vue";
|
||||||
import ScreenHint2 from "@/components/ScreenHint2.vue";
|
import ScreenHint2 from "@/components/ScreenHint2.vue";
|
||||||
|
import SButton from "@/components/SButton.vue";
|
||||||
|
|
||||||
import { getPointBookDetailAPI } from "@/apis";
|
import { getPointBookDetailAPI } from "@/apis";
|
||||||
|
|
||||||
@@ -31,6 +32,10 @@ const onSelect = (index) => {
|
|||||||
arrows.value = groups.value[index].list.filter((item) => item.x && item.y);
|
arrows.value = groups.value[index].list.filter((item) => item.x && item.y);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const goBack = () => {
|
||||||
|
uni.navigateBack();
|
||||||
|
};
|
||||||
|
|
||||||
onLoad(async (options) => {
|
onLoad(async (options) => {
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
const result = await getPointBookDetailAPI(options.id);
|
const result = await getPointBookDetailAPI(options.id);
|
||||||
@@ -117,6 +122,9 @@ onLoad(async (options) => {
|
|||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<BowTargetEdit :src="targetSrc" :arrows="arrows" />
|
<BowTargetEdit :src="targetSrc" :arrows="arrows" />
|
||||||
|
<view :style="{ marginTop: '20px' }">
|
||||||
|
<SButton :onClick="goBack" :rounded="50">关闭</SButton>
|
||||||
|
</view>
|
||||||
<ScreenHint2 :show="showTip || showTip2" :onClose="closeTip">
|
<ScreenHint2 :show="showTip || showTip2" :onClose="closeTip">
|
||||||
<view class="tip-content">
|
<view class="tip-content">
|
||||||
<block v-if="showTip">
|
<block v-if="showTip">
|
||||||
@@ -190,6 +198,9 @@ onLoad(async (options) => {
|
|||||||
color: #999;
|
color: #999;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
.detail-data > view > text {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
.question-mark {
|
.question-mark {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ onMounted(() => {
|
|||||||
</view>
|
</view>
|
||||||
<view :style="{ marginBottom: '20px' }">
|
<view :style="{ marginBottom: '20px' }">
|
||||||
<SButton
|
<SButton
|
||||||
|
:rounded="50"
|
||||||
:disabled="!clickable"
|
:disabled="!clickable"
|
||||||
:onClick="onSubmit"
|
:onClick="onSubmit"
|
||||||
disabledColor="#DDDDDD"
|
disabledColor="#DDDDDD"
|
||||||
|
|||||||
Reference in New Issue
Block a user