sync-modal

1.0.1 • Public • Published

Synchronous modal

Usage

import SyncModal from "sync-modal/index.js"

export default {
	components: {
		SyncModal,
	},
	methods: {
		async showModal1(m) {
			let [data, err] = await m.show()
			if (err) throw err
			console.log(data)
		},
	},
}
<div>
<button @click="showModal1($refs.modal1)"></button>
<sync-modal ref="modal1">
	<button @clock="$ref.modal1.success('123')">OK</button>
	<button @click="$refs.modal1.exit('force close')">Close</button>
</sync-modal>
</div>

Readme

Keywords

none

Package Sidebar

Install

npm i sync-modal

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

1.63 kB

Total Files

3

Last publish

Collaborators

  • thanhpk