From ca6fde3bdfa1a8829819513d00c91dea482d2d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Mon, 1 Feb 2021 17:52:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96markd=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=99=A8;=E4=BC=98=E5=8C=96button=E7=BB=84=E4=BB=B6;=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0link=E7=BB=84=E4=BB=B6;=E5=A2=9E=E5=8A=A0=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=85=A5=E5=8F=A3=E6=96=87=E4=BB=B6,=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=BC=95=E5=85=A5=E5=85=A8=E9=87=8F=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/css/reset-basic.css | 4 +- src/form/button.wc | 4 +- src/form/index.js | 10 ++ src/form/link.wc | 267 ++++++++++++++++++++++++++++++++++++++++ src/markd/core.js | 5 +- 5 files changed, 284 insertions(+), 6 deletions(-) create mode 100644 src/form/index.js create mode 100644 src/form/link.wc diff --git a/src/css/reset-basic.css b/src/css/reset-basic.css index e1d5869..2f7883b 100644 --- a/src/css/reset-basic.css +++ b/src/css/reset-basic.css @@ -75,8 +75,8 @@ code, pre, samp {font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; --color-grey-2: rgb(164, 176, 190); --color-grey-3: rgb(134, 144, 155); /* inverse */ - --color-dark-a: rgba(65, 91, 118, 0.5); - --color-dark-1: rgb(65, 91, 118); + --color-dark-a: rgba(87, 96, 111, 0.5); + --color-dark-1: rgb(87, 96, 111); --color-dark-2: rgb(52, 73, 94); --color-dark-3: rgb(44, 62, 80); } diff --git a/src/form/button.wc b/src/form/button.wc index 621a65c..827e3ae 100644 --- a/src/form/button.wc +++ b/src/form/button.wc @@ -16,7 +16,6 @@ -moz-user-select: none; color: var(--color-dark-1); font-size: 14px; - vertical-align: middle; cursor: pointer; transition: box-shadow 0.15s linear; @@ -27,7 +26,6 @@ width: 100%; height: inherit; padding: var(--padding, 0 14px); - margin: auto; line-height: 1; border: 2px solid var(--color-plain-2); border-radius: inherit; @@ -282,7 +280,7 @@ export default class Button { // 圆形按钮不允许文字 if (this.hasAttribute('circle')) { - // this.textContent = '' + this.textContent = '' } this.__BTN__ = this.root.children[1] diff --git a/src/form/index.js b/src/form/index.js new file mode 100644 index 0000000..92449e1 --- /dev/null +++ b/src/form/index.js @@ -0,0 +1,10 @@ +import './button' +import './link' +import './input' +import './textarea' +import './number' +import './radio' +import './checkbox' +import './switch' +import './select' +import './star' diff --git a/src/form/link.wc b/src/form/link.wc new file mode 100644 index 0000000..5b9cd53 --- /dev/null +++ b/src/form/link.wc @@ -0,0 +1,267 @@ + + + + + diff --git a/src/markd/core.js b/src/markd/core.js index 4d5f129..7ddcded 100644 --- a/src/markd/core.js +++ b/src/markd/core.js @@ -294,7 +294,10 @@ class Tool { continue } html += `${tmp - .map((_, i) => `${_}`) + .map( + (_, i) => + `${Decoder.inline.call(this, _)}` + ) .join('')}` continue }