文档界面新增导航目录

This commit is contained in:
fofolee 2020-06-06 20:38:46 +08:00
parent 2a9e7c548f
commit fb509cb39a
5 changed files with 24 additions and 14 deletions

View File

@ -104,7 +104,10 @@ showManual = path => {
$('#manualNavi').autoMenu();
if ($('h1,h2,h3').length < 10 && $('#manual ul').is(":visible")) {
$('.btn-box span').removeClass('icon-minus-sign').addClass('icon-plus-sign')
// $('#manualBody').removeClass('withNaviBar')
$('#manual ul').hide()
// } else {
// $('#manualBody').addClass('withNaviBar')
}
manualSubInput();
});
@ -242,7 +245,7 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
} else {
manualSubInput();
}
if (type == 'over') {
if (type == 'regex') {
utools.setSubInputValue(payload)
// showList(payload, index, 300)
} else {

View File

@ -49,7 +49,7 @@ showOptions = async () => {
if (c.code == features.code) {
isChecked1 = 'checked';
isDisabled2 = '';
if (c.cmds[c.cmds.length - 1].type == 'over') isChecked2 = 'checked';
if (c.cmds[c.cmds.length - 1].type == 'regex') isChecked2 = 'checked';
break;
}
}
@ -140,7 +140,7 @@ $("#options").on('change', 'input[type=checkbox]', async function () {
if($(this).prop('checked')){
featureConf.cmds.push({
"type": "regex",
"match":"/[a-zA-Z\\.\\_]{2,20}/i",
"match":"/^[a-zA-Z._]{2,20}$/i",
"label": featureConf.cmds[0]
});
}

View File

@ -107,17 +107,19 @@
var _this = this;
$('#manual').scroll(function() {
_this.setActive()
var actived = $('#manual .active')
if(actived) actived.get(0).scrollIntoView({ behavior: "smooth", block: "center" });
var actived = $('#manual .active').get(0)
if(actived) actived.scrollIntoView({ behavior: "smooth", block: "center" });
});
_this.$element.off()
_this.$element.on('click', '.btn-box', function() {
if ($(this).find('span').hasClass('icon-minus-sign')) {
$(this).find('span').removeClass('icon-minus-sign').addClass('icon-plus-sign');
_this.$element.find('ul').fadeOut();
// $('#manualBody').removeClass('withNaviBar')
} else {
$(this).find('span').removeClass('icon-plus-sign').addClass('icon-minus-sign');
_this.$element.find('ul').fadeIn();
// $('#manualBody').addClass('withNaviBar')
}
})
@ -159,8 +161,8 @@
levelOne: 'h1', //一级标题
levelTwo: 'h2', //二级标题(暂不支持更多级)
levelThree: 'h3', //二级标题(暂不支持更多级)
width: 200, //容器宽度
height: 400, //容器高度
width: 220, //容器宽度
height: 480, //容器高度
padding: 20, //内部间距
offTop: 100, //滚动切换导航时离顶部的距离

View File

@ -50,8 +50,8 @@ a:focus {
#manualNavi {
position: fixed;
bottom: 10%;
right: 5%;
bottom: 0;
right: 15px;
z-index: 1;
text-align: left;
}
@ -102,8 +102,8 @@ a:focus {
border: 4px solid #91ba61;
background: #91ba61;
position: absolute;
top: -415px;
left: 245px;
/* top: 0px; */
left: 235px;
}
.icon-plus-sign:before,
@ -131,8 +131,8 @@ a:focus {
border: 4px solid #ff5370;
background: #ff5370;
position: absolute;
top: -415px;
left: 245px;
/* top: 0px; */
left: 235px;
}
.icon-minus-sign:before {

View File

@ -974,3 +974,8 @@ pre code {
#manual .pl-12 {
padding-left: 128px !important;
}
/* #manual .withNaviBar {
padding-right: 250px;
transition: 0.2s;
} */