zpin-templates
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -207,20 +207,20 @@ 'use strict'; | ||
//多class问题 | ||
// val=val.trim(); | ||
// if(val.indexOf("{this.styles.")<0){ | ||
// var arr=val.split(" "); | ||
// var result="{["; | ||
// arr.forEach(function (v,i) { | ||
// if(classExclude.indexOf(v.trim())<0){ | ||
// result+="this.styles['"+v.trim()+"']"; | ||
// }else{ | ||
// result+="'"+v.trim()+"'"; | ||
// } | ||
// if(i!=arr.length-1){ | ||
// result+="," | ||
// } | ||
// }) | ||
// result+="].join(' ')}" | ||
// } | ||
val = val.trim(); | ||
if (val.indexOf("{this.styles.") < 0) { | ||
var arr = val.split(" "); | ||
var result = "{["; | ||
arr.forEach(function (v, i) { | ||
if (classExclude.indexOf(v.trim()) < 0) { | ||
result += "this.styles['" + v.trim() + "']"; | ||
} else { | ||
result += v.trim(); | ||
} | ||
if (i != arr.length - 1) { | ||
result += ","; | ||
} | ||
}); | ||
result += "].join(' ')}"; | ||
} | ||
// console.log(result); | ||
props[propKey] = existing + utils.convertText(node, context, val.trim()); | ||
props[propKey] = existing + utils.convertText(node, context, result); | ||
} | ||
@@ -227,0 +227,0 @@ } else if (!_.startsWith(key, 'rt-')) { |
{ | ||
"name": "zpin-templates", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Light weight templates for react -> write html get valid react code", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -222,20 +222,20 @@ 'use strict'; | ||
//多class问题 | ||
// val=val.trim(); | ||
// if(val.indexOf("{this.styles.")<0){ | ||
// var arr=val.split(" "); | ||
// var result="{["; | ||
// arr.forEach(function (v,i) { | ||
// if(classExclude.indexOf(v.trim())<0){ | ||
// result+="this.styles['"+v.trim()+"']"; | ||
// }else{ | ||
// result+="'"+v.trim()+"'"; | ||
// } | ||
// if(i!=arr.length-1){ | ||
// result+="," | ||
// } | ||
// }) | ||
// result+="].join(' ')}" | ||
// } | ||
val=val.trim(); | ||
if(val.indexOf("{this.styles.")<0){ | ||
var arr=val.split(" "); | ||
var result="{["; | ||
arr.forEach(function (v,i) { | ||
if(classExclude.indexOf(v.trim())<0){ | ||
result+="this.styles['"+v.trim()+"']"; | ||
}else{ | ||
result+=v.trim(); | ||
} | ||
if(i!=arr.length-1){ | ||
result+="," | ||
} | ||
}) | ||
result+="].join(' ')}" | ||
} | ||
// console.log(result); | ||
props[propKey] = existing + utils.convertText(node, context,val.trim()); | ||
props[propKey] = existing + utils.convertText(node, context,result); | ||
} | ||
@@ -242,0 +242,0 @@ } else if (!_.startsWith(key, 'rt-')) { |
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
271883