<template>
	<view>
		<!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true">
		</u-navbar> -->
		<j-navbar>{{navTitle}}</j-navbar>
			<Question ref="question" :tabsList="tabsList" :isShowAll="true"></Question>
		</view>
		</template>

<script>
	import {
		mapState,
		mapActions
	} from 'pinia' //引入映射函数
	import useQuestionStore from '@/jtools/store/question' //引入store
	import Question from './components/Question.vue';
	export default {
		components: {
			Question
		},
		data() {
			return {
				navTitle:'',
				tabsList:[{
					label:"答题",
					value:0
				},{
					label:"背题",
					value:1
				}],
				questionArr:[]
			}
		},
		onLoad(op) {
			if(op&&op.navTitle){
				this.navTitle=op.navTitle
				if(this.navTitle==='顺序答题'){
					this.questionArr=[...this.orderQuestion]
					this.$refs.question.getQuestionList(this.questionArr)
				}
			}
		},
		computed: {
			...mapState(useQuestionStore, ["orderQuestion"]) //映射函数，取出tagslist
		},
		methods: {
			rightClick() {
				console.log('返回');
			},
		}
	}
</script>

<style scoped>

</style>
