From ae226098c943ce7369c3d97344b2ddff3706f808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 26 May 2021 11:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=80=82=E9=85=8DEditor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor/index.wc | 24 ++++++++++++++++++------ src/markd/index.wc | 4 ++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/editor/index.wc b/src/editor/index.wc index b3234c8..e68b91a 100644 --- a/src/editor/index.wc +++ b/src/editor/index.wc @@ -38,10 +38,11 @@ min-width: 200px; min-height: 100px; max-height: 640px; - border-radius: 2px; + border-radius: 3px; } table { + width: 100%; border-spacing: 0; border-collapse: collapse; @@ -53,12 +54,24 @@ table { } th, td { - padding: 6px 12px; - border: 1px solid var(--color-plain-3); + padding: 6px 13px; + border: 1px solid var(--color-plain-2); + vertical-align: middle; } th { font-weight: bold; } + tr:nth-child(2n) { + background: #fcfdff; + } +} + +ul, +ol { + margin-left: 1em; +} +a { + color: var(--color-teal-1); } .neditor { @@ -114,7 +127,6 @@ wc-scroll { .editor { height: 100%; padding: 5px 8px; - font-size: 14px; outline: none; img { @@ -429,7 +441,7 @@ export default class Editor { } if (this.props.readonly || this.props.disabled) { - return ev.preventDefault() + return } while (target.tagName !== 'SPAN') { @@ -508,7 +520,7 @@ export default class Editor { }) // 超链接 - this.__linkFn = $.bind(this.__LINK_BTN__, 'active', ev => { + this.__linkFn = $.bind(this.__LINK_BTN__, 'click', ev => { if (LINK_INPUT.value) { this.__LINK__.classList.remove('fadein') this.__EDITOR__.focus() diff --git a/src/markd/index.wc b/src/markd/index.wc index 4e38127..0b1ca82 100644 --- a/src/markd/index.wc +++ b/src/markd/index.wc @@ -150,7 +150,7 @@ table { border-collapse: collapse; tr { - background-color: #fff; + background: #fff; } thead tr { background: var(--color-plain-1); @@ -165,7 +165,7 @@ table { font-weight: bold; } tr:nth-child(2n) { - background-color: #fcfdff; + background: #fcfdff; } }