代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="./js/vue.css">
<link rel="stylesheet" href="./js/numbers.css">
</head>
<body>
<div id="app"></div>
<script>
function addLineNumbersForCode(html) {
var text = html.replace(/<span[^>]*>|<\/span>/g, '');
if (/\r|\n$/.test(text)) {
html += '<span class="ln-eof"></span>';
}
var num = 1;
var html2 = '<span class="line-number"> 1</span>';;
html = html.replace(/\r\n|\r|\n/g, function (a) {
num++;
var numStr = (' ' + num).substr(-3);
html2 += '<br><span class="line-number" >' + numStr + '</span>';
return a + '<span class="ln-num" data-num="' + numStr + '"></span>';
});
html = '<span class="ln-num" data-num=" 1"></span>' + html;
html2 = '<span class="line-numbers-wrapper">' + html2 + '</span>';
return { html: html, html2: html2 };
}
window.$docsify = {
homepage: 'README.md',
loadSidebar: true,
name: '',
repo: '',
alias: {
'/.*/_sidebar.md': '/_sidebar.md'
},
subMaxLevel: 3,
copyCode: {
buttonText: '点击复制',
errorText: '复制错误',
successText: '复制成功'
},
search: {
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
paths: 'auto', // or 'auto'
placeholder: '搜索',
noData: '找不到结果',
// 搜索标题的最大程级, 1 - 6
depth: 3,
pagination: {
previousText: '上一章节',
nextText: '下一章节',
}
},
plugins: [
function (hook, vm) {
hook.doneEach(function () {
// 每次路由切换时数据全部加载完成后调用,没有参数。
// ...
var elements = document.querySelectorAll('pre code');
for (var i = 0; i < elements.length; i++) {
var html = elements[i].innerHTML;
html = addLineNumbersForCode(html);
elements[i].innerHTML = html.html;
elements[i].insertAdjacentHTML('beforebegin', html.html2);
}
});
}
]
}
</script>
<!-- Docsify v4 -->
<script src="./js/docsify.min.js"></script>
<script src="./js/docsify-copy-code.min.js"></script>
<script src="./js/docsify-pagination.min.js"></script>
<script src="./js/search.min.js"></script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。