agreeDialog.vue 1023 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <uni-popup ref="agreePopup" :animation="false" :is-mask-click="false"
  3. mask-background-color="rgba(255, 255, 255, 0.6);">
  4. <view class="agree-sections-dialog">
  5. <view class="sections-content-box">
  6. <view class="agree-title">用户协议及隐私保护</view>
  7. <view class="agree-tip">我已阅读并同意《用户协议》和《隐私政策》</view>
  8. <view class="confirm-btn" @click="confirmBtn"></view>
  9. <text class="not-confirm-btn" @click="handleClose">不同意</text>
  10. </view>
  11. </view>
  12. </uni-popup>
  13. </template>
  14. <script setup>
  15. import { ref } from 'vue';
  16. const agreePopup = ref(null); // 索引
  17. const $emit = defineEmits(['confirm-btn'])
  18. // 打开弹窗
  19. function handleShow() {
  20. agreePopup.value.open();
  21. }
  22. // 关闭弹窗
  23. function handleClose() {
  24. agreePopup.value.close();
  25. }
  26. // 同意并登录按钮
  27. function confirmBtn(){
  28. $emit('confirm-btn');
  29. agreePopup.value.close();
  30. }
  31. defineExpose({
  32. handleShow
  33. })
  34. </script>
  35. <style>
  36. </style>