修改showInkInFixed为showInk,如果设为true则永远显示小圆点
This commit is contained in:
parent
145be7a6ad
commit
cf9a399e7e
2 changed files with 3 additions and 6 deletions
|
@ -3,7 +3,7 @@
|
|||
<div class="link-wrapper">
|
||||
<Button @click="changeCon">修改为Window</Button>
|
||||
<Button @click="andLink">添加一个连接</Button>
|
||||
<Anchor :bounds="100" @on-change="handleChange" @on-select="handleSelect" :style="{right: '100px'}" :affix="true" :offset-top="30" :scroll-offset="100" :container="scrollCon" show-ink-in-fixed>
|
||||
<Anchor :bounds="100" @on-change="handleChange" @on-select="handleSelect" :style="{right: '100px'}" :affix="true" :offset-top="30" :scroll-offset="100" :container="scrollCon" show-ink>
|
||||
<AnchorLink v-if="(link - 1) % 30 === 0" v-for="link in 300" :key="`link${link}`" :href="`#title-${link}`" :title="`title-${link}`">
|
||||
<AnchorLink :scroll-offset="20" v-if="link === 61" href="#title-child-69" title="title-child-69"/>
|
||||
</AnchorLink>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div :class="`${prefix}-wrapper`" :style="wrapperStyle">
|
||||
<div :class="`${prefix}`">
|
||||
<div :class="`${prefix}-ink`">
|
||||
<span v-show="showInkBall" :class="`${prefix}-ink-ball`" :style="{top: `${inkTop}px`}"></span>
|
||||
<span v-show="showInk" :class="`${prefix}-ink-ball`" :style="{top: `${inkTop}px`}"></span>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
@ -50,7 +50,7 @@ export default {
|
|||
default: 5
|
||||
},
|
||||
container: [String, HTMLElement],
|
||||
showInkInFixed: {
|
||||
showInk: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
@ -70,9 +70,6 @@ export default {
|
|||
},
|
||||
containerIsWindow () {
|
||||
return this.scrollContainer === window;
|
||||
},
|
||||
showInkBall () {
|
||||
return this.showInkInFixed && (this.isAffixed || (!this.isAffixed && !this.upperFirstTitle && this.scrollContainer !== window));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Add table
Reference in a new issue