<template>
  <u-popup v-model="show" mode="center" borderRadius="20" :mask-close-able="false">
    <view class="content">
      <view class="content-icon">
        <u-image width="100%" height="100%" src="/static/img/page-error-icon.png" />
      </view>
      <view class="content-text">{{ tipText }}</view>
      <view class="content-btn">
        <u-button type="primary" @click="confirm">确认</u-button>
      </view>
    </view>
  </u-popup>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: false
    },
    tipText: {
      type: String,
      default: '页面出错啦!!!'
    }
  },
  methods: {
    confirm() {
      this.$emit('pageErrorPopClose')
    }
  }
};
</script>

<style lang="scss" scoped>
.content {
  padding: 60rpx 40rpx;
  width: 590rpx;

  &-icon {
    width: 145rpx;
    height: 145rpx;
    margin: 10rpx auto 20rpx;
  }

  &-text {
    color: #999999;
    font-size: 32rpx;
    text-align: center;
    margin-bottom: 40rpx;
  }
}
</style>