2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-23 08:20:35 +03:00

fix: input class with object syntax (#552)

This commit is contained in:
mengxiong10
2020-12-01 11:20:59 +08:00
parent c369e73756
commit 5e399b459c
+2 -2
View File
@@ -449,7 +449,7 @@ export default {
placeholder: this.placeholder, placeholder: this.placeholder,
...this.inputAttr, ...this.inputAttr,
}; };
const { value, ...attrs } = props; const { value, class: className, ...attrs } = props;
const events = { const events = {
keydown: this.handleInputKeydown, keydown: this.handleInputKeydown,
focus: this.handleInputFocus, focus: this.handleInputFocus,
@@ -459,7 +459,7 @@ export default {
}; };
const input = this.renderSlot( const input = this.renderSlot(
'input', 'input',
<input value={value} {...{ attrs, on: events }} ref="input" />, <input value={value} class={className} {...{ attrs, on: events }} ref="input" />,
{ {
props, props,
events, events,