File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed
Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change 177177 // 处理所有a标签的href属性
178178 const links = tempDiv .querySelectorAll (' a' );
179179 links .forEach ((link ) => {
180- // 添加蓝色链接样式
181- link .style .color = ' #3b82f6' ;
182- link .style .textDecoration = ' underline' ;
183- link .style .textDecorationColor = ' #3b82f6' ;
184- link .style .textDecorationThickness = ' 1px' ;
185- link .style .textUnderlineOffset = ' 2px' ;
186-
187- // 添加hover效果
188- link .style .cursor = ' pointer' ;
180+ // 添加类名
181+ link .className = ' execution-detail-link' ;
189182
190183 const href = link .getAttribute (' href' );
191184 if (
232225 return convertRelativeUrls (item .value , baseUrl );
233226 };
234227 </script >
228+
229+ <style scoped>
230+ /* 链接基础样式 */
231+ :deep(.execution-detail-link ) {
232+ color : #3b82f6 !important ;
233+ text-decoration : underline !important ;
234+ text-decoration-color : #3b82f6 !important ;
235+ text-decoration-thickness : 1px !important ;
236+ text-underline-offset : 2px !important ;
237+ cursor : pointer !important ;
238+ }
239+
240+ /* 已访问链接的样式 */
241+ :deep(.execution-detail-link :visited ) {
242+ color : #8b5cf6 !important ;
243+ text-decoration-color : #8b5cf6 !important ;
244+ }
245+
246+ /* 链接hover效果 */
247+ :deep(.execution-detail-link :hover ) {
248+ color : #2563eb !important ;
249+ text-decoration-color : #2563eb !important ;
250+ }
251+ </style >
You can’t perform that action at this time.
0 commit comments