zpin-templates
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -24,2 +24,4 @@ 'use strict'; | ||
var classExclude = require("./classExclude"); | ||
var propsMergeFunction = 'function mergeProps(inline,external) {\n var res = _.assign({},inline,external)\n if (inline.hasOwnProperty(\'style\')) {\n res.style = _.defaults(res.style, inline.style);\n }\n if (inline.hasOwnProperty(\'className\') && external.hasOwnProperty(\'className\')) {\n res.className = external.className + \' \' + inline.className;\n }\n return res;\n}\n'; | ||
@@ -187,3 +189,7 @@ | ||
arr.forEach(function (v, i) { | ||
result += "this.styles['" + v.trim() + "']"; | ||
if (classExclude.indexOf(v.trim()) < 0) { | ||
result += "this.styles['" + v.trim() + "']"; | ||
} else { | ||
result += "'" + v.trim() + "'"; | ||
} | ||
if (i != arr.length - 1) { | ||
@@ -190,0 +196,0 @@ result += ","; |
{ | ||
"name": "zpin-templates", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Light weight templates for react -> write html get valid react code", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -21,2 +21,4 @@ 'use strict'; | ||
const classExclude=require("./classExclude"); | ||
const propsMergeFunction = `function mergeProps(inline,external) { | ||
@@ -201,3 +203,7 @@ var res = _.assign({},inline,external) | ||
arr.forEach(function (v,i) { | ||
result+="this.styles['"+v.trim()+"']"; | ||
if(classExclude.indexOf(v.trim())<0){ | ||
result+="this.styles['"+v.trim()+"']"; | ||
}else{ | ||
result+="'"+v.trim()+"'"; | ||
} | ||
if(i!=arr.length-1){ | ||
@@ -204,0 +210,0 @@ result+="," |
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
306496
68
3802