diff options
author | sgiehl <stefan@matomo.org> | 2021-07-22 12:48:29 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2021-07-22 12:48:29 +0300 |
commit | d17e3e4ca498c26fb8304bdd563bdf1cb745eb69 (patch) | |
tree | f3847c668d934914dc2405b95c3b373f7c4b1120 | |
parent | 20b58c78fc94533e624f36d99df183cca9d43d23 (diff) |
use class for vue initvuejspoc
-rw-r--r-- | plugins/CoreHome/vuejs/matomoApp.js | 2 | ||||
-rw-r--r-- | plugins/SitesManager/templates/index.twig | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/plugins/CoreHome/vuejs/matomoApp.js b/plugins/CoreHome/vuejs/matomoApp.js index 902b94ca18..084c167f69 100644 --- a/plugins/CoreHome/vuejs/matomoApp.js +++ b/plugins/CoreHome/vuejs/matomoApp.js @@ -3,6 +3,8 @@ var matomo = (function() { var VueComponents = {}; var VueMethods = {}; + window.setTimeout(function(){ $('.vue-app').each(function(){ matomo.createVue(this); }); }, 100); + return { registerComponent: function(name, component) { VueComponents[name] = component diff --git a/plugins/SitesManager/templates/index.twig b/plugins/SitesManager/templates/index.twig index a1588b5849..58416bf4a2 100644 --- a/plugins/SitesManager/templates/index.twig +++ b/plugins/SitesManager/templates/index.twig @@ -4,12 +4,8 @@ {% block content %} - <div><matomo-sites-manager></matomo-sites-manager></div> - - <script> - window.setTimeout(function(){matomo.createVue($('matomo-sites-manager').parent()[0])}, 100); - </script> - - <!--div ng-include="'plugins/SitesManager/templates/index.html?cb={{ cacheBuster }}'"></div--> + <div class="vue-app"> + <matomo-sites-manager></matomo-sites-manager> + </div> {% endblock %} |