diff --git a/index.html b/index.html index 9b26b74..d3c6af9 100644 --- a/index.html +++ b/index.html @@ -12,12 +12,6 @@
+ +
diff --git a/src/main.ts b/src/main.ts index 3097a79..923dfa1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -129,10 +129,10 @@ window.onload = function () { fileInput.click() } - // 保存文档功能 - const saveDom = document.querySelector('.menu-item__save')! + // 导出文档功能 + const saveDom = document.querySelector('.menu-item__export')! saveDom.onclick = function () { - console.log('save document') + console.log('export document') try { // 获取编辑器内容 diff --git a/src/style.css b/src/style.css index efcbc46..7d5a87d 100644 --- a/src/style.css +++ b/src/style.css @@ -198,6 +198,50 @@ ul { background-image: url('./assets/images/format.svg'); } +/* -------------------------------------------------- */ +/* Text menu items: horizontal link-style buttons */ +/* -------------------------------------------------- */ +.menu-item-text { + height: 24px; + display: flex; + align-items: center; + gap: 4px; +} + +.menu-item-text > div { + height: 24px; + padding: 0 8px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + user-select: none; + border-radius: 3px; + color: #0969da; /* link blue */ + font-size: 12px; + line-height: 24px; +} + +.menu-item-text > div:hover { + background: rgba(25, 55, 88, .06); + text-decoration: underline; +} + +.menu-item-text > div.active { + background: rgba(25, 55, 88, .10); +} + +.menu-item-text > div.disable { + color: #c0c4cc; + cursor: not-allowed; + opacity: 0.6; + pointer-events: none; +} + +.menu-item-text > div span { + pointer-events: none; /* 保证点击作用在父容器 */ +} + .menu-item__size-add i { background-image: url('./assets/images/size-add.svg'); }