nat-modal
v1.0.1-alpha
Published
Nat.js module for weex: Modal (dialog)
Downloads
5
Readme
nat-modal
Installation
weexpack plugin add nat-modal
npm i natjs
Usage
Use in weex project (.vue
/.we
)
<script>
import Nat from 'natjs'
// alert
Nat.alert('Hello Nat!')
// confirm
Nat.confirm('This is a confirm dialog with callback', (err, ret) => {
console.log((ret) ? 'confirmed' : 'canceled')
})
// prompt
Nat.prompt('This is a prompt dialog with callback', (err, ret) => {
console.log((ret.result) ? 'prompted\n' + ret.data : 'canceled')
})
// toast
Nat.toast('Hello Nat!')
</script>
See the Nat Documentation for more details.