@jx3box/jx3box-editor 1.8.4 → 1.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,7 +51,7 @@ function directory(from, to = '#directory') {
51
51
  // 进行克隆
52
52
  let _item = $(item).clone();
53
53
  // 解决懒加载跳转位置问题
54
- $(item).prepend(`<a id="directory-${i}" class="el-icon-link w-directory-anchor"></a>`);
54
+ $(item).prepend(`<a id="directory-${i}" class="w-directory-anchor"></a>`);
55
55
 
56
56
  // 过滤行内样式
57
57
  _item.removeAttr("style");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Article.vue CHANGED
@@ -196,6 +196,13 @@ export default {
196
196
  let dir = renderDirectory(target, this.directorybox);
197
197
  this.$emit("directoryRendered", dir);
198
198
 
199
+ if(window.location.hash?.includes('directory')){
200
+ let id = window.location.hash
201
+ let target = $(`${id}`).offset().top;
202
+ console.log(target)
203
+ $(document).scrollTop(target - HEADER_HEIGHT);
204
+ }
205
+
199
206
  $(".w-directory-anchor").on("click", function () {
200
207
  e.preventDefault();
201
208
  let id = $(this).attr("id");