nw-confirm

nw-confirm

Usage no npm install needed!

<script type="module">
  import nwConfirm from 'https://cdn.skypack.dev/nw-confirm';
</script>

README

nw-confirm

安装

$ yarn add nw-confirm

使用

import confirm from 'nw-confirm'

confirm({
    content: '我是一些内容,很长的内容爱啦啦阿拉啦啦啦啦啦',
    okText: '确定',
    cancelText: '取消'
}).then(() => {
    console.log('确定')
}).catch(() => {
    console.log('取消')
})

接受的参数

{
    content = '', 
    okText = '确定', 
    cancelText = '取消',
    maskClosable = true,
    maskStyle = {},
    maskClassName = ''
}