import { Loading } from 'element-ui'

class CmsLoading {
  static open = function (options) {
    return Loading.service(
      Object.assign({
        lock: false,
        text: '正在加载中，请稍等...',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.5)',
        target: document.body.querySelector('body')
      }, options)
    )
  }
}

export default CmsLoading
