Commit 46f81223 by 李伟康

fix(build): 修复图标精灵样式生成问题

- 移除多余的换行符连接,确保CSS样式正确生成
- 修正图标宽度、高度和背景位置的rpx转换逻辑
- 确保图标精灵样式表的正确拼接输出
1 parent c143bd7c
......@@ -13,7 +13,7 @@ const spritesmithFunction = data => {
;((width = toRpx(width)), (height = toRpx(height)), (offset_x = toRpx(offset_x)), (offset_y = toRpx(offset_y)))
return `.icon-${name} { width: ${width}; height: ${height};background-position: ${offset_x} ${offset_y};}`
})
// .join('\n')
.join('')
// let shared = `.sprite-icon { background-image: url(${
// data.sprites[0].image
// });background-size: ${spritesheet.width / 2}rpx ${
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!