diff options
Diffstat (limited to 'app/assets/javascripts/google_cloud/configuration/index.js')
-rw-r--r-- | app/assets/javascripts/google_cloud/configuration/index.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/javascripts/google_cloud/configuration/index.js b/app/assets/javascripts/google_cloud/configuration/index.js new file mode 100644 index 00000000000..580315588d0 --- /dev/null +++ b/app/assets/javascripts/google_cloud/configuration/index.js @@ -0,0 +1,11 @@ +import Vue from 'vue'; +import Panel from './panel.vue'; + +export default (containerId = '#js-google-cloud-configuration') => { + const element = document.querySelector(containerId); + const { ...attrs } = JSON.parse(element.getAttribute('data')); + return new Vue({ + el: element, + render: (createElement) => createElement(Panel, { attrs }), + }); +}; |