diff --git a/README.md b/README.md index 0db00e9..5800079 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,15 @@ (本质上只是给创建 html 的js方法套了一层使其能够链式调用) +```bash +npm version patch # 修复问题 +npm version minor # 添加功能 +npm version major # 破坏性更改 + +npm publish +``` + + ```bash npm i @laniakeasupercluster/widgets ``` diff --git a/index.js b/index.js index 261c103..b2f79d4 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -import { div, span, pre, h1, h2, p, ul, li, button, createElement } from './main.js' +import { div, span, pre, h1, h2, p, ul, li, button } from './main.js' import { Dialog } from './widgets/dialog.js' document.body.style.fontFamily = 'Arial, sans-serif' diff --git a/main.js b/main.js index 283e0cb..7e494a1 100644 --- a/main.js +++ b/main.js @@ -103,8 +103,8 @@ export function createElement({ innerText, innerHTML, textContent, readOnly, chi } if (key === 'font') { - if (['bold', 'semibold'].includes(value)) { - const fontWeightMap = { 'semibold': 600, 'bold': 700 } + if (['medium', 'bold', 'semibold'].includes(value)) { + const fontWeightMap = { 'medium':500, 'semibold': 600, 'bold': 700 } element.style.fontWeight = fontWeightMap[value] return } diff --git a/package.json b/package.json index 438a40c..4595caf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@laniakeasupercluster/widgets", "description": "A simple widgets tracker", - "version": "1.1.6", + "version": "1.1.7", "type": "module", "main": "main.js", "author": "Laniakea Supercluster ",