Update main.js

This commit is contained in:
恍兮惚兮 2024-07-19 14:11:16 +08:00
parent 98fe465e95
commit d8e9a8915c

View File

@ -56,8 +56,7 @@ window.$docsify = {
document.addEventListener('mousemove', function (e) {
if (startX) {
var newWidth = startWidth + (e.clientX - startX);
document.documentElement.style.setProperty('--sidebar-width', sidebar.style.width);
sidebar.style.width = Math.max(200, newWidth) + 'px';
document.documentElement.style.setProperty('--sidebar-width', Math.min(1000, Math.max(100, newWidth)) + 'px');
}
});