How to use the vux.Loading function in vux

To help you get started, we’ve selected a few vux 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 yjj5855 / vue-dd-bb / src / main.js View on Github external
import App from './page/app/index'

window.getParamByName = function(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]); return null;
};
let dd = window.dd;
const commit = store.commit || store.dispatch;

console.log(process.env.NODE_ENV)
Vue.config.debug = process.env.NODE_ENV !== 'production';
Vue.config.devtools = process.env.NODE_ENV !== 'production';

Vue.component('alert',vux.Alert)
Vue.component('loading',vux.Loading)
Vue.component('group',vux.Group)
Vue.component('x-input',vux.XInput)
Vue.component('x-button',vux.XButton)

let ddConfig = null;

getConfig()
    .then((data)=>{
        ddConfig = data;
        dd.config(ddConfig);
    })
    // .then(ddIsReady)
    // .then(initVue)
    // .then(()=>{
    //     document.querySelector('#init-loading').remove();
    //     console.log('init vue 完成')