You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
620 B
21 lines
620 B
window.isBrowser = true;
|
|
function GoVueMount(app, ctx, el) {
|
|
var sourceTemplate = document.getElementsByTagName("go-vue-template");
|
|
var GoVueHTML = "";
|
|
if (sourceTemplate.length > 0) {
|
|
GoVueHTML = decodeURIComponent(atob(sourceTemplate[0].innerHTML))
|
|
}
|
|
|
|
var sourceData = document.getElementsByTagName("go-vue-data");
|
|
var GoVueData = {};
|
|
if (sourceData.length > 0) {
|
|
GoVueData = JSON.parse(decodeURIComponent(atob(sourceData[0].innerHTML)))
|
|
}
|
|
|
|
app.$options.template = GoVueHTML;
|
|
app.$mount(el);
|
|
|
|
for (var i in GoVueData) {
|
|
app[i] = GoVueData[i];
|
|
}
|
|
}
|