Vue.js 2加载指示器组件– zLoading

Vue.js 2加载指示器组件– zLoading

插件名称:zLoading

发布时间:2020年5月21日

插件作者:vok123

中文官网 演示 GitHub下载

zLoading是Vue.js 2组件,用于创建可自定义的加载指示器。

类型:

  • Google样式的顶部加载栏。
  • 伸展
  • 弹跳

安装和下载:

# NPM
$ npm install z-loading --save

使用:

 <template>
  <button @click="clickHandle1">Start</button>
  </template>
 <script>
  export default {
  methods: {
  clickHandle1 () {
  this.$zLoading.open();
  setTimeout(() => {
  this.$zLoading.close();
  }, 3000);
  }
  }
  };
  </script>
 <template>
  <div v-zLoading="isLoading">
  <button @click="isLoading = true">Start</button>
  </div>
  </template>
 <script>
  export default {
  data () {
  return {
  isLoading: false
  };
  }
  };
  </script>
相关插件