@edu/Dialog
Common dialog component for edu-fe team
Installing
Using npm
$ npm i @edu-fe/dialog
Using yarn
$ yarn add @edu-fe/dialog
Example
import dialog from '@edu-fe/dialog'
Vue.use(dialog)
// global invoking
Vue.dialog(options)
// In a vue instance
new Vue({
el: '#app',
created() {
this.$dialog(options)
}
})
Options
Name | Description | Type | Default |
---|---|---|---|
title | 标题内容 | String | "" |
text | 文字内容 | String | "" |
buttons | 功能按钮,每项需要包含type、text、handler三项,type为1时为浅颜色字体 | Array | [] |
关闭方法
const dialog = Vue.dialog(options)
dialog.close()