Skip to content

Commit

Permalink
Added bugfix for Vue.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo committed Nov 13, 2021
1 parent 564643d commit 2b1aa57
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@babel/preset-env": "^7.15.0",
"babel-loader": "^8.2.2",
"css-loader": "^6.2.0",
"f7-welcomescreen": "^3.0.9",
"f7-welcomescreen": "^3.0.10",
"framework7": "^6.2.0",
"http-server": "^13.0.0",
"mini-css-extract-plugin": "^2.2.0",
Expand Down
8 changes: 4 additions & 4 deletions dist/f7-welcomescreen.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import Swiper from 'swiper';
var F7WelcomescreenPlugin = {
name: 'welcomescreen',

Welcomescreen: function (app, slides, options) {
Welcomescreen: function (app, slidesParam, optionsParam) {
var slides = slidesParam;
var options = optionsParam;

// Private properties
var self = this,
defaultTemplate,
Expand Down Expand Up @@ -153,7 +156,10 @@ var F7WelcomescreenPlugin = {
}
};

(function () {
self.init = function (newSlides, newOptions) {
if (newSlides) slides = newSlides;
if (newOptions) options = newOptions;

defineDefaultTemplate();
compileTemplate();
applyOptions();
Expand All @@ -162,7 +168,9 @@ var F7WelcomescreenPlugin = {
if (options.open) {
self.open();
}
})();
};

self.init();

// Return instance
return self;
Expand All @@ -177,7 +185,7 @@ var F7WelcomescreenPlugin = {

/* Event handlers */
on: {
init: function () {
init: function (foo) {
window.Dom7 = this.$;
window.swiper = this.swiper;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "f7-welcomescreen",
"version": "3.0.9",
"version": "3.0.10",
"description": "This Framework7 plugin will guide the user through a tour of your app.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 2b1aa57

Please sign in to comment.