Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
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
2024-10-28 15:55:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9b0a25a4bc846abbc1c053d43aff7bc4cb411333
9b0a25a4
1 parent
7d79cb9f
✨ feat: 搜索结果页-产品显示一行4个,图片可以点击
李琛需求
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
src/views/search.vue
src/views/search.vue
View file @
9b0a25a
<!--
* @Date: 2024-10-20 16:57:48
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-28 15:
03:14
* @LastEditTime: 2024-10-28 15:
53:43
* @FilePath: /hager/src/views/search.vue
* @Description: 文件描述
-->
...
...
@@ -14,7 +14,7 @@
<div slot="label" class="customer-label">产品 <span>{{ count_product }}</span></div>
<div class="search-product-list">
<div :class="['search-product-item', is_xs ? 'xs' : '']" v-for="(item, index) in product_list" :key="index">
<div :class="['search-product-item-img', is_xs ? 'xs' : '']" :style="{ 'background-image': 'url('+ item.cover +')' }">
<div
@click="goToDetail(item)"
:class="['search-product-item-img', is_xs ? 'xs' : '']" :style="{ 'background-image': 'url('+ item.cover +')' }">
<!-- <div :class="['search-product-item-img', is_xs ? 'xs' : '']"> -->
<!-- <img style="width: 100%; height: auto;" :src="item.cover"> -->
</div>
...
...
@@ -288,7 +288,7 @@ export default {
margin-top: 1rem;
}
.search-product-item {
width: calc(
33.54
% - 1rem);
width: calc(
25.25
% - 1rem);
&.xs {
width: calc(50% - 1rem);
}
...
...
@@ -313,6 +313,10 @@ export default {
width: 100%;
}
}
&:hover {
cursor: pointer;
}
}
.search-product-item-title {
text-align: left;
...
...
Please
register
or
login
to post a comment