limingtao 11 months ago
parent 1292ff7e18
commit cd9e99ecb3
  1. 3
      components/mp-html/parser.js
  2. 42
      components/zeroMarkdownView/zeroMarkdownView.vue

@ -979,7 +979,8 @@ Parser.prototype.popNode = function () {
const table = Object.assign({}, node)
node.name = 'div'
node.attrs = {
style: 'overflow:auto'
style: 'overflow:auto',
class: 'scrollbar-container'
}
node.children = [table]
attrs = table.attrs

@ -110,11 +110,15 @@
//
ul: `
margin: 10px 0;
color: #555;
font-size: 15px;
line-height:1.75;
word-spacing:0.1em;
`,
li: `
margin: 5px 0;
color: #555;
font-size: 15px;
line-height:1.75;
word-spacing:0.1em;
`,
//
a: `
@ -149,12 +153,12 @@
`,
th: `
border: 1px solid #202121;
color: #555;
// color: #555;
font-size: 14px;
font-weight: 500;
`,
td: `
color:#555;
// color:#555;
border: 1px solid #555555;
font-size: 14px;
`,
@ -177,4 +181,34 @@
padding: 15rpx;
position: relative;
}
// /deep/ .scrollbar-container{
// display: none;
// }
/* 设置滚动条的宽度和背景色 */
/deep/ .scrollbar-container::-webkit-scrollbar {
width: 3px!important; /* 滚动条宽度 */
height: 3px!important; /* 对于垂直滚动条,设置高度 */
background-color: #f9f9f9!important; /* 滚动条背景色 */
}
/* 设置滚动条滑块的样式 */
/deep/ .scrollbar-container::-webkit-scrollbar-thumb {
border-radius: 10px; /* 滑块圆角 */
background-color: #c1c1c1; /* 滑块颜色 */
}
/* 设置滚动条滑块hover样式 */
/deep/ .scrollbar-container::-webkit-scrollbar-thumb:hover {
background-color: #a8a8a8; /* 滑块hover颜色 */
}
/* 设置滚动条轨道的样式 */
/deep/ .scrollbar-container::-webkit-scrollbar-track {
border-radius: 10px; /* 轨道圆角 */
box-shadow: inset 0 0 5px grey; /* 轨道阴影 */
background-color: #f0f0f0; /* 轨道颜色 */
}
/deep/ .md-table {
margin-bottom: 10rpx!important;
}
</style>
Loading…
Cancel
Save