popupTask.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view @click="close" class="mask">
  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. onReady() {
  23. this.$refs.popup.open()
  24. },
  25. methods: {
  26. confirm() {
  27. uni.$emit('HpopLog1', {
  28. content: 'comfirm'
  29. });
  30. },
  31. close() {
  32. uni.navigateBack()
  33. }
  34. }
  35. }
  36. </script>
  37. <style>
  38. page {
  39. background: transparent;
  40. }
  41. .mask {
  42. position: fixed;
  43. left: 0;
  44. top: 0;
  45. right: 0;
  46. bottom: 0;
  47. /* #ifndef APP-NVUE */
  48. display: flex;
  49. /* #endif */
  50. justify-content: center;
  51. align-items: center;
  52. background-color: rgba(0, 0, 0, 0.4);
  53. }
  54. .content {
  55. width: 200px;
  56. height: 200px;
  57. background-color: #007AFF;
  58. }
  59. .text {
  60. /* #ifndef APP-NVUE */
  61. display: block;
  62. /* #endif */
  63. line-height: 200px;
  64. text-align: center;
  65. color: #FFFFFF;
  66. }
  67. </style>