ApopLog1.nvue 790 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 subNVue = uni.getSubNVueById('ApopLog1')
  28. subNVue.hide()
  29. },
  30. confirm() {
  31. this.close()
  32. uni.$emit('ApopLog1', {
  33. content: 'comfirm'
  34. });
  35. },
  36. }
  37. }
  38. </script>
  39. <style scoped>
  40. </style>