File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 </div >
2121
2222 <!-- 内容区域 -->
23- <div class =" flex-1 overflow-hidden relative min-h-screen " >
23+ <div class =" flex-1 overflow-auto relative" >
2424 <!-- 加载状态 -->
2525 <div v-if =" isRunning && !webContent" class =" absolute inset-0 flex items-center justify-center bg-gray-50" >
2626 <div class =" text-center" >
@@ -127,7 +127,37 @@ const processWebContent = async (content: string) => {
127127const onFrameLoad = () => {
128128 if (webFrame .value ?.contentDocument ) {
129129 const style = webFrame .value .contentDocument .createElement (' style' )
130- style .textContent = ` body { margin: 0 !important; } `
130+ style .textContent = `
131+ body {
132+ margin: 0 !important;
133+ }
134+
135+ /* Webkit 滚动条美化 */
136+ ::-webkit-scrollbar {
137+ width: 8px;
138+ height: 8px;
139+ }
140+
141+ ::-webkit-scrollbar-track {
142+ background: #f1f1f1;
143+ border-radius: 4px;
144+ }
145+
146+ ::-webkit-scrollbar-thumb {
147+ background: #888;
148+ border-radius: 4px;
149+ }
150+
151+ ::-webkit-scrollbar-thumb:hover {
152+ background: #555;
153+ }
154+
155+ /* Firefox 滚动条美化 */
156+ * {
157+ scrollbar-width: thin;
158+ scrollbar-color: #888 #f1f1f1;
159+ }
160+ `
131161 webFrame .value .contentDocument .head .appendChild (style )
132162 }
133163}
You can’t perform that action at this time.
0 commit comments