<template>
	<view class="my-collapse-card">
		<view class="my-collapse-item">{{title}} --- {{open}}</view>
		<view class="my-card-content" :class="{'card-open': open}">
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		name: "myCollapseCard",
		props: {
			title: {
				type: String
			},
			open: {
				type:Boolean
			}
		},
	}
</script>

<style lang="scss">
	.my-collapse-item {
		height: 60rpx;
		line-height: 60rpx;
		background-color: #cc2;
	}

	.my-card-content {
		height: 0rpx;
		overflow: hidden;
		margin: 0 5px;
	}
	.card-open {
		display: block;
		height: auto;
		background: #ccc;
	}
</style>