mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[bugfix] Search: sync value (#641)
This commit is contained in:
parent
5d2b0dd604
commit
6c175652bf
@ -12,9 +12,9 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onSearch(event) {
|
onSearch(event) {
|
||||||
if (event.detail) {
|
if (this.data.value) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '搜索:' + event.detail,
|
title: '搜索:' + this.data.value,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ VantComponent({
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
|
this.setData({ value: event.detail });
|
||||||
this.$emit('change', event.detail);
|
this.$emit('change', event.detail);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user