[bugfix] Search: sync value (#641)

This commit is contained in:
neverland 2018-09-26 15:24:27 +08:00 committed by GitHub
parent 5d2b0dd604
commit 6c175652bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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'
}); });
} }

View File

@ -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);
}, },