How to use vux - 10 common examples

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
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 完成')
    //     setTimeout(()=>{
    //         if(ddConfig != null){
    //             commit('DDCONFIG_SUCCESS', ddConfig)
github yjj5855 / vue-dd-bb / src / main.js View on Github external
import ddPlugin from './lib/vue-dd-plugin'
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();
github yjj5855 / vue-dd-bb / src / main.js View on Github external
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 完成')
    //     setTimeout(()=>{
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 完成')
github yjj5855 / vue-dd-bb / src / main.js View on Github external
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 完成')
    //     setTimeout(()=>{
    //         if(ddConfig != null){
github huahua0406 / pretty-vendor / src / pages / login / login.vue View on Github external
.then(res => {
                    // 登录成功
                    if (res.data.data.code === 0) {
                        this.$vux.toast.show({
                            text: '登录成功'
                        })
                        // 本地保存 token 和 userInfo
                        // vux 中提供的base64方法
                        // base64.encode('VUX')
                        // base64.decode('VlVY')
                        window.localStorage.setItem('token', base64.encode(res.data.data.token))
                        window.localStorage.setItem('userInfo', JSON.stringify(
                            res.data.data.userInfo
                        ))
                        this.UPDATE_USERINFO({
                            userInfo: res.data.data.userInfo
                        })
                        // 重定向到首页或者登录前的页面
                        let redirect = decodeURIComponent(
                            this.$route.query.redirect || '/'
                        )
                        setTimeout(() => {
                            this.$router.push({
                                path: redirect
                            })
                        }, 2000)
                    }
github enilu / guns-lite / guns-h5 / src / page / official_site / contact.js View on Github external
submit () {
      if (this.valid()) {
        api.saveContact(this.form).then(res => {
          AlertModule.show({content: '提交成功'})
          console.log(res)
        })
      } else {
        AlertModule.show({content: '请填写完整信息'})
      }
    },
    valid () {
github enilu / web-flash / flash-vue-h5 / src / page / official_site / more.js View on Github external
}).catch(err => {
            AlertModule.show({
              title: '',
              content: err.data.msg
            })
          })
github Kerbores / NUTZ-ONEKEY / thunder / thunder-web / src / main / wechat / src / views / Add.vue View on Github external
created() {
      if (location.search) {
        this.openid = querystring.parse(location.search.substr(1)).openid;
        this.$api.Topic.nutzer(this.openid, result => {
          this.save(result);
        });
      } else {
        this.remove();
      }
      if (!this.logined()) {
        this.$router.push({
          path: "/me"
        });
      }
    }
  };
github Kerbores / NUTZ-ONEKEY / thunder / thunder-web / src / main / wechat / src / views / List.vue View on Github external
created() {
    if (location.search) {
      this.openid = querystring.parse(location.search.substr(1)).openid;
      this.$api.Topic.nutzer(this.openid, result => {
        this.save(result);
      });
    } else {
      this.remove();
    }
    this.loadTopic(true);
  }
};