You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jwl-applet/src/pages/questionBank/questionBank.vue

57 lines
1.1 KiB

2 years ago
<template>
<view>
2 years ago
<!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true">
</u-navbar> -->
<j-navbar>{{navTitle}}</j-navbar>
2 years ago
<Question ref="question" :tabsList="tabsList" :isShowAll="true"></Question>
2 years ago
</view>
</template>
2 years ago
<script>
2 years ago
import {
mapState,
mapActions
} from 'pinia' //引入映射函数
import useQuestionStore from '@/jtools/store/question' //引入store
import Question from './components/Question.vue';
2 years ago
export default {
2 years ago
components: {
Question
},
2 years ago
data() {
return {
2 years ago
navTitle:'',
2 years ago
tabsList:[{
label:"答题",
value:0
},{
label:"背题",
value:1
2 years ago
}],
questionArr:[]
2 years ago
}
},
2 years ago
onLoad(op) {
if(op&&op.navTitle){
this.navTitle=op.navTitle
2 years ago
if(this.navTitle==='顺序答题'){
this.questionArr=[...this.orderQuestion]
this.$refs.question.getQuestionList(this.questionArr)
}
2 years ago
}
2 years ago
},
computed: {
2 years ago
...mapState(useQuestionStore, ["orderQuestion"]) //映射函数,取出tagslist
2 years ago
},
2 years ago
methods: {
2 years ago
rightClick() {
2 years ago
console.log('返回');
2 years ago
},
2 years ago
}
}
</script>
2 years ago
<style scoped>
2 years ago
</style>