-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
DiamondYuan
committed
Jan 29, 2024
1 parent
f418779
commit 049ef0e
Showing
36 changed files
with
1,694 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
<list header="基础使用"> | ||
<container title="姓名"> | ||
<input placeholder="请输入姓名" value="{{ value }}" onChange="onInputChange"> | ||
<view slot="suffix" class="tips" onTap="onTap">生僻字?</view> | ||
</input> | ||
<ant-input | ||
placeholder="请输入姓名" | ||
value="{{ value }}" | ||
onChange="onInputChange"> | ||
<view | ||
slot="suffix" | ||
class="tips" | ||
onTap="onTap"> | ||
生僻字? | ||
</view> | ||
</ant-input> | ||
</container> | ||
|
||
<list-item onTap="onTap"> | ||
默认键盘 | ||
</list-item> | ||
<list-item onTap="onTap">默认键盘</list-item> | ||
|
||
<rare-words-keyboard | ||
visible="{{visible}}" | ||
visible="{{ visible }}" | ||
onClose="onClose" | ||
onChange="onChange" | ||
/> | ||
onChange="onChange" /> | ||
|
||
<list-item onTap="onTap2"> | ||
不带蒙层 | ||
</list-item> | ||
<list-item onTap="onTap2">不带蒙层</list-item> | ||
|
||
<rare-words-keyboard | ||
visible="{{visible2}}" | ||
visible="{{ visible2 }}" | ||
showMask="{{ false }}" | ||
onClose="onClose2" | ||
onChange="onChange" | ||
/> | ||
onChange="onChange" /> | ||
|
||
<list-item onTap="onTap3"> | ||
监听输入完成、出错的回调 | ||
</list-item> | ||
<list-item onTap="onTap3">监听输入完成、出错的回调</list-item> | ||
|
||
<rare-words-keyboard | ||
visible="{{visible3}}" | ||
visible="{{ visible3 }}" | ||
onClose="onClose3" | ||
onChange="onChange" | ||
onError="onKeyBoardError" | ||
/> | ||
onError="onKeyBoardError" /> | ||
</list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
Page({ | ||
data: { | ||
value: '', | ||
visible: false, | ||
visible2: false, | ||
visible3: false, | ||
}, | ||
onInputChange(value) { | ||
this.setData({ value }); | ||
}, | ||
// 默认键盘 | ||
onTap() { | ||
this.setData({ visible: true }); | ||
}, | ||
// 关闭键盘 | ||
onClose() { | ||
this.setData({ visible: false }); | ||
}, | ||
// 不带蒙层 | ||
onTap2() { | ||
this.setData({ visible2: true }); | ||
}, | ||
onClose2() { | ||
this.setData({ visible2: false }); | ||
}, | ||
// 监听各种事件 | ||
onTap3() { | ||
this.setData({ visible3: true }); | ||
}, | ||
onClose3() { | ||
this.setData({ visible3: false }); | ||
}, | ||
onChange(value) { | ||
const curValue = this.data.value; | ||
this.setData({ value: curValue + value }); | ||
}, | ||
onKeyBoardError(err) { | ||
my.showToast({ content: 'onError ' + err.toString() }); | ||
} | ||
data: { | ||
value: '', | ||
visible: false, | ||
visible2: false, | ||
visible3: false, | ||
}, | ||
onInputChange(value) { | ||
this.setData({ value }); | ||
}, | ||
// 默认键盘 | ||
onTap() { | ||
this.setData({ visible: true }); | ||
}, | ||
// 关闭键盘 | ||
onClose() { | ||
this.setData({ visible: false }); | ||
}, | ||
// 不带蒙层 | ||
onTap2() { | ||
this.setData({ visible2: true }); | ||
}, | ||
onClose2() { | ||
this.setData({ visible2: false }); | ||
}, | ||
// 监听各种事件 | ||
onTap3() { | ||
this.setData({ visible3: true }); | ||
}, | ||
onClose3() { | ||
this.setData({ visible3: false }); | ||
}, | ||
onChange(value) { | ||
const curValue = this.data.value; | ||
this.setData({ value: curValue + value }); | ||
}, | ||
onKeyBoardError(err) { | ||
my.showToast({ content: 'onError ' + err.toString() }); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.