mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-20 02:37:59 +08:00
feat:1、实现文档自动保存
2、实现记住上次打开的文档,当文档编辑时会自动定位到上次打开的文档。
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
var events = function () {
|
||||
var articleOpen = function (event, $param) {
|
||||
|
||||
//当打开文档时,将文档ID加入到本地缓存。
|
||||
window.localStorage && window.localStorage.setItem("MinDoc::LastLoadDocument:" + window.book.identify, $param.$id);
|
||||
var prevState = window.history.state || {};
|
||||
if ('pushState' in history) {
|
||||
|
||||
|
Reference in New Issue
Block a user