success-pop.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view>
  3. <u-popup :show="successShow" :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/success-img.png" width="240rpx" height="240rpx"></u-image>
  7. </view>
  8. <view class="tips-value">{{content}}</view>
  9. <view class="btn-box">
  10. <u-button class="yes-btn" type="primary" text="返回" @click="backClick"></u-button>
  11. </view>
  12. </view>
  13. </u-popup>
  14. </view>
  15. </template>
  16. <script>
  17. export default{
  18. props:{
  19. value:{
  20. type:Boolean,
  21. default:false
  22. },
  23. content: {
  24. type:String,
  25. default:''
  26. }
  27. },
  28. watch:{
  29. value: {
  30. handler(val) {
  31. this.successShow = val
  32. },
  33. immediate:true
  34. }
  35. },
  36. data() {
  37. return {
  38. successShow:false
  39. }
  40. },
  41. methods:{
  42. closeClick() {
  43. this.$emit('close')
  44. },
  45. backClick() {
  46. this.$emit('backClick')
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .error-box {
  53. width: 580rpx;
  54. padding: 48rpx 36rpx 48rpx;
  55. .tips-value {
  56. color: #1D212A;
  57. font-family: "PingFang SC";
  58. font-size: 32rpx;
  59. font-style: normal;
  60. font-weight: bold;
  61. margin-top: 30rpx;
  62. text-align: center;
  63. }
  64. .btn-box {
  65. display: flex;
  66. margin-top: 40rpx;
  67. .yes-btn {
  68. border-radius: 16rpx;
  69. background: #0256FF;
  70. font-size: 32rpx;
  71. }
  72. }
  73. }
  74. </style>