mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
just redirect on option click
This commit is contained in:
+2
-11
@@ -59,22 +59,14 @@
|
|||||||
to Select2/Chosen without the overhead of jQuery.
|
to Select2/Chosen without the overhead of jQuery.
|
||||||
</p>
|
</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">
|
<template slot="option" slot-scope="option">
|
||||||
<span class="octicon" :class="option.icon"></span>
|
<span class="octicon" :class="option.icon"></span>
|
||||||
{{ option.title }}
|
{{ option.title }}
|
||||||
</template>
|
</template>
|
||||||
</v-select>
|
</v-select>
|
||||||
|
|
||||||
<div v-cloak v-if="!! selected" class="dropdown-action">
|
<section class="content">
|
||||||
<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 }">
|
|
||||||
|
|
||||||
<div class="feature-list">
|
<div class="feature-list">
|
||||||
<ul class="list-vue">
|
<ul class="list-vue">
|
||||||
<li>Supports Vuex</li>
|
<li>Supports Vuex</li>
|
||||||
@@ -108,7 +100,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
(function (i, s, o, g, r, a, m) {
|
(function (i, s, o, g, r, a, m) {
|
||||||
|
|||||||
@@ -40,5 +40,10 @@ new Vue({
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
redirect(option) {
|
||||||
|
window.location = option.url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user