import { Loading } from 'element-ui'
let loading;
let loadingCount = 0;
function start() {
  loading = Loading.service({
    lock: true,
    text: '加载中',
    background: 'rgba(0,0,0,0.7)'
  })
};
function end() {
  loading.close();
}
function showLoaing() {
  if (loadingCount == 0) {
    start();
  };
  loadingCount++
};

function hideLoading() {
  loadingCount--;
  if (loadingCount == 0) {
    end()
  }
}