Skip to content

Commit

Permalink
fix: 输入框允许清楚的情况下,自动失焦问题
Browse files Browse the repository at this point in the history
  • Loading branch information
rayhomie committed Apr 19, 2024
1 parent 99ae10d commit ac28b81
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion compiled/alipay/demo/pages/Input/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
onChange="handleMoney"
type="digit"
className="input money"
focusClassName="border">
focusClassName="border"
allowClear>
<view slot="prefix">¥</view>
<view slot="suffix">RMB</view>
</ant-input>
Expand Down
4 changes: 2 additions & 2 deletions compiled/alipay/src/Input/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
}

&-clear-show {
display: flex;
opacity: 1;
}
&-clear-hidden {
display: none;
opacity: 0;
pointer-events: none;
}
&-placeholder {
Expand Down
3 changes: 2 additions & 1 deletion compiled/wechat/demo/pages/Input/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
bind:change="handleMoney"
type="digit"
className="input money"
focusClassName="border">
focusClassName="border"
allowClear>
<view slot="prefix">¥</view>
<view slot="suffix">RMB</view>
</ant-input>
Expand Down
1 change: 0 additions & 1 deletion compiled/wechat/src/GuideTour/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
import { Component, triggerEventValues, triggerEventOnly, } from '../_util/simply';
import { GuideTourDefaultProps } from './props';
import mixinValue from '../mixins/value';
import '../_util/assert-component2';
Component(GuideTourDefaultProps, {
onNext: function () {
return __awaiter(this, void 0, void 0, function () {
Expand Down
4 changes: 2 additions & 2 deletions compiled/wechat/src/Input/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
font-size: 17px;
}
.ant-input-clear-show {
display: flex;
opacity: 1;
}
.ant-input-clear-hidden {
display: none;
opacity: 0;
pointer-events: none;
}
.ant-input-placeholder {
Expand Down
1 change: 1 addition & 0 deletions demo/pages/Input/index.axml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default (_, { value, money }: InternalData) => (
type="digit"
className="input money"
focusClassName="border"
allowClear
>
<View slot="prefix"></View>
<View slot="suffix">RMB</View>
Expand Down
4 changes: 2 additions & 2 deletions src/Input/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
}

&-clear-show {
display: flex;
opacity: 1;
}
&-clear-hidden {
display: none;
opacity: 0;
pointer-events: none;
}
&-placeholder {
Expand Down

0 comments on commit ac28b81

Please sign in to comment.