From 94850f237339630a1d611839c44ed78aabdf801d Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 21 Jun 2019 19:49:47 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BC=98=E5=8C=96=20textarea=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/view/components/textarea/index.vue | 48 ++++++++++----------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/src/core/view/components/textarea/index.vue b/src/core/view/components/textarea/index.vue index 55368e50f..03f678658 100644 --- a/src/core/view/components/textarea/index.vue +++ b/src/core/view/components/textarea/index.vue @@ -299,57 +299,53 @@ uni-textarea[hidden] { uni-textarea[auto-height] .uni-textarea-textarea { overflow-y: hidden; } +.uni-textarea-wrapper, +.uni-textarea-placeholder, +.uni-textarea-compute, +.uni-textarea-textarea { + outline: none; + border: none; + padding: 0; + margin: 0; + text-decoration: inherit; +} .uni-textarea-wrapper { + display: block; position: relative; width: 100%; height: 100%; - overflow: hidden; - font: inherit; - font-size: inherit; - font-family: inherit; - font-style: inherit; - font-weight: inherit; - line-height: inherit; - letter-spacing: inherit; - text-indent: inherit; - color: inherit; - text-align: inherit; } .uni-textarea-placeholder, .uni-textarea-compute, .uni-textarea-textarea { - box-sizing: border-box; position: absolute; width: 100%; height: 100%; left: 0; top: 0; + white-space: pre-wrap; word-break: break-all; - font: inherit; - font-size: inherit; - font-family: inherit; - font-style: inherit; - font-weight: inherit; - line-height: inherit; - letter-spacing: inherit; - text-indent: inherit; - color: inherit; - text-align: inherit; } .uni-textarea-placeholder { color: grey; + overflow: hidden; } .uni-textarea-compute { visibility: hidden; height: auto; } .uni-textarea-textarea { - outline: none; - border: none; - padding: 0; resize: none; - background-color: transparent; + background: none; + color: inherit; opacity: inherit; + font: inherit; + line-height: inherit; + letter-spacing: inherit; + text-align: inherit; + text-indent: inherit; + text-transform: inherit; + text-shadow: inherit; } /* 用于解决 iOS textarea 内部默认边距 */ .uni-textarea-textarea-ios { -- GitLab