diff --git a/package.json b/package.json index b3c22c8..c2be029 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bd/core", - "version": "1.8.6", + "version": "1.8.7", "type": "module", "description": "百搭UI组件库的核心", "main": "dist/index.js", diff --git a/src/index.js b/src/index.js index 9383b55..7abfe71 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,9 @@ export function classMap(data = {}) { export function styleMap(data = {}) { let output = '' for (let k in data) { - output += hyphen(k) + ':' + data[k] + ';' + if (data[k] || data[k] === 0) { + output += hyphen(k) + ':' + data[k] + ';' + } } return output }