Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-07-03 21:11:13 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6d9441502fca015d0344d2543f516d91d4daef6e
6d944150
1 parent
4937f9c4
feat(搜索框): 为搜索框添加blur事件处理并调整样式
为多个页面的搜索框添加blur事件处理函数,输出搜索值 调整搜索框输入文字的样式和间距
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
12 deletions
src/pages/goodCarList/index.vue
src/pages/index/index.less
src/pages/index/index.vue
src/pages/messages/index.vue
src/pages/newCarList/index.vue
src/pages/post/index.vue
src/pages/goodCarList/index.vue
View file @
6d94415
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-0
2 22:49:42
* @LastEditTime: 2025-07-0
3 21:10:36
* @FilePath: /jgdl/src/pages/goodCarList/index.vue
* @Description: 特价好车页面
-->
...
...
@@ -17,8 +17,7 @@
</nut-col>
<nut-col span="18">
<!-- Search Bar -->
<nut-searchbar v-model="searchValue" placeholder="搜索品牌型号" shape="round"
background="transparent" input-background="#ffffff">
<nut-searchbar v-model="searchValue" placeholder="搜索品牌型号" @blur="onBlurSearch" shape="round" background="transparent" input-background="#ffffff">
<template #leftin>
<Search2 />
</template>
...
...
@@ -131,6 +130,9 @@ import './index.less'
// 响应式数据
const searchValue = ref('')
const onBlurSearch = () => {
console.warn(searchValue.value)
}
const favoriteIds = ref(['2', '4', '6'])
// Filter states - 使用NutUI Menu组件
...
...
src/pages/index/index.less
View file @
6d94415
...
...
@@ -15,6 +15,11 @@
margin-right: 15rpx;
}
.nut-searchbar__search-input .nut-searchbar__input-inner .h5-input {
padding-top: 10rpx;
color: gray;
}
/* 网格布局修复 */
.grid {
display: grid;
...
...
src/pages/index/index.vue
View file @
6d94415
<!--
* @Date: 2025-06-28 10:33:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-03 21:0
1:21
* @LastEditTime: 2025-07-03 21:0
9:43
* @FilePath: /jgdl/src/pages/index/index.vue
* @Description: 捡个电驴首页
-->
...
...
@@ -16,8 +16,7 @@
</nut-col>
<nut-col span="18">
<!-- Search Bar -->
<nut-searchbar v-model="searchValue" placeholder="搜索品牌型号" shape="round" background="transparent"
input-background="#ffffff">
<nut-searchbar v-model="searchValue" placeholder="搜索品牌型号" @blur="onBlurSearch" shape="round" background="transparent" input-background="#ffffff">
<template #leftin>
<Search2 />
</template>
...
...
@@ -170,6 +169,10 @@ import "./index.less";
const searchValue = ref('')
const favoriteIds = ref([])
const onBlurSearch = () => {
console.warn(searchValue.value)
}
// Banner图片
const bannerImages = ref([
'https://images.unsplash.com/photo-1558981806-ec527fa84c39?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60',
...
...
src/pages/messages/index.vue
View file @
6d94415
...
...
@@ -9,8 +9,7 @@
</nut-col>
<nut-col span="20">
<!-- Search Bar -->
<nut-searchbar v-model="searchValue" placeholder="搜索消息" shape="round"
background="transparent" input-background="#ffffff">
<nut-searchbar v-model="searchValue" placeholder="搜索消息" @blur="onBlurSearch" shape="round" background="transparent" input-background="#ffffff">
<template #leftin>
<Search2 />
</template>
...
...
@@ -229,6 +228,9 @@ const scrollStyle = ref({
// 搜索值
const searchValue = ref('')
const onBlurSearch = () => {
console.warn(searchValue.value)
}
// 当前激活的Tab
const activeTab = ref('all')
// 加载状态
...
...
src/pages/newCarList/index.vue
View file @
6d94415
...
...
@@ -17,8 +17,7 @@
</nut-col>
<nut-col span="18">
<!-- Search Bar -->
<nut-searchbar v-model="searchValue" placeholder="搜索品牌型号" shape="round"
background="transparent" input-background="#ffffff">
<nut-searchbar v-model="searchValue" placeholder="搜索品牌型号" @blur="onBlurSearch" shape="round" background="transparent" input-background="#ffffff">
<template #leftin>
<Search2 />
</template>
...
...
@@ -120,6 +119,9 @@ import './index.less'
// 响应式数据
const searchValue = ref('')
const onBlurSearch = () => {
console.warn(searchValue.value)
}
const favoriteIds = ref(['2', '4', '6'])
// Filter states - 使用NutUI Menu组件
...
...
src/pages/post/index.vue
View file @
6d94415
...
...
@@ -10,8 +10,7 @@
</nut-col>
<nut-col span="18">
<!-- Search Bar -->
<nut-searchbar v-model="searchValue" placeholder="搜索品牌型号" shape="round"
background="transparent" input-background="#ffffff">
<nut-searchbar v-model="searchValue" placeholder="搜索品牌型号" @blur="onBlurSearch" shape="round" background="transparent" input-background="#ffffff">
<template #leftin>
<Search2 />
</template>
...
...
@@ -137,6 +136,9 @@ import TabBar from '@/components/TabBar.vue'
// 响应式数据
const searchValue = ref('')
const onBlurSearch = () => {
console.warn(searchValue.value)
}
const favoriteIds = ref(['5', '7', '1'])
// 无限滚动相关状态
...
...
Please
register
or
login
to post a comment