|
|
@ -103,7 +103,7 @@ function GoVueRender(template, app, context) { |
|
|
|
var raw = GoReadFile(template); |
|
|
|
|
|
|
|
|
|
|
|
console.log(vuessr); |
|
|
|
// console.log(vuessr);
|
|
|
|
|
|
|
|
var renderer = vuessr.createRenderer({ |
|
|
|
template: raw |
|
|
@ -207,6 +207,12 @@ var GoVueIgnore = function () { |
|
|
|
* 忽略前置 |
|
|
|
*/ |
|
|
|
this.ignore = function () { |
|
|
|
var templateTagNodes = document.getElementsByTagName("template"); |
|
|
|
for(var i = 0;i<templateTagNodes.length;i++){ |
|
|
|
templateTagNodes[i].outerHTML = templateTagNodes[i].outerHTML.replace(/<template/g,"<gv-template").replace(/<\/template>/g,"</gv-template>") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var gv_ignore = document.getElementsByTagName("gv-ignore"); |
|
|
|
gv_ignore_len = gv_ignore.length; |
|
|
|
for (var i = gv_ignore_len - 1; i >= 0; i--) { |
|
|
@ -215,7 +221,8 @@ var GoVueIgnore = function () { |
|
|
|
} |
|
|
|
var gv_ignore_class = document.querySelectorAll("[gv-ignore]"); |
|
|
|
gv_ignore_class_len = gv_ignore_class.length; |
|
|
|
// console.log("gv_ignore_class_len",gv_ignore_class_len)
|
|
|
|
// console.log(document.innerHTML);
|
|
|
|
// console.log("gv_ignore_class_len",gv_ignore_class_len)
|
|
|
|
for (var i = 0; i < gv_ignore_class_len; i++) { |
|
|
|
if (!gv_ignore_class_map[i]) { |
|
|
|
gv_ignore_class_map[i] = {}; |
|
|
@ -232,6 +239,14 @@ var GoVueIgnore = function () { |
|
|
|
gv_ignore_class[i].removeAttribute("gv-ignore"); |
|
|
|
gv_ignore_class[i].setAttribute("gv-ignore-val", "gv-ignore-" + i) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var templateTagNodes = document.getElementsByTagName("gv-template"); |
|
|
|
for(var i = 0;i<templateTagNodes.length;i++){ |
|
|
|
templateTagNodes[i].outerHTML = templateTagNodes[i].outerHTML.replace(/<gv-template/g,"<template").replace(/<\/gv-template>/g,"</template>") |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|