Browse Source

refactor hrefs

dependabot/npm_and_yarn/webpack-bundle-analyzer-3.6.0
Alexey Velikiy 8 years ago
parent
commit
4afe8beebd
  1. 4
      src/components/demos-navigation.vue
  2. 2
      src/components/index.vue
  3. 1
      src/router/demos.js

4
src/components/demos-navigation.vue

@ -1,9 +1,9 @@
<template> <template>
<div id="holder"> <div id="holder">
<div class="links"> <div class="links">
<a v-if="prev" :href="prev.href" class="prev"> < prev </a> <router-link v-if="prev" :to="prev.path" class="prev"> < prev </router-link>
<a :href="sourceHref" class="source"> source </a> <a :href="sourceHref" class="source"> source </a>
<a v-if="next" :href="next.href" class="next"> next > </a> <router-link v-if="next" :to="next.path" class="next"> next > </router-link>
</div> </div>
</div> </div>
</template> </template>

2
src/components/index.vue

@ -2,7 +2,7 @@
<div class="hello"> <div class="hello">
<ul> <ul>
<li v-for="item in items"> <li v-for="item in items">
<a :href="item.href">{{ item.name }}</a> <router-link :to="item.path">{{ item.name }}</router-link>
</li> </li>
</ul> </ul>
</div> </div>

1
src/router/demos.js

@ -29,7 +29,6 @@ export const routes = [
} }
].map(r => { ].map(r => {
var res = r; var res = r;
res.href = "#" + r.path;
res.source = config.githubLink + res.source = config.githubLink +
config.d3ComponentsPath + config.d3ComponentsPath +
r.path + r.path +

Loading…
Cancel
Save