H5端岗位列表改为两列
This commit is contained in:
@@ -32,25 +32,21 @@ export function useColumnCount(onChange = () => {}) {
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
let count = 2
|
let count = 2
|
||||||
|
// #ifdef H5
|
||||||
|
// H5端固定显示2列
|
||||||
|
count = 2
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
if (width >= 1000) {
|
if (width >= 1000) {
|
||||||
// #ifdef H5
|
|
||||||
count = 3 // H5端最多显示3列
|
|
||||||
// #endif
|
|
||||||
// #ifndef H5
|
|
||||||
count = 5
|
count = 5
|
||||||
// #endif
|
|
||||||
} else if (width >= 750) {
|
} else if (width >= 750) {
|
||||||
// #ifdef H5
|
|
||||||
count = 3 // H5端最多显示3列
|
|
||||||
// #endif
|
|
||||||
// #ifndef H5
|
|
||||||
count = 4
|
count = 4
|
||||||
// #endif
|
|
||||||
} else if (width >= 500) {
|
} else if (width >= 500) {
|
||||||
count = 3
|
count = 3
|
||||||
} else {
|
} else {
|
||||||
count = 2
|
count = 2
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
if (count !== columnCount.value) {
|
if (count !== columnCount.value) {
|
||||||
columnCount.value = count
|
columnCount.value = count
|
||||||
|
|||||||
Reference in New Issue
Block a user