0.0.9 • Published 7 years ago
dj-dialog v0.0.9
安装组件
npm i dj-dialog -S
代码中引用组件
import DjDialog from 'dj-dialog/index.vue';
文件中使用组件方法
<template>
<div id="app">
...
<dj-dialog></dj-dialog>
...
</div>
</template>
components: {
DjDialog
}
组件参数
props:
headText:''
标题字段,非必须
text:''
文案字段,非必须
show:false
弹窗的展示字段,必须
default:false
btn:[
{
text: '按钮文案',
eventName: '按钮事件名'
}
]
设置底部按钮展示名称及事件,非必须字段
default:[
{
text: '取消',
eventName: 'cancel'
},
{
text: '确认',
eventName: 'confirm'
}
]
组件插槽
1:头部标题支持插槽
name:modalHead
2:body部分支持插槽
name:modalBody
3:按钮部分支持插槽
name:modalFoot