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-24 12:28:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0b86ce3d6a3210957c74084cd8f632be1d2032a4
0b86ce3d
1 parent
7e4a8705
fix 详情页显示调整
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
src/views/product/detail.vue
src/views/product/detail.vue
View file @
0b86ce3
<!--
* @Date: 2024-09-29 14:26:41
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-2
3 18:45:31
* @LastEditTime: 2024-10-2
4 12:27:34
* @FilePath: /hager/src/views/product/detail.vue
* @Description: 文件描述
-->
...
...
@@ -87,8 +87,15 @@
<i v-else @click="checkItem(item)" class="el-icon-folder download-unchecked"></i>
</el-col>
<el-col :span="is_xs ? 20 : 22">
<i class="el-icon-document" style="font-size: 1.5rem;"></i>
{{ item.name }}{{ item.size }}
<div style="display: flex; justify-content: space-between; align-items: center;">
<div>
<i class="el-icon-document" style="font-size: 1.35rem;"></i>
{{ item.name }}
</div>
<div>
{{ item.size }}
</div>
</div>
</el-col>
</el-row>
<!-- <i v-if="item.checked" @click="checkItem(item)" class="el-icon-folder-checked download-checked"></i>
...
...
@@ -166,7 +173,7 @@ export default {
this.info_images = this.info.file.img.map(item => item.value);
}
//
this.product_advantages = this.split
ArrayInto
Chunks(this.info.product_advantages);
this.product_advantages = this.split
IntoEqual
Chunks(this.info.product_advantages);
//
this.product_sample = this.info.file?.yangben?.map(item => ({ ...item, checked: false }));// 产品样本
this.technical_parameter = this.info.file?.canshu?.map(item => ({ ...item, checked: false })); // 技术参数
...
...
@@ -224,6 +231,18 @@ export default {
return result;
},
splitIntoEqualChunks(list) {
const middle = Math.ceil(list.length / 2); // 计算数组的一半,向上取整
const result = [];
// 第一个子数组是从 0 到 middle 的部分
result[0] = list.slice(0, middle);
// 第二个子数组是从 middle 到末尾的部分
result[1] = list.slice(middle);
return result;
},
checkItem (item) {
item.checked = !item.checked;
// this.$forceUpdate();
...
...
Please
register
or
login
to post a comment