-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates and fixes for vue 3 #1
base: vue-3.x
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
{ | ||
"presets": ["@babel/env"] | ||
} | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false | ||
} | ||
] | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { h } from 'vue'; | ||
|
||
const SDK_VERSION = "1.0.1"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to bump this a major version? (Maybe 3 to match Vue?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, good catch, forgot to bump it. |
||
|
||
const PayloadType = { | ||
|
@@ -155,12 +157,12 @@ export default { | |
window.removeEventListener("message", this.handleMessage); | ||
} | ||
}, | ||
render(createElement) { | ||
render() { | ||
if (!this.show) { | ||
return; | ||
} | ||
|
||
const iframe = createElement("iframe", { | ||
const iframe = h("iframe", { | ||
key: this.idx, | ||
style: { | ||
height: `${this.height}px`, | ||
|
@@ -172,16 +174,14 @@ export default { | |
width: "100%", | ||
overflow: "hidden", | ||
}, | ||
attrs: { | ||
src: this.frameUrl(), | ||
allow: "camera", | ||
scrolling: "no", | ||
referrerpolicy: "no-referrer-when-downgrade", | ||
}, | ||
src: this.frameUrl(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this was due to Vue2->Vue3, but with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe related, but it looks like people were running into a similar issue with the vue router when upgrading 2 -> 3. Either way your fix seems like the way to go. |
||
allow: "camera", | ||
scrolling: "no", | ||
referrerpolicy: "no-referrer-when-downgrade" | ||
}); | ||
|
||
if (this.showInModal) { | ||
return createElement( | ||
return h( | ||
"div", | ||
{ | ||
style: { | ||
|
@@ -197,7 +197,7 @@ export default { | |
}, | ||
}, | ||
[ | ||
createElement( | ||
h( | ||
"div", | ||
{ | ||
style: { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure why I needed to do this, but the ES6 style
import
statements were complaining about not being able to find a default export, until I made this change.