You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Vue and F7 as well, yet rendering the input using , no F7 involved.
In main.js I have
import Framework7Keypad from 'framework7-plugin-keypad';
Framework7.use(Framework7Keypad);
And in my module, when I call this.$f7.keypad.create({inputEl: 'input.qty'}), I get Class constructor Framework7Class cannot be invoked without 'new'.
TypeError: Class constructor Framework7Class cannot be invoked without 'new'
at new Keypad (framework7-keypad.js?d830:22)
at new create (framework7-keypad.js?d830:863)
... I'm hunting for solutions and will report back.
import Framework7Keypad from 'framework7-plugin-keypad/dist/framework7.keypad.js';
Framework7.use(Framework7Vue);
Framework7.use(Framework7Keypad);//<- after importing framework7vue
Can you guys try to do the import like this
import Framework7Keypad from 'framework7-plugin-keypad/dist/framework7.keypad.js';
Framework7.use(Framework7Vue);
Framework7.use(Framework7Keypad);//<- after importing framework7vue
Also, which version of framework7 are you using?
then in template
<f7-list-input
input-id="cvv"
label="CVV"
type="numpad"
placeholder=""
clear-button
required @change="changeCVV()" @input="new_card.cvv = $event.target.value"
>
import Framework7Keypad from 'framework7-plugin-keypad/dist/framework7.keypad.js';
Should be:
import Framework7Keypad from 'framework7-plugin-keypad/dist/framework7-keypad.js';
But, unfortunately same error was generated:
vue.esm.js?efeb:628 [Vue warn]: Error in updated hook: "TypeError: Class constructor Framework7Class cannot be invoked without 'new'"
found in
---> <F7View>
<F7App>
<App> at src/App.vue
<Root>
TypeError: Class constructor Framework7Class cannot be invoked without 'new'
at new Keypad (framework7-keypad.js?43df:22)
at Object.create (framework7-keypad.js?43df:863)
at HTMLInputElement.eval (framework7-keypad.js?43df:903)
at Dom7.each (dom7.module.js?4419:610)
at Framework7.pageInit (framework7-keypad.js?43df:895)
at eval (class.js?c95a:90)
at Array.forEach (<anonymous>)
at eval (class.js?c95a:89)
at Array.forEach (<anonymous>)
at Framework7.emit (class.js?c95a:83)
Upgraded framework7 to 5.0.5 and got the same error. Downgraded keypad to 2.0.0 and error was gone, but nothing was being done, maybe syntax changed trough this versions? Still trying to figure out why updating f7 didn't quit the error. Maybe some other package is interfering, like webpack.... idk.
import Vue from 'vue';
import Framework7 from 'framework7/framework7-lite.esm.bundle';
import Framework7Vue from 'framework7-vue/framework7-vue.esm.bundle';
import Framework7Keypad from 'framework7-plugin-keypad/dist/framework7-keypad';
...
Framework7.use(Framework7Vue);
Framework7.use(Framework7Keypad);
I still get the same error:
Uncaught TypeError: Class constructor Framework7Class cannot be invoked without 'new'
at new Keypad (framework7-keypad.js?d830:22)
at Object.create (framework7-keypad.js?d830:863)
at <anonymous>:1:26
when executing app.$f7.keypad.create()
Would seeing my babel or other configs help?
same here with framework7 v5 and keyboard plugin 3.x
tried import Framework7Keypad from 'framework7-plugin-keypad/dist/framework7-keypad.js';
with no avail
Activity
cemarta7 commentedon Jul 11, 2019
On main.js after Framework7.use(Framework7Vue); add
Then in your page
That's how I got it to work.
cepm-nate commentedon Oct 22, 2019
I'm using Vue and F7 as well, yet rendering the input using , no F7 involved.
In main.js I have
And in my module, when I call
this.$f7.keypad.create({inputEl: 'input.qty'}), I getClass constructor Framework7Class cannot be invoked without 'new'.... I'm hunting for solutions and will report back.
pedrohenriquerissato commentedon Oct 24, 2019
Same problem as the others.
Installed with:
npm install framework7-plugin-keypadInstantiated in main:
And finally, created the component:
Got the same error as @cepm-nate :
"[Vue warn]: Error in updated hook: "TypeError: Class constructor Framework7Class cannot be invoked without 'new'"
cemarta7 commentedon Oct 24, 2019
Can you guys try to do the import like this
Also, which version of framework7 are you using?
then in template
type="numpad"
@cepm-nate
@pedrohenriquerissato
pedrohenriquerissato commentedon Oct 24, 2019
There was a typo in:
Should be:
But, unfortunately same error was generated:
I'm using this versions:
cemarta7 commentedon Oct 24, 2019
This is my version:
3.0.1 requires "framework7": "^5.0.5"
https://github.com/framework7io/framework7-plugin-keypad/blob/v3.0.1/package.json
downgrade "framework7-plugin-keypad" to "^2.0.0" or upgrade to framework7 5.
pedrohenriquerissato commentedon Oct 24, 2019
Upgraded framework7 to 5.0.5 and got the same error. Downgraded keypad to 2.0.0 and error was gone, but nothing was being done, maybe syntax changed trough this versions? Still trying to figure out why updating f7 didn't quit the error. Maybe some other package is interfering, like webpack.... idk.
cepm-nate commentedon Oct 24, 2019
Here is my version:
I'm importing like such:
I still get the same error:
when executing
app.$f7.keypad.create()Would seeing my babel or other configs help?
Tarekajaj commentedon Mar 5, 2020
Don't know if this is related, I was getting an error when trying to use the plugin, and importing it like the following fixed my error:
import 'framework7-plugin-keypad/dist/framework7-keypad.js';nederev commentedon Mar 28, 2020
same here with framework7 v5 and keyboard plugin 3.x
tried
import Framework7Keypad from 'framework7-plugin-keypad/dist/framework7-keypad.js';with no avail
sirg2003 commentedon Jun 8, 2020
For anybody having troubles. Try this: