优化input组件的lazy属性;修复button的样式
parent
964b6093c3
commit
4839b327b9
|
@ -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;
|
||||
|
|
|
@ -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 }))
|
||||
}
|
||||
})
|
||||
|
|
Reference in New Issue