<template name="picGrid">
	<view class="pics4-view">
		<image v-show="loaded" v-for="(v, k) in item.text" :key="k" v-if="v.pic" class="default slide-image" :src="v.pic" mode="aspectFill" @click="Dever.viewPic(item.text, v.pic, 'pic')" @error="onError" @load="onSuccess" styles="height:auto"></image>
		<ourLoading v-show="!loaded" active text="加载中..." />
	</view>
</template>

<script>
export default {
	name: "picGrid",
	props: {
		control : {
			type : Object,
			value : null
		},
		item : {
			type    : Object,
			value	: null
		},
	},
	data() {
		return {
			position: ["tl","tr","bl","br"],
			loaded : false
		};
	},
	methods:{
		onSuccess : function(e) {
			this.loaded = true;
		},
		onError : function(e) {
			this.loaded = false;
		},
	},
}
</script>

<style>
.pics4-view{
  display: flex;
  flex-wrap: wrap;
  width: 750rpx;
  height: 100%;
}
.slide-image {
  height: 666rpx;
  width: 50%;
  display: block;
}
</style>
