You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.2 KiB

8 months ago
  1. <template>
  2. <view class="toast">
  3. <div class="box">
  4. <view class="top">
  5. {{ title }}
  6. </view>
  7. <view class="bottom">
  8. <!-- <u-icon name="checkmark-circle-fill"
  9. v-if="icon"
  10. color="#5ac725" size="30px"
  11. style="padding-right: 10px;"></u-icon> -->
  12. <img src="/static/46660.png"
  13. v-if="icon"
  14. alt="" style="margin-right: 10px;"/>
  15. <text>{{ text }}</text>
  16. </view>
  17. </div>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'toast',
  23. data(){
  24. return{
  25. text : "",
  26. title : "",
  27. icon : false
  28. }
  29. }
  30. }
  31. </script>
  32. <style scoped lang="scss">
  33. .toast{
  34. left: 0;
  35. top: 0;
  36. position: fixed;
  37. z-index: 99999999;
  38. width: 100vw;
  39. height: 100vh;
  40. background-color: #000000aa;
  41. .box{
  42. top:50%;
  43. left: 50%;
  44. transform: translate(-50%, -50%);
  45. position: fixed;
  46. border-radius: 10px;
  47. z-index: 99999999;
  48. text-align: center;
  49. width: 500rpx;
  50. overflow: hidden;
  51. }
  52. .top{
  53. width: 100%;
  54. height: 35px;
  55. background-color: #000;
  56. color: #FFFFFF;
  57. line-height: 35px;
  58. font-size: 13px;
  59. }
  60. .bottom{
  61. width: 100%;
  62. height: 60px;
  63. background-color: #fff;
  64. color: #333;
  65. display: flex;
  66. justify-content: center;
  67. align-items: center;
  68. }
  69. }
  70. </style>