cwg-SuccessPrompt.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view class="success-prompt-fullscreen" v-if="props.show">
  3. <image mode="widthFix" 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">{{ t('Custom.Settings.Title') }}</u-button>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script setup lang="ts">
  14. import { useI18n } from 'vue-i18n'
  15. const { t } = useI18n()
  16. const props = withDefaults(
  17. defineProps<{
  18. title?: string;
  19. btnTitle?: string;
  20. desc?: string;
  21. btnClick?: () => void;
  22. show?: boolean;
  23. }>(),
  24. {
  25. title: "Retrive Successfully",
  26. btnTitle: "Done",
  27. desc: "You can now use your new password to make secure transactions.",
  28. btnClick: () => { },
  29. }
  30. );
  31. </script>
  32. <style scoped lang="scss">
  33. @import "@/uni.scss";
  34. .success-prompt-fullscreen {
  35. position: fixed;
  36. top: 0;
  37. left: 0;
  38. width: 100vw;
  39. height: 100vh;
  40. background: #fff;
  41. display: flex;
  42. flex-direction: column;
  43. justify-content: center;
  44. align-items: center;
  45. z-index: 2000;
  46. }
  47. .success-prompt-img {
  48. margin-bottom: px2rpx(62);
  49. }
  50. .success-prompt-title {
  51. text-align: center;
  52. font-size: px2rpx(24);
  53. font-weight: bold;
  54. color: #222;
  55. line-height: px2rpx(28);
  56. margin-bottom: px2rpx(31);
  57. }
  58. .success-prompt-desc {
  59. font-size: px2rpx(16);
  60. color: var(--bs-heading-color);
  61. text-align: center;
  62. max-width: px2rpx(620);
  63. line-height: px2rpx(30);
  64. padding: 0 px2rpx(20);
  65. }
  66. </style>