Coder Social home page Coder Social logo

wanghuipeng / vue-loading Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jkchao/vue-loading

0.0 2.0 0.0 1.74 MB

๐Ÿ˜„ vue-loading ๐Ÿ˜Š

Home Page: https://jkchao.github.io/vue-loading/

JavaScript 7.53% HTML 9.75% Vue 57.01% TypeScript 25.71%

vue-loading's Introduction

vue-loading-template


Use SVG for loading.

Demo: https://jkchao.github.io/vue-loading/

Start

npm install vue-loading-template --save

Options

Prop Type Required Default Available values
type String false balls balls, bars, beat, bubbles, cylon, spin, spiningDubbles, barsCylon
color String false #5ac1dd
size Object false { width: '30px', height: '30px' }

Example in SPA

 <template>
    <div>
       <h2>bars</h2>
 ย  ย  ย  <vue-loading type="bars" color="#d9544e" :size="{ width: '50px', height: '50px' }"></vue-loading> ย  ย 
    </div>
 </template>
  <script>
  import { VueLoading } from 'vue-loading-template'
  export default {
    name: 'app',
    components: {
      VueLoading
    }
  }
  </script>

Or you can install it in your main.js

// main.js
import Vue from 'vue'
import VueLoading from 'vue-loading-template'
Vue.use(VueLoading, /** options **/)

If you use it in TypeScript, you can:

// main.ts
import Vue from 'vue'
import vueLoading, { VueLoadingOptions } from 'vue-loading-template'

Vue.use<VueLoadingOptions>(VueLoading, /** options **/)

so, you will receive the tip about optional options.

License

MIT

vue-loading's People

Contributors

jkchao avatar dannyfeliz avatar

Watchers

James Cloos avatar Muslim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.