demo4.vue 497 B

1234567891011121314151617181920212223
  1. <template>
  2. <m-button type="primary" @click="openFullScreen2">服务方式</m-button>
  3. </template>
  4. <script setup>
  5. import { getCurrentInstance } from 'vue-demi';
  6. const instance = getCurrentInstance();
  7. const openFullScreen2 = () => {
  8. instance.proxy.$loading.show({
  9. screen: true,
  10. text: 'Loading',
  11. icon: 'icon-refresh',
  12. iconColor: '#fff',
  13. textColor: '#fff',
  14. background: 'rgba(0, 0, 0, 0.8)'
  15. })
  16. setTimeout(()=>{
  17. instance.proxy.$loading.close()
  18. },2000)
  19. }
  20. </script>