|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
- <selectTypesVue :activeSelect="currentIndex"></selectTypesVue>
|
|
|
|
- <swiper class="word-view-swiper-box" :indicator-dots="false" :autoplay="false" :circular="false"
|
|
|
|
|
|
+ <selectTypesVue :activeSelect="currentIndex" @change="onChange"></selectTypesVue>
|
|
|
|
+ <swiper class="word-view-swiper-box" :indicator-dots="false" :autoplay="false" :circular="false" :current="+currentIndex-1"
|
|
@change="handleSwiperChange" :disable-touch="isPlaying">
|
|
@change="handleSwiperChange" :disable-touch="isPlaying">
|
|
<swiper-item>
|
|
<swiper-item>
|
|
<view class="swiper-item uni-bg-red">
|
|
<view class="swiper-item uni-bg-red">
|
|
@@ -40,7 +40,7 @@
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
|
- <audioRightWrongVue></audioRightWrongVue>
|
|
|
|
|
|
+ <audioRightWrongVue></audioRightWrongVue>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -49,13 +49,13 @@
|
|
import beiPageVue from './beiPage.vue';
|
|
import beiPageVue from './beiPage.vue';
|
|
import readContent from './readContent.vue';
|
|
import readContent from './readContent.vue';
|
|
import xuePage from './xuePage.vue';
|
|
import xuePage from './xuePage.vue';
|
|
- import audioRightWrongVue from "../components/audioRightWrong.vue";
|
|
|
|
- import selectTypesVue from './selectTypes.vue';
|
|
|
|
- import {
|
|
|
|
- ref,
|
|
|
|
- onMounted,
|
|
|
|
- onUnmounted
|
|
|
|
- } from 'vue';
|
|
|
|
|
|
+ import audioRightWrongVue from "../components/audioRightWrong.vue";
|
|
|
|
+ import selectTypesVue from './selectTypes.vue';
|
|
|
|
+ import {
|
|
|
|
+ ref,
|
|
|
|
+ onMounted,
|
|
|
|
+ onUnmounted, nextTick
|
|
|
|
+ } from 'vue';
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
activeWord: {
|
|
activeWord: {
|
|
type: Object,
|
|
type: Object,
|
|
@@ -72,7 +72,8 @@
|
|
const popupImage = ref('')
|
|
const popupImage = ref('')
|
|
const statusAudio = uni.createInnerAudioContext()
|
|
const statusAudio = uni.createInnerAudioContext()
|
|
const emits = defineEmits(['play-audio', 'goXiangjie', 'swiper-change'])
|
|
const emits = defineEmits(['play-audio', 'goXiangjie', 'swiper-change'])
|
|
- const currentIndex = ref(1)
|
|
|
|
|
|
+ const currentIndex = ref(0)
|
|
|
|
+ const mySwiperRef = ref(null);
|
|
|
|
|
|
|
|
|
|
const luyinSuccess = (imagePath, text, audioPath) => {
|
|
const luyinSuccess = (imagePath, text, audioPath) => {
|
|
@@ -94,7 +95,12 @@
|
|
|
|
|
|
function handleSwiperChange(e) {
|
|
function handleSwiperChange(e) {
|
|
emits('swiper-change', e.detail.current)
|
|
emits('swiper-change', e.detail.current)
|
|
- currentIndex.value = e.detail.current+1;
|
|
|
|
|
|
+ currentIndex.value = e.detail.current + 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function onChange(code) {
|
|
|
|
+ console.log('code',code)
|
|
|
|
+ currentIndex.value = (code + 1)
|
|
}
|
|
}
|
|
|
|
|
|
function handlePlayAudio({
|
|
function handlePlayAudio({
|