赞
踩
- import { Loading } from 'element-ui';
-
- const loadOption={fullscreen: true ,lock: true, text: 'Loading', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)'}
-
- let loadingInstance;
-
- export default class loadEvents {
- constructor(vueThis){
- this.vm = vueThis ; //vue中的this 也可以不用
- }
- open(){
- loadingInstance = Loading.service(loadOption);
- }
- close(){
- loadingInstance.close();
- }
- }
- //loads.open();loading效果出现;loads.close();关闭loading效果
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。