# Loading加载组件

# 使用教程

点击查看教程

动画来源:https://github.com/duenyang/css3-loading

# 使用文档

# 导入

main.js中:

import { Loading } from 'cpm-ui'
Vue.use(Loading)
1
2

# 调用

挂载在vue.prototype上,vue实例中,直接使用 this.$loading({options}) 使用。

this.$loading('');

this.$loading(1); // 1 ~ 16
1
2
3

# 属性props(propsData)

参数 说明 类型 可选值 默认值
cliperStyleObj loading蒙层样式 Ojbect {}
type loading类型 Number 1~16 1

# 初始化created或mounted

# 方法methods

参数 说明
remove 移除loading

如:

const loading = this.$loading()

setTimeout(() => {
  loading.remove()
}, 2000)
1
2
3
4
5

# 特别提示

Last Updated: 12/12/2019, 7:37:32 PM

注:因PC端浏览存在最小12px字号的原因,部分视图下文字会显示比较大,手机端访问正常。