uni-app开发的微信小程序里使用vuex不正常问题
<template>
<view class="lesson-list-com">
<view class="lesson-list-all" v-for="(item ,i) in list " :key="i">
<view class="split-bot"></view>
<view class="directory-list">
<view :class="['index',(playAudioId==item.audioId && globalCourseId==courseId)?'colorOrange':'index']"
@click="toDetail(item)" v-if="i+1 < 10">
0{{i+1}}
</view>
<view :class="['index',(playAudioId==item.audioId && globalCourseId==courseId)?'colorOrange':'index']"
@click="toDetail(item)" v-else>
{{i+1}}
</view>
<view class="title-view" @click="toDetail(item)">
<view
:class="['two-line',(playAudioId==item.audioId && globalCourseId==courseId)?'colorOrange':'title']">
{{item.title}}
</view>
</view>
<view class="status-view" v-else>
<image v-if="(playAudioId==item.audioId && globalCourseId==courseId)"
src="../../static/img/play/detailPlaying.png" mode="aspectFit"></image>
<image v-else @click="toPlay(item)" src="../../static/img/play/detailPlay.png" mode="aspectFit">
</image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
list: [],
lessonDetail: {},
playBtn: {
type: String,
default: 'play'
},
courseId: {
type: Number,
default: 0
}
},
data() {
return {
};
},
computed: {
uni-app开发的微信小程序里使用vuex,在IOS系统中,vuex的数据更新了,但是IOS页面上的数据没有更新,安卓手机是正常的
playAudioId() {
return this.$store.state.playAudioId;
},
globalCourseId() {
return this.$store.state.courseId
}
},
methods: {
}
}
</script>