sard-uniapp 1.29.3 → 1.29.4

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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ ## <small>1.29.4 (2026-04-27)</small>
3
+
4
+ * Bug Fixes: 修复动态加载数据时不生成nav的问题 ([d1cdaf1](https://github.com/sutras/sard-uniapp/commit/d1cdaf1))
5
+
2
6
  ## <small>1.29.3 (2026-04-13)</small>
3
7
 
4
8
  * Bug Fixes: 修复textarea-base导入问题 ([fa9e57f](https://github.com/sutras/sard-uniapp/commit/fa9e57f))
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "sard-uniapp",
3
3
  "name": "sard-uniapp",
4
4
  "displayName": "sard-uniapp",
5
- "version": "1.29.3",
5
+ "version": "1.29.4",
6
6
  "description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
7
7
  "main": "index.js",
8
8
  "author": "wuzhitao",
@@ -1,4 +1,4 @@
1
- import { computed, ref, shallowRef } from 'vue';
1
+ import { computed, nextTick, ref, shallowRef } from 'vue';
2
2
  import { useTimeout } from './useTimeout';
3
3
  import { isNullish, matchScrollVisible } from '../utils';
4
4
  export function useScrollSpy(options) {
@@ -10,14 +10,26 @@ export function useScrollSpy(options) {
10
10
  const anchorRectList = shallowRef([]);
11
11
  const anchorMap = new Map();
12
12
  let lockScroll = false;
13
+ let requestUpdate = false;
14
+ const queueUpdate = () => {
15
+ if (requestUpdate)
16
+ return;
17
+ requestUpdate = true;
18
+ nextTick(() => {
19
+ requestUpdate = false;
20
+ update();
21
+ });
22
+ };
13
23
  const { start: unLockScrollLater } = useTimeout(() => {
14
24
  lockScroll = false;
15
25
  }, 150);
16
26
  const register = (name, getRect) => {
17
27
  anchorMap.set(name, getRect);
28
+ queueUpdate();
18
29
  };
19
30
  const unregister = (name) => {
20
31
  anchorMap.delete(name);
32
+ queueUpdate();
21
33
  };
22
34
  const calcPosition = (offset) => {
23
35
  matchScrollVisible(anchorRectList.value.map((item) => item[1]), (index) => {