123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <view>
- <u-popup :show="errorShow" :closeOnClickOverlay="false" :safeAreaInsetBottom="false" @close="closeClick" mode="center" :round="10">
- <view class="error-box">
- <view class="flex_box flex_row_center">
- <u-image src="@/static/image/error-img.png" width="112rpx" height="112rpx"></u-image>
- </view>
- <view :class="['tips-value',{'is-center': isCenter}]">{{content}}</view>
- <view class="btn-box">
- <u-button class="no-btn" type="primary" :plain="true" :text="cancelBtnText" @click="closeClick"></u-button>
- <u-button class="yes-btn" type="primary" :text="confirmBtnText" @click="confirmClick"></u-button>
- </view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- export default{
- props:{
- value:{
- type:Boolean,
- default:false
- },
- content: {
- type:String,
- default:''
- },
- cancelBtnText: {
- type:String,
- default:'否'
- },
- confirmBtnText: {
- type:String,
- default:'是'
- },
- isCenter: {
- type:Boolean,
- default:false
- }
- },
- watch:{
- value: {
- handler(val) {
- this.errorShow = val
- },
- immediate:true
- }
- },
- data() {
- return {
- errorShow:false
- }
- },
- methods:{
- closeClick() {
- this.$emit('close')
- },
- confirmClick() {
- this.$emit('confirm')
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .error-box {
- width: 580rpx;
- padding: 48rpx 36rpx 48rpx;
- .tips-value {
- color: #1D212A;
- font-family: "PingFang SC";
- font-size: 32rpx;
- font-style: normal;
- font-weight: bold;
- margin-top: 32rpx;
- &.is-center{
- text-align: center;
- }
- }
- .btn-box {
- display: flex;
- justify-content: space-between;
- margin-top: 60rpx;
- .no-btn {
- width: 244rpx;
- border-radius: 16rpx;
- border: 1px solid #BFC8DB;
- color: #86909C;
- font-size: 32rpx;
- }
- .yes-btn {
- width: 244rpx;
- border-radius: 16rpx;
- background: #0256FF;
- font-size: 32rpx;
- }
- }
- }
- </style>
|