zpin-templates
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -164,2 +164,19 @@ 'use strict'; | ||
function generateProps(node, context) { | ||
if (node.attribs[classAttr]) { | ||
var name = node.attribs[classAttr]; | ||
name.trim(); | ||
name = name.split(" "); | ||
name.map(function (v) { | ||
v = v.trim(); | ||
if (v.toString().startsWith("__ga__")) { | ||
v = v.toString().replace("__ga__", ""); | ||
var params = v.split("_"); | ||
var url = node.name == "a" ? node.attribs['href'] : ""; | ||
//在click捕获阶段处理埋点 | ||
// if(params.isArray()&¶ms.length>=3) | ||
node.attribs["onClickCapture"] = "{()=>ZP.analysis.init_monitor_analy('" + url + "','" + params[0] + "','" + params[1] + "','" + params[2] + "')}"; | ||
} | ||
}); | ||
} | ||
var props = {}; | ||
@@ -166,0 +183,0 @@ _.forOwn(node.attribs, function (val, key) { |
{ | ||
"name": "zpin-templates", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Light weight templates for react -> write html get valid react code", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -178,2 +178,19 @@ 'use strict'; | ||
function generateProps(node, context) { | ||
if(node.attribs[classAttr]){ | ||
let name=node.attribs[classAttr]; | ||
name.trim(); | ||
name=name.split(" "); | ||
name.map(function (v) { | ||
v=v.trim(); | ||
if(v.toString().startsWith("__ga__")){ | ||
v=v.toString().replace("__ga__",""); | ||
let params=v.split("_"); | ||
let url=node.name=="a"?node.attribs['href']:""; | ||
//在click捕获阶段处理埋点 | ||
// if(params.isArray()&¶ms.length>=3) | ||
node.attribs["onClickCapture"]="{()=>ZP.analysis.init_monitor_analy('"+url+"','"+params[0]+"','"+params[1]+"','"+params[2]+"')}"; | ||
} | ||
}) | ||
} | ||
const props = {}; | ||
@@ -180,0 +197,0 @@ _.forOwn(node.attribs, (val, key) => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
285242
3579