|
@@ -4,7 +4,7 @@
|
|
<selectTypesVue activeSelect="2"></selectTypesVue>
|
|
<selectTypesVue activeSelect="2"></selectTypesVue>
|
|
<!-- 拼读区 -->
|
|
<!-- 拼读区 -->
|
|
<!-- 单词字母多余6个需要追加 class:pin-small-words-box -->
|
|
<!-- 单词字母多余6个需要追加 class:pin-small-words-box -->
|
|
- <view class="pin-words-box" :class="{'pin-small-words-box': wordLength > 6, isAll: data.isAll, 'pin-right-words-box': data.isAll && data.result, 'pin-error-words-box': data.isAll && !data.result}">
|
|
|
|
|
|
+ <view class="pin-words-box" :class="{'pin-small-words-box': wordLength > 6, 'isAll': data.isAll, 'pin-right-words-box': data.isAll && data.result, 'pin-error-words-box': data.isAll && !data.result}">
|
|
<view class="words-item" v-for="item in data.selectList">{{item}}</view>
|
|
<view class="words-item" v-for="item in data.selectList">{{item}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="pin-body-box">
|
|
<view class="pin-body-box">
|
|
@@ -40,6 +40,9 @@
|
|
import {
|
|
import {
|
|
getUserIdentity,
|
|
getUserIdentity,
|
|
} from "@/utils/common.js"
|
|
} from "@/utils/common.js"
|
|
|
|
+ import {useAudio} from "./useAudio.js"
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
const userCode = getUserIdentity();
|
|
const userCode = getUserIdentity();
|
|
|
|
|
|
@@ -51,13 +54,15 @@
|
|
type: Array
|
|
type: Array
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ const { handlePlay } = useAudio(props.activeWord.yinpin)
|
|
|
|
|
|
const data = reactive({
|
|
const data = reactive({
|
|
list: [],
|
|
list: [],
|
|
randomList: [],
|
|
randomList: [],
|
|
selectList: [],
|
|
selectList: [],
|
|
result: false, // 正确性
|
|
result: false, // 正确性
|
|
- isAll: false, // 是否全答
|
|
|
|
|
|
+ isAll: false, // 是否全答
|
|
})
|
|
})
|
|
|
|
|
|
onLoad(() => {
|
|
onLoad(() => {
|
|
@@ -111,11 +116,6 @@
|
|
|
|
|
|
function handleSelect(word) {
|
|
function handleSelect(word) {
|
|
|
|
|
|
- if (data.selectList.some(item => item == '') != -1) {
|
|
|
|
- data.isAll = true;
|
|
|
|
- } else {
|
|
|
|
- data.isAll = false;
|
|
|
|
- }
|
|
|
|
|
|
|
|
// 点击触发取消
|
|
// 点击触发取消
|
|
/*if (data.selectList.find(item => item == word)) {
|
|
/*if (data.selectList.find(item => item == word)) {
|
|
@@ -138,6 +138,13 @@
|
|
})
|
|
})
|
|
// 校验正确性
|
|
// 校验正确性
|
|
checkIsRight();
|
|
checkIsRight();
|
|
|
|
+
|
|
|
|
+ if (data.selectList.some(item => item == '')) {
|
|
|
|
+ data.isAll = false;
|
|
|
|
+ } else {
|
|
|
|
+ data.isAll = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
function checkIsRight() {
|
|
function checkIsRight() {
|