diff --git a/src/css/reset-basic.css b/src/css/reset-basic.css index 0c0ec12..e1d5869 100644 --- a/src/css/reset-basic.css +++ b/src/css/reset-basic.css @@ -44,7 +44,7 @@ code, pre, samp {font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; --color-teal-1: rgb(72, 201, 176); --color-teal-2: rgb(26, 188, 156); --color-teal-3: rgb(22, 160, 133); - /* sucess */ + /* success */ --color-green-a: rgba(88, 214, 141, 0.5); --color-green-1: rgb(88, 214, 141); --color-green-2: rgb(46, 204, 113); diff --git a/src/form/button.wc b/src/form/button.wc index 0cd01a7..4925bc0 100644 --- a/src/form/button.wc +++ b/src/form/button.wc @@ -188,13 +188,13 @@ } // -------- -:host([type='sucess']:not([link])) button { +:host([type='success']:not([link])) button { background: var(--color-green-2); } :host([type='success'][link]) button { color: var(--color-green-2); } -:host([type='sucess']:not([disabled]):not([loading]):not([link])) button { +:host([type='success']:not([disabled]):not([loading]):not([link])) button { &:hover { background: var(--color-green-1); } @@ -202,7 +202,7 @@ background: var(--color-green-3); } } -:host([type='sucess']:focus-within:not([link])) { +:host([type='success']:focus-within:not([link])) { box-shadow: 0 0 0 2px var(--color-green-a); } diff --git a/src/form/input.wc b/src/form/input.wc index dab0cf0..0a3a2fa 100644 --- a/src/form/input.wc +++ b/src/form/input.wc @@ -459,7 +459,7 @@ export default class Input { mounted() { var prepend = this.__PREPEND__.assignedNodes() var append = this.__APPEND__.assignedNodes() - var { passwd } = this.props + this.stamp = 0 // 相同插槽, 只允许1个 @@ -479,6 +479,8 @@ export default class Input { // 键盘事件 this._handleSubmit = $.catch(this.__INPUT__, 'keydown', ev => { + let { passwd } = this.props + if (this.disabled || this.readOnly) { return } @@ -504,6 +506,7 @@ export default class Input { // 输入状态事件 this._handleChange = $.bind(this.__INPUT__, 'input', ev => { let now = Date.now() + let { lazy } = this.props // 并发拦截 if (lazy && now - this.stamp < lazy) {