默认的视图可以更改为网格视图吗
#1781
-
|
我想拿openlist当类似图床的作用,同时想展示给别人看,但是默认是列表视图,有些人可能不会切换视图为网格视图或者图片视图,能设置默认视图为网格视图吗 |
Beta Was this translation helpful? Give feedback.
Answered by
swysgh
Dec 11, 2025
Replies: 3 comments 3 replies
-
|
可以自己改代码 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
<script>
(function() {
try {
// 无论之前是什么,强制覆盖为图片视图
localStorage.setItem('global_default_layout', 'grid');
} catch (e) {
console.error('强制设置视图失败:', e);
}
})();
</script>
在全局里添加自定义头部就行,感谢群友帮助 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
swysgh
-
|
@swysgh <script>
(function () {
try {
localStorage.setItem('global_default_layout', 'grid');
} catch (e) {
console.error('强制设置视图失败:', e);
}
})();
</script>另:将 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在全局里添加自定义头部就行,感谢群友帮助