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-05 10:28:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
34faeffcd24cd30927f7649091652cf7ec4edeab
34faeffc
1 parent
9559b993
移动端产品优势只有一条数据时,显示优化
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/views/product/detail.vue
src/views/product/detail.vue
View file @
34faeff
<!--
* @Date: 2024-09-29 14:26:41
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-05 10:
15:08
* @LastEditTime: 2024-11-05 10:
27:39
* @FilePath: /hager/src/views/product/detail.vue
* @Description: 文件描述
-->
...
...
@@ -362,6 +362,9 @@ export default {
return result;
},
splitIntoEqualChunks(list) {
if (this.is_xs && list.length === 1) { // 移动端只有一个元素,直接返回一个包含该元素的数组
return [list]
}
const middle = Math.ceil(list.length / 2); // 计算数组的一半,向上取整
const result = [];
...
...
Please
register
or
login
to post a comment