選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Agreement.vue 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <div class="custom-popup" v-show="start">
  3. <div class="custom-popup-content">
  4. <div class="as-gravity-center as-bold" style="margin-top: 10px;">温馨提示</div>
  5. <div class="as-weight as-gravity-center as-layout-vertical" style="padding:20px;">
  6. <slot></slot>
  7. </div>
  8. <view class="as-line-h"></view>
  9. <div style="display: flex;flex-direction: row;height: 40px;">
  10. <text class="as-weight as-gravity-center as-bold" @click="disagree">不同意</text>
  11. <view class="as-line-w"></view>
  12. <text class="as-weight as-gravity-center as-bold" style="color: rgba(90, 110, 151);" @click="consent">同意</text>
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script setup lang='ts'>
  18. defineProps({
  19. start: {
  20. type: Boolean,
  21. default: false
  22. }
  23. })
  24. const emit = defineEmits([
  25. "disagree",
  26. "consent"
  27. ])
  28. //取消
  29. function disagree(){
  30. emit('disagree')
  31. }
  32. //确认
  33. function consent(){
  34. emit('consent')
  35. }
  36. </script>
  37. <style lang='scss' scoped>
  38. .custom-popup {
  39. position: fixed;
  40. top: 0;
  41. left: 0;
  42. right: 0;
  43. bottom: 0;
  44. display: flex;
  45. align-items: center;
  46. justify-content: center;
  47. background-color: rgba(0, 0, 0, 0.5);
  48. z-index: 9999;
  49. }
  50. .custom-popup-content {
  51. display: flex;
  52. flex-direction: column;
  53. width: 280px;
  54. background-color: #fff;
  55. border-radius: 8px;
  56. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  57. }
  58. </style>