cwg-SuccessPrompt.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="success-prompt-fullscreen">
  3. <img class="success-prompt-img" src="/static/images/vector.png" alt="success" />
  4. <view class="success-prompt-title">{{ props.title }}</view>
  5. <view class="success-prompt-desc">{{ props.desc }}</view>
  6. <view class="fixed-btn">
  7. <view class="cwg-button">
  8. <u-button type="primary" block @click="props.btnClick">{{
  9. props.btnTitle
  10. }}</u-button>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script setup lang="ts">
  16. const props = withDefaults(
  17. defineProps<{
  18. title?: string;
  19. btnTitle?: string;
  20. desc?: string;
  21. btnClick?: () => void;
  22. }>(),
  23. {
  24. title: "Retrive Successfully",
  25. btnTitle: "Done",
  26. desc: "You can now use your new password to make secure transactions.",
  27. btnClick: () => { },
  28. }
  29. );
  30. </script>
  31. <style scoped lang="scss">
  32. @import "@/uni.scss";
  33. .success-prompt-fullscreen {
  34. position: fixed;
  35. top: 0;
  36. left: 0;
  37. width: 100vw;
  38. height: 100vh;
  39. background: #fff;
  40. display: flex;
  41. flex-direction: column;
  42. justify-content: center;
  43. align-items: center;
  44. z-index: 2000;
  45. }
  46. .success-prompt-img {
  47. margin-bottom: px2rpx(62);
  48. }
  49. .success-prompt-title {
  50. text-align: center;
  51. font-size: px2rpx(44);
  52. font-weight: bold;
  53. color: #222;
  54. line-height: px2rpx(28);
  55. margin-bottom: px2rpx(31);
  56. }
  57. .success-prompt-desc {
  58. font-size: px2rpx(31);
  59. color: #666;
  60. text-align: center;
  61. max-width: px2rpx(620);
  62. line-height: px2rpx(44);
  63. }
  64. </style>