滚动组件增加min-width
parent
53aa4d89ff
commit
7eeb00ac93
|
@ -355,6 +355,8 @@ class Input extends Component {
|
||||||
<input
|
<input
|
||||||
ref="input"
|
ref="input"
|
||||||
@input=${this.onInput}
|
@input=${this.onInput}
|
||||||
|
@change=${this.onChange}
|
||||||
|
@keydown=${this.onKeyDown}
|
||||||
placeholder=${this.placeholder}
|
placeholder=${this.placeholder}
|
||||||
maxlength=${this.maxlength}
|
maxlength=${this.maxlength}
|
||||||
minlength=${this.minlength}
|
minlength=${this.minlength}
|
||||||
|
@ -377,6 +379,14 @@ class Input extends Component {
|
||||||
this.$refs.input.value = ''
|
this.$refs.input.value = ''
|
||||||
this.value = ''
|
this.value = ''
|
||||||
}
|
}
|
||||||
|
onChange() {
|
||||||
|
this.$emit('change')
|
||||||
|
}
|
||||||
|
onKeyDown(e) {
|
||||||
|
if (e.keyCode === 13) {
|
||||||
|
this.$emit('submit')
|
||||||
|
}
|
||||||
|
}
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.autofocus) {
|
if (this.autofocus) {
|
||||||
// 火狐浏览器需要手动focus()才能聚焦成功
|
// 火狐浏览器需要手动focus()才能聚焦成功
|
||||||
|
|
|
@ -40,6 +40,7 @@ class Scroll extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
|
min-width: 100%;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue