Skip to content

v-loading

功能介绍

添加加载动画

示例

使用

javascript
<script setup lang="ts">
import { ref } from 'vue'

const loading = ref(false)
</script>
<template>
  <div
    v-loading="loading"
    :style="{
      width: '180px',
      height: '180px',
      backgroundImage: 'url('https://avatars.githubusercontent.com/u/108746194?s=96&v=4')',
      backgroundSize: 'cover',
      borderRadius: '5px'
    }"></div>
  <button @click="loading.value = !loading.value">状态切换</button>
</template>

Released under the MIT License.