<template>
<!--components/popContainer/popContainer.wxml-->
<view class="popContainer">
	<view class="contentTitle">
		{{title}}
	</view>
	<view class="content">
		<view class="slot" :style="'max-height:' + maxHeight + 'px'">
			<slot></slot>
		</view>
	</view>
</view>
</template>

<script>

export default {
  data() {
    return {
      maxHeight: 430
    };
  },

  components: {},
  props: {
    title: String
  },

  beforeMount() {
    this.setData({
      maxHeight: uni.getSystemInfoSync().windowHeight - 190
    });
  },

  methods: {
    onClickOK(e) {
      this.$emit('dismisspop', {
        detail: e
      }, {});
    }

  }
};
</script>
<style>
/* components/popContainer/popContainer.wxss */
.popContainer {
  background-color: rgba(0, 0, 0, 0.8);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column;
}

.contentTitle {
  border-radius: 10rpx 10rpx 0rpx 0rpx;
  background-color: rgba(255, 255, 255, 0.9);
  width: 490rpx;
  text-align: left;padding: 20rpx 55rpx 10rpx 55rpx;
  font-size: 32rpx;
  font-weight: bold;
  border-bottom: 1rpx #ccc solid;
}

.content {
  padding: 60rpx 55rpx 70rpx 55rpx;
  background-color: rgba(255, 255, 255, 0.9);
  width: 490rpx;
  border-radius: 0rpx 0rpx 10rpx 10rpx;
}

.slot {
  overflow: scroll;
  -webkit-overflow-scrolling: touch;
}

.slot::-webkit-scrollbar {
  display: none;
}

.btnOK {
  margin: 20rpx 35rpx 0 35rpx;
  height: 90rpx;
  border-radius: 45rpx;
  background: linear-gradient(to right, #00A7B7, #01B9C3);
  font-size: 36rpx;
  font-weight: bold;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>