Skip to content
This repository was archived by the owner on Jan 10, 2019. It is now read-only.

Commit d66c7fc

Browse files
committed
fix: 修复Input组件的clear-button不在item组件中使用时显示的bug
1 parent 2016950 commit d66c7fc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/input/input.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="ion-input" :class="[modeClass,{'clearInput':clearInput}]" @click="$_clickToFocus($event)">
2+
<div class="ion-input" :class="[modeClass,inputClass,{'clearInput':clearInput}]" @click="$_clickToFocus($event)">
33
<div class="input-inner-wrap">
44
<input ref="input"
55
:class="[textInputClass]"
@@ -116,7 +116,7 @@
116116
import Button from '../button'
117117
import REGEXP from '../../util/regexp'
118118
import debounce from 'lodash.debounce'
119-
import { isObject, isFunction, isRegexp, isBlank, isPresent } from '../../util/type'
119+
import { isBlank, isFunction, isObject, isPresent, isRegexp } from '../../util/type'
120120
121121
export default {
122122
name: 'Input',
@@ -593,7 +593,7 @@
593593
*/
594594
$_setItemHasValueClass () {
595595
if (this.itemComponent) {
596-
this.itemComponent.inputClass['input-has-value'] = this.hasValue
596+
this.itemComponent.inputClass['input-has-value'] = !!this.hasValue
597597
}
598598
this.inputClass['input-has-value'] = !!this.hasValue
599599
}

src/components/input/style/input.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ input.text-input:-webkit-autofill {
118118
// Clear Input Icon
119119
// --------------------------------------------------
120120

121-
.ion-input .item-button.text-input-clear-icon {
121+
.ion-input .ion-button.text-input-clear-icon {
122122
position: absolute;
123123
top: 0;
124124
display: none;

0 commit comments

Comments
 (0)