Commit 3fe51bfca22f3417a11ca34a951298ccb3b4080e
1 parent
c69f8ff5
update Anchor
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
examples/main.js
@@ -20,6 +20,7 @@ Vue.config.debug = true; | @@ -20,6 +20,7 @@ Vue.config.debug = true; | ||
20 | // 路由配置 | 20 | // 路由配置 |
21 | const router = new VueRouter({ | 21 | const router = new VueRouter({ |
22 | esModule: false, | 22 | esModule: false, |
23 | + mode: 'history', | ||
23 | routes: [ | 24 | routes: [ |
24 | { | 25 | { |
25 | path: '/split', | 26 | path: '/split', |
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> |