omi/components/dialog-extention
dntzhang ed0c82150a feat(admin): add dialog page 2021-08-18 17:54:08 +08:00
..
demos/js-demo publish(@omiu/input) 2020-05-04 10:27:49 +08:00
scripts feat(admin): add dialog page 2021-08-18 17:54:08 +08:00
src feat(admin): add dialog page 2021-08-18 17:54:08 +08:00
README.md docs: rebuild 2020-05-04 10:35:52 +08:00
package.json feat(admin): add dialog page 2021-08-18 17:54:08 +08:00
tsconfig.json publish(@omiu/input) 2020-05-04 10:27:49 +08:00

README.md

DialogExtention

Pop alert, confirm or prompt in the middle of the page

Import

import '@omiu/dialog-extention'

Or use script tag to ref it.

<script src="https://unpkg.com/@omiu/dialog-extention"></script>

Usage

Omiu.alert({
  msg: 'Simple Message',
  title: 'Msg',
  confirmButtonText: 'OK',
  onConfirm: function () {
    console.log('ok')
  }
})

Omiu.confirm({
  msg: 'Simple Message',
  title: 'Msg',
  cancelButtonText: 'Cancel',
  confirmButtonText: 'OK',
  onCancel: function () {

  },
  onConfirm: function () {
    console.log('ok')
  }
})

Omiu.prompt({
  msg: 'Simple Message',
  title: 'Msg',
  cancelButtonText: 'Cancel',
  confirmButtonText: 'OK',
  onCancel: function () {

  },
  onConfirm: function (val) {
    console.log(val)
  }
})