Skip to content

Commit

Permalink
fix(ui/counter ui/input ui/select): 修复counter移动端长按touchend失效的问题,修复inp…
Browse files Browse the repository at this point in the history
…ut select颜色显示的问题

affects: @varlet/ui
  • Loading branch information
haoziqaq committed Apr 19, 2021
1 parent bb1a33c commit a0e6f6a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion packages/varlet-ui/src/counter/Counter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@click="decrement"
@touchstart="pressDecrement"
@touchend="releaseDecrement"
@touchcancel="releaseDecrement"
/>
<input
class="var-counter__input"
Expand Down Expand Up @@ -49,6 +50,7 @@
@click="increment"
@touchstart="pressIncrement"
@touchend="releaseIncrement"
@touchcancel="releaseIncrement"
/>
</div>

Expand All @@ -70,7 +72,7 @@ import { useForm } from '../form/provide'
import { useValidation } from '../utils/components'
const SPEED = 100
const DELAY = 400
const DELAY = 600
export default defineComponent({
name: 'VarCounter',
Expand Down
6 changes: 3 additions & 3 deletions packages/varlet-ui/src/input/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
formDisabled || disabled ? 'var-input--disabled' : null,
]"
:style="{
color: isFocus ? focusColor : blurColor,
color: !errorMessage ? (isFocus ? focusColor : blurColor) : null,
}"
>
<div class="var-input__icon" :class="[!hint ? 'var-input--non-hint' : null]">
Expand Down Expand Up @@ -60,7 +60,7 @@
formDisabled || disabled ? 'var-input--line-disabled' : null,
errorMessage ? 'var-input--line-error' : null,
]"
:style="{ background: blurColor }"
:style="{ background: !errorMessage ? blurColor : null }"
v-if="line"
>
<div
Expand All @@ -70,7 +70,7 @@
formDisabled || disabled ? 'var-input--line-disabled' : null,
errorMessage ? 'var-input--line-error' : null,
]"
:style="{ background: focusColor }"
:style="{ background: !errorMessage ? focusColor : null }"
></div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/varlet-ui/src/select/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
formDisabled || disabled ? 'var-select--disabled' : null,
]"
:style="{
color: isFocus ? focusColor : blurColor,
color: !errorMessage ? (isFocus ? focusColor : blurColor) : null,
}"
>
<div class="var-select__icon" :class="[!hint ? 'var-select--non-hint' : null]">
Expand Down Expand Up @@ -81,7 +81,7 @@
formDisabled || disabled ? 'var-select--line-disabled' : null,
errorMessage ? 'var-select--line-error' : null,
]"
:style="{ background: blurColor }"
:style="{ background: !errorMessage ? blurColor : null }"
v-if="line"
>
<div
Expand All @@ -91,7 +91,7 @@
formDisabled || disabled ? 'var-select--line-disabled' : null,
errorMessage ? 'var-select--line-error' : null,
]"
:style="{ background: focusColor }"
:style="{ background: !errorMessage ? focusColor : null }"
></div>
</div>
</div>
Expand Down

0 comments on commit a0e6f6a

Please sign in to comment.