error-pop.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view>
  3. <u-popup :show="errorShow" :closeOnClickOverlay="false" :safeAreaInsetBottom="false" @close="closeClick" mode="center" :round="10">
  4. <view class="error-box">
  5. <view class="flex_box flex_row_center">
  6. <u-image src="@/static/image/error-img.png" width="112rpx" height="112rpx"></u-image>
  7. </view>
  8. <view class="tips-value">{{content}}</view>
  9. <view class="btn-box">
  10. <u-button class="no-btn" type="primary" :plain="true" text="否" @click="closeClick"></u-button>
  11. <u-button class="yes-btn" type="primary" text="是" @click="confirmClick"></u-button>
  12. </view>
  13. </view>
  14. </u-popup>
  15. </view>
  16. </template>
  17. <script>
  18. export default{
  19. props:{
  20. value:{
  21. type:Boolean,
  22. default:false
  23. },
  24. content: {
  25. type:String,
  26. default:''
  27. }
  28. },
  29. watch:{
  30. value: {
  31. handler(val) {
  32. this.errorShow = val
  33. },
  34. immediate:true
  35. }
  36. },
  37. data() {
  38. return {
  39. errorShow:false
  40. }
  41. },
  42. methods:{
  43. closeClick() {
  44. this.$emit('close')
  45. },
  46. confirmClick() {
  47. this.$emit('confirm')
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .error-box {
  54. width: 580rpx;
  55. padding: 48rpx 36rpx 48rpx;
  56. .tips-value {
  57. color: #1D212A;
  58. font-family: "PingFang SC";
  59. font-size: 32rpx;
  60. font-style: normal;
  61. font-weight: bold;
  62. margin-top: 32rpx;
  63. }
  64. .btn-box {
  65. display: flex;
  66. justify-content: space-between;
  67. margin-top: 60rpx;
  68. .no-btn {
  69. width: 244rpx;
  70. border-radius: 16rpx;
  71. border: 1px solid #BFC8DB;
  72. color: #86909C;
  73. font-size: 32rpx;
  74. }
  75. .yes-btn {
  76. width: 244rpx;
  77. border-radius: 16rpx;
  78. background: #0256FF;
  79. font-size: 32rpx;
  80. }
  81. }
  82. }
  83. </style>