BootstrapVue 消息框输入按 `Enter` 确认
BootstrapVue message box input press `Enter` to confirm
Vue:v2.6.12
BootstrapVue:v2.21.2
不用手动点击OK
,如何按Enter
确认?
let text
this.$bvModal.msgBoxConfirm(<input vModel={text} />)
我已经弄明白了:
const modalId = 'modalId'
const ok = () => this.$bvModal.hide(modalId)
let text
this.$bvModal.msgBoxConfirm(<input vModel={text} vOn:keyup_enter={ok} />, {
id: modalId,
})
Vue:v2.6.12
BootstrapVue:v2.21.2
不用手动点击OK
,如何按Enter
确认?
let text
this.$bvModal.msgBoxConfirm(<input vModel={text} />)
我已经弄明白了:
const modalId = 'modalId'
const ok = () => this.$bvModal.hide(modalId)
let text
this.$bvModal.msgBoxConfirm(<input vModel={text} vOn:keyup_enter={ok} />, {
id: modalId,
})