feat(anchor): 修复检视意见,同步远程代码 (#55)

* feat(anchor): 锚点组件增加固定模式,修复示例文档bug问题

* feat(anchor): 修复affix检视意见
This commit is contained in:
chenxi-20 2023-03-13 10:48:38 +08:00 committed by GitHub
parent d7bade3a60
commit 05a23ed5f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,7 @@
<template>
<tiny-anchor :links="links" is-affix></tiny-anchor>
<div class="wrap">
<tiny-anchor :links="links" is-affix></tiny-anchor>
</div>
</template>
<script>
@ -43,3 +45,9 @@ export default {
}
}
</script>
<style scoped>
.wrap {
height: 125px;
}
</style>

View File

@ -12,7 +12,7 @@
</div>
</tiny-col>
<tiny-col :span="2">
<tiny-anchor :links="links" containerId="#container" @linkClick="handleClick" mark-class="is-active-anchor"></tiny-anchor>
<tiny-anchor :links="links" container-id="#container" @link-click="handleClick" mark-class="is-active-anchor"></tiny-anchor>
</tiny-col>
</tiny-row>
</template>
@ -68,9 +68,6 @@ export default {
</script>
<style scoped>
.divide {
height: 100px;
}
.is-active-anchor {
border: 1px solid red;
}

View File

@ -44,6 +44,7 @@ export default {
class={[`${anchorClass}-link-title`, currentLink === item.link && `${anchorClass}-link-title--active`]}
title={item.title}
onClick={(e) => linkClick(e, item)}
ref={item.link}
>
{item.title}
</a>