forked from opentiny/tiny-vue
feat(anchor): 修复检视意见,同步远程代码 (#55)
* feat(anchor): 锚点组件增加固定模式,修复示例文档bug问题 * feat(anchor): 修复affix检视意见
This commit is contained in:
parent
d7bade3a60
commit
05a23ed5f6
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue