1.0.2 • Published 4 years ago

vue-popup-ly v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

安装

npm install vue-popup

引入

import vue_popup from 'vue-popup'
Vue.use(vue_popup)

使用

<vue-popup position="center" ref="popup" type="confirm" @buttonCallback="getBtnCallBack" content="test">
</vue-popup>

介绍

支持Toast、confirm两种形式

PROPS

参数说明可选参数参数类型
type弹窗形式confirm、toast(默认为 confirm)String
buttonConfirmText确认按钮文本-String
buttonCancelText取消按钮文本-String
showTitle是否显示标题默认为 trueBoolean
titleText标题文本''String
content弹窗内容''String
showCloseBtn是否显示关闭按钮默认为 trueBoolean
position弹出的位置center、top、bottom(默认为 center)String
autoCloseToast 的弹窗自动关闭时间默认为 3 秒Number
showToastIcon是否显示 toast 的图标true,false(默认为 true)Boolean
toastStatetoast 图标的状态(成功或者失败)success,failString

回调函数

函数名称说明返回值类型参数类型
buttonCallback点击确认按钮的回调函数trueBoolean