<template>
	<view>
		<x-table  v-if="type" :widget="widget" :type="type" :isShowPage="false" ref="xTable" @afterTableLoad="afterTableLoad"></x-table>
	</view>
</template>

<script>
	import ala from '@/service/ala'
	export default {
		props: {
			widget: {}
		},
		data() {
			return {
				type: ''
			}
		},
		created() {
			this.init()
		},
		methods: {
			async init() {
				if(!this.widget.value || !this.widget.value.table) {
					return ala.toast('类型传入不正确,请重新传入')
				}
				if (this.widget.value && this.widget.value.table) {
					this.type = this.widget.value.table.type
				}
				
			},
			afterTableLoad() {}
		}
	}
</script>