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-11-06 17:55:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8fd159dc132d3ebef8acd5efbb2c1e3e5afc4779
8fd159dc
1 parent
e7323c41
把二级目录的手风琴也换成新组件
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
src/views/product/index.vue
src/views/product/index.vue
View file @
8fd159d
<!--
* @Date: 2024-09-27 16:53:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-06 1
5:52:49
* @LastEditTime: 2024-11-06 1
7:54:41
* @FilePath: /hager/src/views/product/index.vue
* @Description: 文件描述
-->
...
...
@@ -25,11 +25,12 @@
<div class="product-nav-wrapper">
<div class="product-nav-title">按产品类别查找</div>
<el-input style="margin-bottom: 0.5rem;" placeholder="请输入产品" prefix-icon="el-icon-search" v-model="search_keyword" @change="goToSearch"></el-input>
<el-collapse v-if="!is_all_cate" v-model="activeNames" @change="handleChange">
<
!-- <
el-collapse v-if="!is_all_cate" v-model="activeNames" @change="handleChange">
<el-collapse-item v-for="(item, index) in cate_list" :key="index" :title="item.category_name" :name="item.category_name">
<div @click="goToDetail(c)" v-for="(c, idx) in item.list" :key="idx" class="p-item">{{ c.product_name }}</div>
</el-collapse-item>
</el-collapse>
</el-collapse> -->
<Accordion v-if="!is_all_cate" :items="cate_list" />
<Accordion v-else :items="all_cate_list" />
</div>
</el-col>
...
...
@@ -175,6 +176,14 @@ export default {
data.forEach((item) => {
if (item.id === cate_id) {
this.cate_list = item.children;
// 重构数据结构配合组件
this.cate_list.forEach((c) => {
c.children = c.list;
c.style = {fontWeight: 'normal', height: '2.5rem'}
c.children.forEach((d) => {
d.category_name = d.product_name
})
})
}
});
} else {
...
...
Please
register
or
login
to post a comment