<template>
	<view>
		<shmily-drag-image :number="number" :cols="cols" v-model="imgList"></shmily-drag-image>
	</view>
</template>

<script>
	export default {
		components: {
			
		},
		props: {
			number: {
			  type: Number,
			  default: 6
			},
			modelValue: {
			  type: Array,
			  default: []
			},
		},
		data() {
			return {
				imgList: [],
				cols: 4,
			}
		},
		created() {
			this.imgList = this.modelValue;
		},
		computed: {
			
		},
		watch: {
			imgList: {
				handler: function(newVal, oldVal) {
					this.$emit('update:modelValue', newVal); 
				}
			},
			modelValue: {
				handler: function(newVal, oldVal) {
					this.imgList = newVal;
				}
			},
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.form-item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 15px;
		
		.label {
			font-size: 30rpx;
			min-width: 200rpx;
		}
	}
	
	.upload-box {
		padding: 15px;
	}
</style>