Comments (11)
On main.js after Framework7.use(Framework7Vue); add
Framework7.use(Framework7Keypad);
Then in your page
<f7-list-input
input-id="credit_card"
label="Card Number"
type="numpad"
placeholder=""
clear-button
required
@change="changeCardNumber()"
@input="new_card.card_number = $event.target.value"
></f7-list-input>
changeCardNumber(){
var self=this;
this.new_card.card_number=this.$f7.keypad.get().value
},
That's how I got it to work.
from framework7-plugin-keypad.
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.
from framework7-plugin-keypad.
Same problem as the others.
Installed with:
npm install framework7-plugin-keypad
Instantiated in main:
import Framework7Keypad from 'framework7-plugin-keypad';
Framework7.use(Framework7Keypad);
And finally, created the component:
<f7-list-input
input-id="credit_card"
label="Card Number"
type="numpad"
placeholder=""
required
></f7-list-input>
Got the same error as @cepm-nate :
"[Vue warn]: Error in updated hook: "TypeError: Class constructor Framework7Class cannot be invoked without 'new'"
from framework7-plugin-keypad.
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"
></f7-list-input>
type="numpad"
@cepm-nate
@pedrohenriquerissato
from framework7-plugin-keypad.
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 framework7vueAlso, 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"
>type="numpad"
@cepm-nate
@pedrohenriquerissato
There was a typo in:
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)
I'm using this versions:
"framework7": "^3.5.1",
"framework7-plugin-keypad": "^3.0.1",
"framework7-vue": "^3.5.1",
from framework7-plugin-keypad.
This is my version:
"framework7": "^3.6.5",
"framework7-icons": "^2.1.1",
"framework7-plugin-keypad": "^2.0.0",
"framework7-vue": "^3.6.5",
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.
from framework7-plugin-keypad.
This is my version:
"framework7": "^3.6.5",
"framework7-icons": "^2.1.1",
"framework7-plugin-keypad": "^2.0.0",
"framework7-vue": "^3.6.5",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.
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.
from framework7-plugin-keypad.
Here is my version:
"framework7": "^5.0.5",
"framework7-icons": "^3.0.0",
"framework7-plugin-keypad": "^3.0.1",
"framework7-vue": "^5.0.5",
I'm importing like such:
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?
from framework7-plugin-keypad.
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';
from framework7-plugin-keypad.
same here with framework7 v5 and keyboard plugin 3.x
tried
import Framework7Keypad from 'framework7-plugin-keypad/dist/framework7-keypad.js';
with no avail
from framework7-plugin-keypad.
For anybody having troubles. Try this:
import Framework7Keypad from 'framework7-plugin-keypad/src/framework7-keypad.js';
import 'node_modules/framework7-plugin-keypad/src/framework7-keypad.less';
from framework7-plugin-keypad.
Related Issues (20)
- Framework7 keypad + swipe incompatibility
- Unable to Reset Value
- Validation not working
- Needs a caret
- Request: Ability to disable a button based on current value
- theme-dark and color-theme-* support
- custom keys - full keyboard
- no distinction between pressing CLOSE button (accept) or tapping outside of region (CANCEL) HOT 1
- Do you support react?
- Адаптация плагина для 4й версии F7 HOT 1
- Framework7.use(Framework7Keypad) crashes after upgrading from F7 4.4.6 to 5.1.1 HOT 1
- Framework7 Keypad events listener not working
- Cannot read property 'name' of undefined HOT 1
- Module Import issue with vite HOT 2
- framework7-keypad.min.js.map does not have a correct "sources" field HOT 1
- files not found in /dist
- Bower issue
- Picker buttons should have user-select: none specified
- The delete key should have an auto-repeat capability to delete long numbers quickly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from framework7-plugin-keypad.