2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

just redirect on option click

This commit is contained in:
Jeff
2018-01-22 19:17:38 -08:00
parent df0cc83e05
commit a861b16553
2 changed files with 7 additions and 11 deletions
+2 -11
View File
@@ -59,22 +59,14 @@
to Select2/Chosen without the overhead of jQuery.
</p>
<v-select id="v-select" :options="options" v-model="selected" label="title">
<v-select id="v-select" :options="options" @input="redirect" label="title">
<template slot="option" slot-scope="option">
<span class="octicon" :class="option.icon"></span>
{{ option.title }}
</template>
</v-select>
<div v-cloak v-if="!! selected" class="dropdown-action">
<a class="btn btn-primary btn-outline btn-lg" :href="selected.url">
<span class="octicon" :class="selected.icon"></span>
{{ selected.title }}
</a>
</div>
<section class="content" :class="{ hidden: selected }">
<section class="content">
<div class="feature-list">
<ul class="list-vue">
<li>Supports Vuex</li>
@@ -108,7 +100,6 @@
</a>
</div>
</section>
</div>
<script>
(function (i, s, o, g, r, a, m) {
+5
View File
@@ -40,5 +40,10 @@ new Vue({
},
]
}
},
methods: {
redirect(option) {
window.location = option.url;
}
}
});