Commit 81d87ab4 authored by JingChao's avatar JingChao

keyboard

parent a28539fe
...@@ -223,9 +223,9 @@ ...@@ -223,9 +223,9 @@
</style> </style>
<script> <script>
import Key from './key' import Key from './key'
export default { export default {
name: 'NumberKeyboard', name: 'NumberKeyboard',
components: {Key}, components: {Key},
props: { props: {
...@@ -315,10 +315,15 @@ export default { ...@@ -315,10 +315,15 @@ export default {
methods: { methods: {
closeKeyboard () { closeKeyboard () {
let vm = this let vm = this
this.show = false
let wrapper = document.querySelector('[vum-show-keyborad]') let wrapper = document.querySelector('[vum-show-keyborad]')
if (wrapper && vm.keyBoardPlugin) { if (wrapper && vm.keyBoardPlugin) {
this.show = false
try {
document.body.removeChild(wrapper) document.body.removeChild(wrapper)
} catch (e) {
}
} else if (vm.keyBoardPlugin === false && vm.hideOnClickOutside) {
this.onClose()
} }
}, },
showNumberKeyboard (options) { showNumberKeyboard (options) {
...@@ -367,5 +372,5 @@ export default { ...@@ -367,5 +372,5 @@ export default {
} }
}, },
}, },
} }
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment