DpopLog1.nvue 841 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="wrapper">
  3. <uni-popup ref="popup" type="dialog" :maskClass="maskClass">
  4. <uni-popup-dialog type="info" mode="base" content="立即下发新的全面巡检任务?" :duration="2000" :before-close="true" @close="close"
  5. @confirm="confirm"></uni-popup-dialog>
  6. </uni-popup>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data(){
  12. return {
  13. maskClass:{
  14. position: 'fixed',
  15. bottom: 0,
  16. top: 0,
  17. left: 0,
  18. right: 0,
  19. }
  20. }
  21. },
  22. mounted() {
  23. this.$refs.popup.open()
  24. },
  25. methods:{
  26. close(){
  27. const dsubNVue = uni.getSubNVueById('DpopLog1')
  28. dsubNVue.hide()
  29. },
  30. confirm() {
  31. const dsubNVue = uni.getSubNVueById('DpopLog1')
  32. uni.$emit('DpopLog1', {
  33. content: 'comfirm'
  34. });
  35. dsubNVue.hide()
  36. },
  37. }
  38. }
  39. </script>
  40. <style scoped>
  41. </style>