1
0
mirror of https://gitee.com/coder-xiaomo/algorithm-visualization synced 2025-01-10 11:48:18 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

添加最后更新时间;html不允许浏览器缓存页面

This commit is contained in:
程序员小墨 2022-06-19 19:11:58 +08:00
parent 1366216a6f
commit b65be3051b
3 changed files with 16 additions and 3 deletions

View File

@ -103,6 +103,14 @@ class ArrayVi extends ViBase {
}
DOMFragment.appendChild(ctrlBtn)
// 页面最后更新时间
var lastModifiedTime = (new Date(document.lastModified).getTime() / 1000).toFixed(0)
let lastModifiedDiv = document.createElement("div")
lastModifiedDiv.style.fontSize = "x-small"
lastModifiedDiv.style.opacity = ".5"
lastModifiedDiv.innerHTML = "页面版本戳: " + lastModifiedTime
DOMFragment.appendChild(lastModifiedDiv)
controlDiv.appendChild(DOMFragment)
// 生成一个随机数组

View File

@ -1,4 +1,3 @@
// 全局变量
var settings = {
container: d3.select("#container"),
@ -171,5 +170,3 @@ function displayCurrentArray(array) {
// })
// shape.addNode("ele7", 300, 200, "20px", "20px", "文本")

View File

@ -9,6 +9,14 @@
<meta name="description" content="小墨AlGO可视化算法让算法更简单">
<!-- 不允许浏览器缓存此页面,便于后期页面升级 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<!-- 如果使用webpack请注释掉下面两行通过 webpack 引入 -->
<link rel="stylesheet" href="./assets/css/index.css">
</head>