How to use the element-ui.Loading.service function in element-ui

To help you get started, we’ve selected a few element-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MikuBlog / xz-admin / src / api / http / index.js View on Github external
.use(config => {
        // 统一对中文字符进行编码
        config.url = encodeURI(config.url)
				/**
				 * 如果是登陆请求,不发送token
				 * 否则都带token过去
				 */
				config.url.indexOf('login') != -1
				? config.headers.Authorization = ""
				: config.headers.Authorization = `Bearer ${storage.getMemoryPmt('token')}`
				loading = Loading.service({ fullscreen: true, background: "rgba(255, 255, 255, .4)", customClass: 'top-floor' })
				return config
			}, err => {
				Message.errorMsg('服务器出错,请联系客服进行处理')
github agalwood / Motrix / src / renderer / pages / index / main.js View on Github external
const { locale } = config
  const localeManager = getLocaleManager()
  localeManager.changeLanguageByLocale(locale)

  Vue.use(VueI18Next)
  const i18n = new VueI18Next(localeManager.getI18n())
  Vue.use(Element, {
    size: 'mini',
    i18n: (key, value) => i18n.t(key, value)
  })
  Vue.use(Msg, Message, {
    showClose: true
  })

  const loading = Loading.service({
    fullscreen: true,
    background: 'rgba(0, 0, 0, 0.1)'
  })
  Vue.component('mo-icon', Icon)

  sync(store, router)

  /* eslint-disable no-new */
  window.app = new Vue({
    components: { App },
    router,
    store,
    i18n,
    template: ''
  }).$mount('#app')
github moxi624 / mogu_blog_v2 / vue_mogu_admin / src / components / CheckPhoto / index.vue View on Github external
created() {
    this.dialogVisible = this.photoVisible;
    this.form.photoList = this.photos;
    this.form.fileIds = this.files;

    let loadingInstance = Loading.service({
      target: "#body-loading",
      text: "加载中~"
    });

    //加载数据
    var that = this;
    let index = 0;
    //先加载分类
    if (!that.havePictureSorts) {
      var params = new URLSearchParams();
      // TODO 全部把分类加载出来,如果图片很多的话,不能这么做
      params.append("pageSize", "500");
      getPictureSortList(params).then(function(response) {
        if (response.code == "success") {
          var pictureSorts = response.data.records;
          that.pictureSorts = pictureSorts;
github Hzy0913 / my-blog / src / component / tag.vue View on Github external
taglist(){
            this.$store.commit('updatetaglistcon',[])
            console.log(this.$store.state.taglistcon)
            this.fadetitle= false;
            let loadingInstance=Loading.service();
            let tag = this.$route.params.tag
            console.log("奥斯卡撒昆明大上课没打算考虑的马萨看到了吗")
            this.$http.get('/api/getArticleLabel/'+tag).then(
                    res => {
                if(res.body.length<10){
                    this.scrollbottomtipno=true;
                }
                this.tagList = res.body;
                this.tagtitle=this.$store.state.tagtitle


            loadingInstance.close();
            this.lastpage=true;
            this.ScrollFirst=true;
            this.fadetitle= true
github sl1673495 / vue-netease-music / src / utils / axios.js View on Github external
function loadingRequestInterceptor(config) {
    if (!loading) {
      loading = Loading.service({
        target: 'body',
        background: 'transparent',
        text: '载入中',
      })
      store.commit(SET_AXIOS_LOADING, true)
    }
    loadingCount++

    return config
  }
github microapp-store / flash-waimai / flash-waimai-manage / src / views / business / food / food.js View on Github external
handleBeforeUpload() {
      this.loadingInstance = Loading.service({
        lock: true,
        text: this.$t('common.uploading'),
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
    },
    handleUploadSuccess(response, raw) {
github hzsrc / vue-element-ui-scaffold-webpack4 / src / js / loading.js View on Github external
show(options) {
        if (!this.unique) {
            var opt = Object.assign({customClass: 'global-mask', target: '.main-page'}, options);
            this.unique = Loading.service(opt);
        }
    },
    showMask() {
github zzzzbw / Fame / fame-admin / src / plugins / http.js View on Github external
before: config => {
    if (loadingInstance === null) {
      loadingInstance = Loading.service({ target: "#main", fullscreen: false });
    }

    return config;
  },
  error: error => {