vue-strap

Handle key press by function in VueJs

前提是你 提交于 2019-12-23 13:16:06
问题 in my component I am using VueStrap's modal like this: <template> <modal-window v-model="show" v-on:keyup="keyHandler($event)" @ok="submit()" @cancel="cancel()" @closed="close()" ... > ... </modal-window> ... </template> <script> ... methods: { keyHandler (event) { console.log(event); } },... </script> I want handle key press when that modal is opened and ensure submit modal when enter pressed or close modal when esc pressed. I added custom function keyHandler which is unfortunately never

Components of Vuestrap not working with Vue2

*爱你&永不变心* 提交于 2019-12-12 04:36:31
问题 In a single file component in the project created by vue-cli, i want to import some components of vuestrap: import Vue from 'vue' import alert from 'vue-strap/src/alert' import dropdown from 'vue-strap/src/Dropdown' export default { name: 'todo', components: { alert, dropdown }, data() { return { msg: '...' } } } If I only import alert, it is working without any problem. However, if I import Input , Dropdown , i get errors inside the vue files of the vuestrap files itself: ERROR in ./~/vue