From 065271f2f62d9830d6d5fe1c3584de7055f15259 Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 17 May 2024 17:51:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dinput=E7=AD=89=E6=9C=89?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=BE=93=E5=85=A5=E4=BA=A4=E4=BA=92=E7=9A=84?= =?UTF-8?q?=E7=BB=84=E4=BB=B6,=20=E5=9B=A0=E4=B8=BAvalue=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=88=9D=E5=80=BC=E5=92=8C=E7=BB=88=E5=80=BC=E9=83=BD=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6,=20=E5=88=B7=E6=96=B0=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E6=B8=85=E9=99=A4=E8=BE=93=E5=85=A5=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/html.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2f8d30c..4b34040 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wkit", - "version": "1.11.4", + "version": "1.11.5", "type": "module", "description": "A library for building fast, lightweight web components.", "main": "dist/index.js", diff --git a/src/html.js b/src/html.js index 86a21ab..a729c2a 100644 --- a/src/html.js +++ b/src/html.js @@ -548,7 +548,8 @@ class AttributePart { this.#value[i] = v } } - if (changed) { + // value属性做特殊处理, 解决输入框无法清空的问题 + if (changed || this.name === 'value') { this.commitValue(value) } }