Skip to content

Commit a861b16

Browse files
author
Jeff
committed
just redirect on option click
1 parent df0cc83 commit a861b16

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

docs/homepage/home.html

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,14 @@ <h1>Vue Select</h1>
5959
to Select2/Chosen without the overhead of jQuery.
6060
</p>
6161

62-
<v-select id="v-select" :options="options" v-model="selected" label="title">
62+
<v-select id="v-select" :options="options" @input="redirect" label="title">
6363
<template slot="option" slot-scope="option">
6464
<span class="octicon" :class="option.icon"></span>
6565
{{ option.title }}
6666
</template>
6767
</v-select>
6868

69-
<div v-cloak v-if="!! selected" class="dropdown-action">
70-
<a class="btn btn-primary btn-outline btn-lg" :href="selected.url">
71-
<span class="octicon" :class="selected.icon"></span>
72-
{{ selected.title }}
73-
</a>
74-
</div>
75-
76-
<section class="content" :class="{ hidden: selected }">
77-
69+
<section class="content">
7870
<div class="feature-list">
7971
<ul class="list-vue">
8072
<li>Supports Vuex</li>
@@ -108,7 +100,6 @@ <h1>Vue Select</h1>
108100
</a>
109101
</div>
110102
</section>
111-
112103
</div>
113104
<script>
114105
(function (i, s, o, g, r, a, m) {

docs/homepage/home.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,10 @@ new Vue({
4040
},
4141
]
4242
}
43+
},
44+
methods: {
45+
redirect(option) {
46+
window.location = option.url;
47+
}
4348
}
4449
});

0 commit comments

Comments
 (0)