update:新手教程流程优化

This commit is contained in:
2026-05-27 17:42:43 +08:00
parent b8d1654476
commit d932ce3dea
5 changed files with 194 additions and 68 deletions

View File

@@ -142,8 +142,8 @@ onBeforeUnmount(() => {
</view>
<block
v-if="
'-凹造型-感知距离-小试牛刀'.indexOf(title) === -1 ||
'-凹造型-感知距离-小试牛刀'.indexOf(title) === 10
'-箭前准备-感知距离-小试牛刀'.indexOf(title) === -1 ||
'-箭前准备-感知距离-小试牛刀'.indexOf(title) === 11
"
>
<text>{{ title }}</text>
@@ -151,12 +151,12 @@ onBeforeUnmount(() => {
<block
v-if="
title &&
'-凹造型-感知距离-小试牛刀'.indexOf(title) !== -1 &&
'-凹造型-感知距离-小试牛刀'.indexOf(title) !== 10
'-箭前准备-感知距离-小试牛刀'.indexOf(title) !== -1 &&
'-箭前准备-感知距离-小试牛刀'.indexOf(title) !== 11
"
>
<view class="first-try-steps">
<text :class="title === '-凹造型' ? 'current-step' : ''">凹造型</text>
<text :class="title === '-箭前准备' ? 'current-step' : ''">箭前准备</text>
<text>-</text>
<text :class="title === '-感知距离' ? 'current-step' : ''"
>感知距离</text

View File

@@ -1,5 +1,5 @@
<script setup>
import { ref } from "vue";
import { ref, watch } from "vue";
const props = defineProps({
interval: {
@@ -14,13 +14,24 @@ const props = defineProps({
type: Array,
default: () => [],
},
current: {
type: Number,
default: 0,
},
onChange: {
type: Function,
default: (index) => {},
},
});
const currentIndex = ref(0);
const currentIndex = ref(props.current);
watch(
() => props.current,
(index) => {
currentIndex.value = index;
}
);
const handleChange = (e) => {
currentIndex.value = e.detail.current;
@@ -75,7 +86,7 @@ const handleChange = (e) => {
.dots {
position: absolute;
bottom: 5%;
bottom: 2%;
left: 50%;
transform: translateX(-50%);
display: flex;