jx-vue2-show-modal
v1.0.2
Published
A Vue.js project,vue-show-modal,vuejs,vue
Downloads
5
Readme
介绍
基于vue2.0的提示框组件
组件使用
安装
npm i jx-vue2-show-modal --save初始化
import ShowModal from 'jx-vue2-show-modal';
Vue.use(ShowModal);使用
<script>
export default {
name: 'App',
mounted() {
this.$showModal({
title: '', //标题
content: '', //文本内容
centerText: false, // true则文案居中显示
showCloseBtn: false, //true显示右上角关闭功能, false展示底部按钮,默认false
confirmColor: '#FF5D05', //确定按钮颜色, 默认:#FF5D05
confirmText: '确定', //确定按钮文案, 默认:确定
cancelText: '取消', //取消按钮文案,默认:取消
showCancel: true, //是否展示取消按钮,默认:true
showConfirm: true, //是否展示确定按钮,默认:true
success: () => {
console.log('成功')
}
})
}
}
</script>
