diff --git a/src/form/button.wc b/src/form/button.wc index 146bf9e..374311f 100644 --- a/src/form/button.wc +++ b/src/form/button.wc @@ -65,6 +65,7 @@ } :host([size='large'][circle]) { min-width: 52px; + width: 52px; height: 52px; button { @@ -81,6 +82,7 @@ } :host([size='medium'][circle]) { min-width: 44px; + width: 44px; } :host([size='small']) { width: 96px; diff --git a/src/form/input.wc b/src/form/input.wc index 039199e..48bee49 100644 --- a/src/form/input.wc +++ b/src/form/input.wc @@ -472,6 +472,7 @@ export default class Input { // 键盘事件 this._handleSubmit = $.catch(this.__INPUT__, 'keydown', ev => { let { passwd } = this.props + let now = Date.now() if (this.disabled || this.readOnly) { return @@ -491,6 +492,12 @@ export default class Input { return this._fetchSelect(this.state.mvidx, ev) } + // 并发拦截 + if (lazy && now - this.stamp < lazy) { + return + } + + this.stamp = now this.dispatchEvent(new CustomEvent('submit', { detail: this.value })) } })