<template>
	<view class="kecheng-mulu">
	<!-- 章collapse -->
		<uni-collapse v-model="collapse.chapterActiveName" accordion>
				<!-- 章 -->
			<uni-collapse-item v-for="(chapter,i) in chapterArr" :key="i"
				:title="chapter.name" :name="chapter.i">
				<scroll-view :scroll-y="true" :style="{ height: 100*5+'rpx' }">
					<!-- 节collapse -->
					<uni-collapse v-model="collapse.sectionActiveName" accordion>
						<!-- 节 -->
						<uni-collapse-item v-for="(section,j) in chapter.jieList" :key="j"
							:title="section.name" :name="section.j">
							<view>asdasd</view>
							<text>123asdasd</text>
						</uni-collapse-item>
					</uni-collapse>
				</scroll-view>
			</uni-collapse-item>
		</uni-collapse>
	</view>
</template>

<script setup>
	import {
		reactive,
		ref
	} from 'vue';
	defineProps({
		chapterArr: {
			type: Array,
			default: () => ([])
		}
	})

	const collapse = reactive({
		chapterActiveName: '0',
		sectionActiveName: '0',
	})

	const historyKjId = ref('')

	function handleClick() {}

	function getClassByType() {}

	function shitiClick() {}
</script>

<style>

</style>