vue 移動端加載、提示框


版權聲明:本文為博主原創文章,未經博主允許不得轉載。https://www.cnblogs.com/suisuisui/p/9771665.html

用的是vue2.0+/vuex

首先 在項目中npm install vux 下載vux 

//全局注冊 在入口文件全局引入main.js import Vue from 'vue' import { Loading,Toast,} from 'vux' Vue.component('loading', Loading)
Vue.component('toast', Toast)
 
 

加載

this.$vux.loading.show({

     text: "加載中"

    });

this.$vux.loading.hide();

 

錯誤提示

this.$vux.toast.show({

type: "warn",

text: result.AllMessages,

width:'6em'

});

 

文本提示

that.$vux.toast.show({

text: "文本",

type: "text"

});

需要其他插件直接參考文檔(vux官網地址:https://doc.vux.li/zh-CN/components/actionsheet.html)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM