<template>
	<view class="box white" v-show="value">
		<scroll-view scroll-y="true" :style="{height: `calc(100vh - 122rpx - ${height}px - env(safe-area-inset-bottom))`}">
			<view class="p-32 flex-col">
				<view class="flex-row flex-jus-sp flex-ali-center m-b-48" v-for="item in list" :key="item.id">
					<u-icon :name="require('@/static/image/tag.png')" size="28" color="#6C7380" label-size="30" label-color="#6C7380"
						:label="item.name"></u-icon>
					<u-icon name="plus" size="32" color="#2979FF" v-if="!item.is_add" @click="$emit('add',item)">
					</u-icon>
					<d-text text="已添加" v-else></d-text>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				diagnose: Array,
				default: () => {
					return []
				}
			},
			value: {
				type: Boolean,
				default: false
			},
			height: {
				type: [Number],
				default: 0
			},
		},
		data() {
			return {
				show: false
			};
		},
		watch: {
			value() {
				this.show = this.value
			}
		}
	};
</script>
<style lang="scss" scoped>
.box{
	position: fixed;
	z-index: 999999999;
	bottom: env(safe-area-inset-bottom);
	left: 0;
	width: 100vw;
}
</style>
