设备验证
This commit is contained in:
1 parent
c02c8a2ac8
commit
38a6f85b30
3 files changed
+33
-37
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { h, render } from "vue"
|
||||
import VerifyDeviceImpModel from "./verifyDeviceImpModel.vue"
|
||||
|
||||
let VerifyDeviceImpModelInstance: boolean | null = null
|
||||
|
||||
const showVerifyDeviceImpModel = (onClose: () => any = () => null) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (VerifyDeviceImpModelInstance) return
|
||||
|
||||
const close = () => {
|
||||
render(null, document.body)
|
||||
VerifyDeviceImpModelInstance = false
|
||||
onClose()
|
||||
}
|
||||
|
||||
const vnode = h(VerifyDeviceImpModel, {
|
||||
show: true,
|
||||
showCancel: false,
|
||||
close,
|
||||
})
|
||||
render(vnode, document.body)
|
||||
VerifyDeviceImpModelInstance = true
|
||||
})
|
||||
}
|
||||
|
||||
export default showVerifyDeviceImpModel
|
||||
Reference in new issue
Block a user