搜索和数据展示

master
蔡军仁 6 months ago
parent d83972c616
commit 4401295f0a

@ -13,17 +13,17 @@ Page({
/** /**
* 生命周期函数--监听页面加载2 * 生命周期函数--监听页面加载2
*.list-keywords { *.list-keywords {
*margin: 10px; *margin: 10px;1
*padding: 10px; *padding: 10px;1
*background: #fff; *background: #fff;1
*} *}1
*.list-keywords .item{ *.list-keywords .item{
*display: inline-block; *display: inline-block;1
*padding: 5px 10px; *padding: 5px 10px;
*background: #f1f1f1; *background: #f1f1f1;1
*margin: 5px; *margin: 5px;
*font-size: 12px; *font-size: 12px;1
*color: #666; *color: #666;1
*} *}
*/ */
onLoad(options) { onLoad(options) {

@ -1,6 +1,6 @@
<view> <view>
<van-search value="{{ value }}" placeholder="请输入搜索关键词" use-action-slot bind:change="onChange" bind:search="onSearch"> <van-search value="{{ value }}" placeholder="请输入搜索关键词" use-action-slot bind:change="onChange" bind:search="onSearch">
<van-button type="primary" size="small" slot="action" bind:tap="onSearchCliclk">搜索</van-button>//搜索提示 <van-button type="primary" size="small" slot="action" bind:tap="onSearchCliclk">搜索</van-button>//搜索提示11
</van-search> </van-search>
<view class="list-keywords"> <view class="list-keywords">
<text data-hotkey="{{ item.content }}" bindtap="clickGetKeyWords" class="item" wx:for="{{ hotSearch }}" wx:key="index">{{ item.content }}</text> <text data-hotkey="{{ item.content }}" bindtap="clickGetKeyWords" class="item" wx:for="{{ hotSearch }}" wx:key="index">{{ item.content }}</text>

@ -1,13 +1,13 @@
.list-keywords {//搜索框设置 .list-keywords {//搜索框设置1
margin: 10px;//外边距 margin: 10px;//外边距1
padding: 10px;//内边距 padding: 10px;//内边距1
background: #fff;//背景色 background: #fff;//背景色1
} }
.list-keywords .item{ .list-keywords .item{
display: inline-block;//样式 display: inline-block;//样式1
padding: 5px 10px;//内边距 padding: 5px 10px;//内边距1
background: #f1f1f1;//背景 background: #f1f1f1;//背景1
margin: 5px;//外边距 margin: 5px;//外边距1
font-size: 12px;//字号 font-size: 12px;//1
color: #666;//颜色 color: #666;//颜色1
} }

Loading…
Cancel
Save