From 2b1aa5720a0924b3c81ef15279a44fd3c030c151 Mon Sep 17 00:00:00 2001 From: Timo Date: Sat, 13 Nov 2021 16:09:21 +0100 Subject: [PATCH] Added bugfix for Vue.js --- demo/package.json | 2 +- dist/f7-welcomescreen.min.js | 8 ++++---- index.js | 16 ++++++++++++---- package.json | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/demo/package.json b/demo/package.json index bc588e6..b6387f3 100644 --- a/demo/package.json +++ b/demo/package.json @@ -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", diff --git a/dist/f7-welcomescreen.min.js b/dist/f7-welcomescreen.min.js index e00a9e1..d4ea96d 100644 --- a/dist/f7-welcomescreen.min.js +++ b/dist/f7-welcomescreen.min.js @@ -1,6 +1,5 @@ import Template7 from'template7';import Swiper from'swiper';// A plugin for Framework7 to show a slideable welcome screen -var F7WelcomescreenPlugin={name:'welcomescreen',Welcomescreen:function(a,b,c){function d(){l=new Swiper('.welcomescreen-swiper',{direction:'horizontal',loop:c.loop,pagination:c.pagination?{el:'.swiper-pagination'}:void 0,parallax:c.parallax,speed:c.parallaxSpeed})}function e(){c.bgcolor&&k.css({"background-color":c.bgcolor,color:c.fontcolor})}function f(){i='
{{#if options.closeButton}}
{{options.closeButtonText}}
{{/if}}
{{#if options.parallax}}
{{/if}}
{{#each slides}}
{{#if title}}{{title}}{{else}}title{{/if}}
{{#if content}}
{{content}}
{{else}}{{#if picture}}
{{picture}}
{{/if}}{{#if text}}
{{text}}
{{/if}}{{/if}}
{{/each}}
{{#if options.pagination}}
{{/if}}{{#if options.navigation}}
{{/if}}
'}function g(){for(var a in c=c||{},o)'undefined'==typeof c[a]&&(c[a]=o[a])}function h(){const a=window.Template7||Template7;j=c.template?a.compile(c.template):a.compile(i)}// Private properties -var i,j,k,l,m,n=this,o={closeButton:!0,// enabled/disable close button +var F7WelcomescreenPlugin={name:'welcomescreen',Welcomescreen:function(a,b,c){function d(){l=new Swiper('.welcomescreen-swiper',{direction:'horizontal',loop:o.loop,pagination:o.pagination?{el:'.swiper-pagination'}:void 0,parallax:o.parallax,speed:o.parallaxSpeed})}function e(){o.bgcolor&&k.css({"background-color":o.bgcolor,color:o.fontcolor})}function f(){i='
{{#if options.closeButton}}
{{options.closeButtonText}}
{{/if}}
{{#if options.parallax}}
{{/if}}
{{#each slides}}
{{#if title}}{{title}}{{else}}title{{/if}}
{{#if content}}
{{content}}
{{else}}{{#if picture}}
{{picture}}
{{/if}}{{#if text}}
{{text}}
{{/if}}{{/if}}
{{/each}}
{{#if options.pagination}}
{{/if}}{{#if options.navigation}}
{{/if}}
'}function g(){for(var a in o=o||{},q)'undefined'==typeof o[a]&&(o[a]=q[a])}function h(){const a=window.Template7||Template7;j=o.template?a.compile(o.template):a.compile(i)}var i,j,k,l,m,n=b,o=c,p=this,q={closeButton:!0,// enabled/disable close button closeButtonText:'Skip',// close button text cssClass:'',// additional class on container pagination:!0,// swiper pagination, @@ -11,5 +10,6 @@ parallax:!1,// adds parallax capabilities parallaxSpeed:600,// parallax default speed parallaxBackgroundImage:'http://lorempixel.com/900/600/nightlife/2/',// parallax default background image parallaxBackground:'-23%',// parallax default background effect -parallaxSlideElements:{title:-100,subtitle:-300,text:-500}};// Return instance -return n.open=function(){k=window.Dom7(j({options:c,slides:b})),m=k.find('.welcomescreen-swiper'),e(),window.Dom7('body').append(k),d(),k[0].f7Welcomescreen=n,'function'==typeof c.onOpened&&c.onOpened()},n.close=function(){l&&l.destroy(!0),k&&k.remove(),k=m=l=void 0,'function'==typeof c.onClosed&&c.onClosed()},n.next=function(){l&&l.slideNext()},n.previous=function(){l&&l.slidePrev()},n.slideTo=function(a){l&&l.slideTo(a)},function(){f(),h(),g(),c.open&&n.open()}(),n},params:{welcomescreen:{options:{},slides:[]}},/* Event handlers */on:{init:function(){window.Dom7=this.$,window.swiper=this.swiper,window.Dom7(document).on('click','.close-welcomescreen',function(a){a.preventDefault();var b=window.Dom7(this).parents('.welcomescreen-container');0