uspin

component based on vue3.x
2,043
Install
npm install uspin
Latest Version:1.3.0
Vue:3
License:MIT
Last Updated:Mar 30, 2022
Links: npm
Maintainer: peterroe

uspin

A vue3 component that spins on load

Install

$ npm install uspin

Usage

<script setup lang="ts">
  import { onMounted, ref } from 'vue'
  import { hide, show } from 'uspin'

  const targetRef = ref(null)
</script>

<template>
  <div ref="targetRef" class="demo">hello</div>
  <div class="demoButton">
    <button @click="show(targetRef)">show</button>
    <button @click="hide(targetRef)">hide</button>
  </div>
</template>

Config

export interface SpinConfig {
  logoColor?: string // default: '#fff'
  size?: string // default: '5em'
  bgColor?: string // default: '#ddd'
  opacity?: number // default: 0.5
}

export declare function show(targetRef: Ref<Element>, config?: SpinConfig): void

export declare function hide(targetRef: Ref<Element>): void

Preview

img

Related Packages

vite-plugin-vue2

Vite plugin for Vue2

1,474,659 618
@vue-vine/vite-plugin

Official Vite plugin for Vue Vine

95,680 1,442
vite-plugin-git-revision

Vite plugin that generates VERSION and COMMITHASH files during build based on a...

21,961 11
vite-plugin-resolve-extension-vue

A temporary workaround for issue No loader is configured for ".vue"

6,993 5
@koala/yibin-ui

宜宾大脑主题定制

4,077

Version History

Version Released Vue License
1.3.0 3.2.31 MIT
1.2.0 3.2.31 MIT
1.1.4 3.2.31 MIT
1.1.3 3.2.31 MIT
1.1.2 3.2.31 MIT