1.0.0-alpha.1 • Published 6 years ago

huangxj-test v1.0.0-alpha.1

Weekly downloads
87
License
-
Repository
-
Last release
6 years ago

ct-adc-dialog

a dialog component for vue,with bootstrap style,have a try!

功能点

1.组件模式 2.插件模式 3、自定义内容

使用

从npm安装ct-adc-dialog

npm install ct-adc-dialog --save

在代码中使用

<template>
    <ct-dialog v-model="isShow">
</template>

<script>
import ctDialog from 'ct-adc-dialog';

export default {
    data(){
        return {
            isShow: false
        }
    },
    compnents: {
        ctDialog
    }
}
</script>

或者 插件模式

import Vue from 'vue';
import {DialogPlugin} from 'ct-adc-dialog';

Vue.use(DialogPlugin);

然后在 组件中

this.$dialog.show({
    title: '',
    content: '',
    onShow(){},
    onHide(){}
})

props

参数类型默认值可选值描述
v-modelBooleanfalse-控制显示
widthString30%-容器宽度
titleString30%-标题
contentString30%-内容

slots

name描述
body-
foot-

事件

事件名称回调参数描述
on-show-显示事件
on-hide-隐藏事件

更新日志

更新日志