<template>
	<!-- 取消flex:1 -->
	<u-modal v-bind="__attrs" v-on="__listeners" class="u-modal-box">
		<slot></slot>
	</u-modal>
</template>

<script>
import uModal from 'uview-ui/components/u-modal/props';
const uProps = uModal.props;
export default {
	name: 'cModal',
	props: {
		...uProps,
		showCancelButton: {
			type: Boolean,
			default: true,
		},
	},
	computed: {
		__attrs() {
			return {
				...this.$props,
				...this.$attrs,
			};
		},
		__listeners() {
			return {
				...this.$listeners,
			};
		},
	},
};
</script>

<style scoped lang="scss">
.u-modal-box {
	flex: 0 1 auto;

	/deep/.u-modal__content {
		& > uni-view {
			width: 100%;
		}
	}
}
</style>
