-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Anchor): add customScroll API to support custom scroll behavior (#…
…4386) * feat(anchor-item): 新增API(disableScroll),支持禁用滚动控制 * feat(anchor-item): 新增api customScroll 支持用户使用自定义的锚点滚动效果 * feat(anchor): 新增demo自定义滚动效果 * chore: update common * chore: update snapshot * chore: fix lint --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Uyarn <[email protected]>
- Loading branch information
1 parent
982e8e9
commit f664d88
Showing
11 changed files
with
158 additions
and
2 deletions.
There are no files selected for viewing
Submodule _common
updated
12 files
+6 −0 | docs/web/api/anchor.en-US.md | |
+6 −0 | docs/web/api/anchor.md | |
+8 −8 | docs/web/api/chat-ai.md | |
+6 −0 | docs/web/api/tree.en-US.md | |
+6 −0 | docs/web/api/tree.md | |
+29 −3 | js/date-picker/utils.ts | |
+15 −6 | js/tree-v1/tree-node.ts | |
+14 −7 | js/tree/tree-node.ts | |
+1 −1 | package.json | |
+9 −1 | style/mobile/components/collapse/v2/_index.less | |
+22 −4 | style/web/components/chat/_index.less | |
+264 −18 | test/unit/tree/lazy.test.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<div :id="`${path}#custom-scroll`"> | ||
<t-anchor> | ||
<t-anchor-item href="#基础锚点" title="基础锚点" custom-scroll /> | ||
<t-anchor-item href="#多级锚点" title="多级锚点" custom-scroll /> | ||
<t-anchor-item href="#指定容器锚点" title="指定容器锚点" custom-scroll /> | ||
<t-anchor-item href="#特定交互锚点" title="特定交互锚点" custom-scroll /> | ||
<t-anchor-item href="#不同尺寸的锚点" title="不同尺寸的锚点" custom-scroll /> | ||
<t-anchor-item href="#自定义滚动效果" title="自定义滚动效果" custom-scroll /> | ||
</t-anchor> | ||
</div> | ||
</template> | ||
<script lang="tsx" setup> | ||
import { computed, getCurrentInstance } from 'vue'; | ||
import get from 'lodash/get'; | ||
const { appContext } = getCurrentInstance() || {}; | ||
const path = computed(() => get(appContext, '$route.path', '')); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<div :id="`${path}#custom-scroll`"> | ||
<t-anchor> | ||
<t-anchor-item href="#基础锚点" title="基础锚点" custom-scroll /> | ||
<t-anchor-item href="#多级锚点" title="多级锚点" custom-scroll /> | ||
<t-anchor-item href="#指定容器锚点" title="指定容器锚点" custom-scroll /> | ||
<t-anchor-item href="#特定交互锚点" title="特定交互锚点" custom-scroll /> | ||
<t-anchor-item href="#不同尺寸的锚点" title="不同尺寸的锚点" custom-scroll /> | ||
<t-anchor-item href="#自定义滚动效果" title="自定义滚动效果" custom-scroll /> | ||
</t-anchor> | ||
</div> | ||
</template> | ||
<script setup> | ||
import { computed, getCurrentInstance } from 'vue'; | ||
import get from 'lodash/get'; | ||
const { appContext } = getCurrentInstance() || {}; | ||
const path = computed(() => get(appContext, '$route.path', '')); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters