<template>
	<view class="basisCellCardCss usuallyCard">
		<view class="text-lg">
			{{title}}
		</view>
		<slot></slot>
		<view class="flex justify-between margin-top" v-for="(item,index) in list" :key="index">
			<view class="w40 text-gray">
				{{item.name}}
			</view>
			<view class="w80 flex justify-end text-right">
				<view class="" v-if="item.type === 'tag' && item.value">
					<u-tag :text="item.value" :bgColor="item.bgColor" :color="item.color" :borderColor="item.borderColor"></u-tag>
				</view>
				<view class="" v-else-if="item.type === 'avatar'">
					<u-avatar size="30" :src="item.src"></u-avatar>
				</view>
        <view class="" v-else-if="item.type === 'photoList'">
          <u-upload
              :fileList="item.value"
              name="4"
              width="55"
              :height="'60px'"
              :deletable = "false"
              multiple
              :disabled="true"
              :maxCount="item.value.length"
          ></u-upload>
        </view>
        <view class="" v-else-if="item.dict">
          {{getDictDataLabel(item.dict,item.value) || '— —'}}
        </view>
        <view class="" v-else-if="item.mode === 'time'">
          {{item.value.slice(0,-9)}}
        </view>
				<view class="" v-else>
					{{item.value}}
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		name: "basisCellCard",
		props: {
			list: {
				type: Array,
				default: () => [],
				require: true
			},
			title: {
				type: String,
				default: "",
			},
		},
		data() {
			return {

			};
		},
    methods:{
    },
	}
</script>

<style lang="scss" scoped>
	.basisCellCardCss {
		padding: 20px;
	}
</style>
