- // 全局注册 在入口文件全局引入 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"
- });
来源: http://www.bubuko.com/infodetail-2802699.html