Commit 2b749d9588a9c4af1d6e8f214fa1888ee8a50f42

Authored by zhigang.li
1 parent 754eedf5

commit

examples/routers/anchor.vue
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 <AnchorLink v-if="(link - 1) % 30 === 0" v-for="link in 300" :key="`link${link}`" :href="`#title-${link}`" :title="`title-${link}`"> 7 <AnchorLink v-if="(link - 1) % 30 === 0" v-for="link in 300" :key="`link${link}`" :href="`#title-${link}`" :title="`title-${link}`">
8 <AnchorLink v-if="link === 61" href="#title-child-69" title="title-child-69"/> 8 <AnchorLink v-if="link === 61" href="#title-child-69" title="title-child-69"/>
9 </AnchorLink> 9 </AnchorLink>
  10 + <AnchorLink href="#lishi" title="李氏专跳"/>
10 <AnchorLink v-if="showNewLink" href="#new-link" title="这是动态添加的连接"/> 11 <AnchorLink v-if="showNewLink" href="#new-link" title="这是动态添加的连接"/>
11 </Anchor> 12 </Anchor>
12 </div> 13 </div>
@@ -32,6 +33,8 @@ @@ -32,6 +33,8 @@
32 </Panel> 33 </Panel>
33 </Collapse> 34 </Collapse>
34 </template> 35 </template>
  36 + <h1 id="lishi">李氏专跳</h1>
  37 + <p v-for="i in 100" :key="`chinese-${i}`">这是信息司大是大非胜多负少的{{i}}</p>
35 <!-- <h1 id="new-link">这是新添加的哦哦哦哦哦 哦 </h1> 38 <!-- <h1 id="new-link">这是新添加的哦哦哦哦哦 哦 </h1>
36 <p v-for="i in 50" :key="`new-${i}`">这是信息司大是大非胜多负少的{{i}}</p> --> 39 <p v-for="i in 50" :key="`new-${i}`">这是信息司大是大非胜多负少的{{i}}</p> -->
37 </div> 40 </div>
@@ -58,6 +61,8 @@ @@ -58,6 +61,8 @@
58 </template> 61 </template>
59 <h1 id="new-link">这是新添加的哦哦哦哦哦 哦 </h1> 62 <h1 id="new-link">这是新添加的哦哦哦哦哦 哦 </h1>
60 <p v-for="i in 50" :key="`new-${i}`">这是信息司大是大非胜多负少的{{i}}</p> 63 <p v-for="i in 50" :key="`new-${i}`">这是信息司大是大非胜多负少的{{i}}</p>
  64 + <h1 id="lishi">李氏专跳</h1>
  65 + <p v-for="i in 50" :key="`chinese-${i}`">这是信息司大是大非胜多负少的{{i}}</p>
61 </div> 66 </div>
62 67
63 </div> 68 </div>
src/components/anchor/anchor-link.vue
1 <template> 1 <template>
2 <div :class="anchorLinkClasses"> 2 <div :class="anchorLinkClasses">
3 - <a :class="linkTitleClasses" href="javascript:void(0)" :data-href="href" @click="goAnchor" :title="title">{{ title }}</a> 3 + <a :class="linkTitleClasses" :href="href" :data-href="href" @click.prevent="goAnchor" :title="title">{{ title }}</a>
4 <slot></slot> 4 <slot></slot>
5 </div> 5 </div>
6 </template> 6 </template>
src/styles/components/index.less
@@ -45,4 +45,3 @@ @@ -45,4 +45,3 @@
45 @import "color-picker"; 45 @import "color-picker";
46 @import "auto-complete"; 46 @import "auto-complete";
47 @import "anchor"; 47 @import "anchor";
48 -@import "time";