1.0.4 • Published 4 years ago
一个vue的基础自建库
npm install 'vue-mini-ui-yx' --save
import Vue from 'vue';
import App from './App.vue';
import VueMiniUiYx from 'vue-mini-ui-yx';
Vue.use(VueMiniUiYx);
new Vue({
el:'#root',
render:(h) => h(App)
})
目前支持4个组件 有需要再加
组件中调用 confirm
this.$confirm({
content:'这是内容',
confirmBtnText:'按钮文字', // 默认确定
cancelBtnText:'按钮文字', //默认取消
isShowClose:true, // 是否显示关闭的icon 默认不显示
zindex:100, //默认 1
confirmFn:()=>{console.log("确定")},
cancelFn:()=>{console.log('取消')}
});
可以都不传选择默认 必须 this.$confirm({})
组件中调用 alert
this.$alert({
content:'这是内容',
confirmBtnText:'确定',
isShowClose:true, // 是否显示关闭的icon 默认不显示
zindex:100,
confirmFn:()=>{console.log("确定")},
});
可以都不传选择默认 必须 this.$alert({})
组件中调用 toast
支持3个参数 1 内容 2 时长默认1500 3 zindex 默认1
this.$toast('toast内容', 2000, 100)
组件中调用 loading
支持个参数 1 内容 2 zindex 默认1
this.$loadingShow('loading内容',100)
关闭loading this.$loadingHide()