forked from verdnatura/salix-front
refs #6911 feat: qFormMixin keyup.enter
This commit is contained in:
parent
82e31d4dcf
commit
901c8c8f71
|
@ -0,0 +1,20 @@
|
||||||
|
import { QTable, QForm } from 'quasar';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
inject: { QForm },
|
||||||
|
component: { QForm },
|
||||||
|
components: { QForm },
|
||||||
|
extends: { QForm },
|
||||||
|
mounted: function () {
|
||||||
|
if (this.$el?.classList?.contains('q-form'))
|
||||||
|
if (this.$el?.id !== 'searchbarForm') {
|
||||||
|
let that = this;
|
||||||
|
|
||||||
|
document.addEventListener('keyup', function (evt) {
|
||||||
|
if (evt.keyCode === 13) {
|
||||||
|
that.onSubmit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { boot } from 'quasar/wrappers';
|
||||||
|
import qFormMixin from './qformMixin';
|
||||||
|
|
||||||
|
export default boot(({ app }) => {
|
||||||
|
app.mixin(qFormMixin);
|
||||||
|
});
|
Loading…
Reference in New Issue