Skip to content

Commit

Permalink
fix: 后台滚动条样式不美观&编辑器页面不该出现的滚动条
Browse files Browse the repository at this point in the history
  • Loading branch information
Mereithhh committed Aug 31, 2022
1 parent 4f17152 commit a1d8530
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 42 deletions.
35 changes: 17 additions & 18 deletions packages/admin/src/global.less
Expand Up @@ -162,24 +162,7 @@ body .bytemd {
.ant-tooltip {
z-index: 10000;
}
// 217.5 (7) 179 48
/* 滚动槽 */
::-webkit-scrollbar {
width: 6px;
height: 6px;
// border-radius: 4px;
}
::-webkit-scrollbar-track {
border-radius: 2px;
background: rgba(0, 0, 0, 0.06);
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
border-radius: 2px;
background: #f5f5f5;
-webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

body .ant-page-header-heading-title {
overflow: auto;
text-overflow: unset;
Expand All @@ -197,3 +180,19 @@ body .ant-page-header-heading-title {
background-color: #f5f5f5;
}
}
/* 滚动槽 */
::-webkit-scrollbar {
width: 10px;
height: 6px;
// border-radius: 4px;
}
::-webkit-scrollbar-track {
border-radius: 2px;
background: rgba(0, 0, 0, 0.06);
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
border-radius: 2px;
background: #d7d7d7;

}
44 changes: 24 additions & 20 deletions packages/admin/src/pages/Editor/index.jsx
Expand Up @@ -289,26 +289,30 @@ export default function () {
}}
footer={null}
>
<Editor
loading={loading}
setLoading={setLoading}
value={value}
onChange={(val) => {
setValue(val);
window.localStorage.setItem(key, val);
}}
/>
<Upload
showUploadList={false}
multiple={false}
accept={'.md'}
beforeUpload={handleImport}
style={{ display: 'none' }}
>
<a key="importBtn" type="link" style={{ display: 'none' }} id="importBtn">
导入内容
</a>
</Upload>
<div style={{ height: '100%' }}>
<div style={{ height: '0' }}>
<Upload
showUploadList={false}
multiple={false}
accept={'.md'}
beforeUpload={handleImport}
style={{ display: 'none', height: 0 }}
>
<a key="importBtn" type="link" style={{ display: 'none' }} id="importBtn">
导入内容
</a>
</Upload>
</div>
<Editor
loading={loading}
setLoading={setLoading}
value={value}
onChange={(val) => {
setValue(val);
window.localStorage.setItem(key, val);
}}
/>
</div>
</PageContainer>
);
}
6 changes: 2 additions & 4 deletions packages/website/styles/scrollbar.css
Expand Up @@ -6,14 +6,12 @@
width: 10px;
}
.dark #toc-container::-webkit-scrollbar-thumb {
background: #898989;
background: #797979;
}
.dark ::-webkit-scrollbar-thumb {
background: #9f9f9f;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
/* border-radius: 4px; */
background: #ebebeb;
-webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
background: #dadada;
}

0 comments on commit a1d8530

Please sign in to comment.