# JpFullLoading 展示全屏的 loading

# jp-full-loading

<template>
  <div>
    <jp-button type="primary" @click="doShow">展示loading</jp-button>
    <jp-button type="primary" @click="doShowBg">自定义背景</jp-button>
  </div>
</template>

<script>
export default {
  methods: {
    doShow() {
      this.$fullLoading.show()
      setTimeout(() => {
        this.$fullLoading.hide()
      }, 3000)
    },
    doShowBg() {
      this.$fullLoading.show({ bgColor: 'rgba(0, 0, 0, 0.6)' })
      setTimeout(() => {
        this.$fullLoading.hide()
      }, 3000)
    }
  }
}
</script>
显示代码