36 lines
849 B
JavaScript
36 lines
849 B
JavaScript
Page({
|
|
data: {
|
|
list: [
|
|
{ id: 1, text: '商品1' },
|
|
{ id: 2, text: '商品2' },
|
|
{ id: 3, text: '商品3' },
|
|
{ id: 4, text: '商品4' },
|
|
{ id: 5, text: '商品5' },
|
|
{ id: 6, text: '商品6' },
|
|
{ id: 7, text: '商品7' },
|
|
{ id: 8, text: '商品8' },
|
|
{ id: 9, text: '商品9' },
|
|
{ id: 10, text: '商品10' },
|
|
{ id: 11, text: '商品11' },
|
|
{ id: 12, text: '商品12' },
|
|
// 更多数据...
|
|
]
|
|
},
|
|
|
|
// 搜索确认事件
|
|
onSearchConfirm(e) {
|
|
const keyword = e.detail.value;
|
|
if (keyword) {
|
|
wx.showToast({
|
|
title: `搜索: ${keyword}`,
|
|
icon: 'none'
|
|
});
|
|
// 这里可以添加实际的搜索逻辑
|
|
}
|
|
},
|
|
|
|
// 输入框输入事件(可选)
|
|
onInputChange(e) {
|
|
console.log('输入内容:', e.detail.value);
|
|
}
|
|
}); |