From 948c4e08c692c80b5eaee14ffadd889ddd1804ca Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 7 Apr 2023 16:29:54 +0800 Subject: [PATCH] fixed --- package.json | 2 +- src/index.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 }