Skip to content

Commit

Permalink
Merge pull request #25 from TankNee/rebuild/develop
Browse files Browse the repository at this point in the history
202001002
  • Loading branch information
TankNee authored Oct 2, 2020
2 parents 683f312 + cf866c8 commit bd9ba5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
9 changes: 2 additions & 7 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,15 @@ body.body--dark {
font-weight: bold;
}
.bg-blur {
/*webkit-filter: blur(10px); !* Chrome, Opera *!*/
/*-moz-filter: blur(10px);*/
/*-ms-filter: blur(10px);*/
/*filter: blur(10px);*/
position: fixed;
top: 0;
bottom: 0;
right: 0;
z-index: 99;
background-color: #fafafa;
backdrop-filter: blur(10px);
opacity: 0.8;
backdrop-filter: blur(8px);
opacity: 0.9;
box-shadow: 0px 1px 16px 0px rgba(0, 0, 0, 0.31);
/*background: rgba(7, 7, 7, 0.6);*/
}
.tooltip {
font-size: 17px;
Expand Down
2 changes: 1 addition & 1 deletion src/store/server/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export default {
title: isCurrentCategory ? `${title.replace(/\.md/, '')}-${i18n.t('duplicate')}${title.indexOf('.md') !== -1 ? '.md' : ''}` : title,
owner: userId,
html,
type
type: category === 'Lite' ? 'lite/markdown' : type
}
})
if (isCurrentCategory || helper.isNullOrEmpty(currentCategory)) {
Expand Down
11 changes: 5 additions & 6 deletions src/utils/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,11 @@ function updateContentsList (editorRootElement) {
if (list.length) {
let target = list
for (let j = 1; j < rank; j++) {
if (target.length === 0) {
if (target.length === 0 || rank === target[0].rank) {
// target.push({
// key: `${i}-${j}`,
// label: `${i}-${j}`,
// children: [],
// open: true
// })
break
} else if (!target[target.length - 1].children) {
Expand All @@ -263,8 +262,8 @@ function updateContentsList (editorRootElement) {
key: `${i}-${rank}`,
label: editorRootElement.children[i].innerText.replace(/^#+\s/, ''),
element: editorRootElement.children[i],
open: true,
selectable: true
selectable: true,
rank: rank
})
} else {
// 处理第一个标题元素
Expand All @@ -274,12 +273,12 @@ function updateContentsList (editorRootElement) {
if (j === rank - 1) {
// 生成唯一key,整个编辑器中第i个元素的第j等级的标题
item.key = `${i}-${j}`
item.label = ' '.repeat(j) + editorRootElement.children[i].innerText.replace(
item.label = editorRootElement.children[i].innerText.replace(
/^#+\s/,
''
)
item.open = true
item.selectable = true
item.rank = rank
item.element = editorRootElement.children[i]
}
// else {
Expand Down

0 comments on commit bd9ba5f

Please sign in to comment.