dotaui
v0.2.2
Published
DotaUI Vue Bootstrap 4 layout components
Downloads
19
Readme
dotaui
安装dotaui
yarn add dotaui
main.js中使用dotaui
import Vue from 'vue'
import DotaUI form 'dotaui'
Vue.use(DotaUI)
App.vue中引入bootstrap-vue和dotaui样式
<style>
@import "~bootstrap-vue/dist/bootstrap-vue.css";
@import "~dotaui/dist/dotaui.css";
</style>
component中使用 Toast、Alert、Message、Loading方法
import {Toast,Alert,Message,Loading} from "dotaui"
export default {
mounted(){
Toast('hello world!!',{variant:'danger'})
Toast('hello world!!',{
solid: true,
title: '系统提示',
variant: 'success',
toaster: 'b-toaster-top-center'
})
Alert('系统提示',''Hello World!!',{
okTitle: '确定',
centered: true,
noCloseOnBackdrop: true,
noCloseOnEsc: true,
})
Message({
title: '系统提示',
message: 'hello world!!',
okTitle: '确定',
cancelTitle: '取消',
centered: true,
noCloseOnBackdrop: true,
noCloseOnEsc: true,
}).then(()=>{
console.log('确定')
}).catch(()=>{
console.log('取消')
})
Loading({
text: 'loading...',
variant: 'primary'
})
Loading('close')
}
}