PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.1
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.1
3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 2.8.17 2.8.18 All 259 releases
wpfunnels / admin / modules / template-library / Components / StepCategorySelect.vue

StepCategorySelect.vue in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.1, at admin/modules/template-library/Components/StepCategorySelect.vue

50 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <div class="category-filter-wrapper">
3 <select name="category" id="wpfn-step-category" class="wpfnl-create-funnel__filter-nav" @change="doCatFilter">
4 <option value="">All</option>
5 <option v-for="(data, index) in categories"
6 :value="data.slug"
7 :key="index"
8 >{{ data.name }}</option>
9 </select>
10 <div class="category-select-dropdown"></div>
11 </div>
12 </template>
13
14 <script>
15 var j = jQuery.noConflict()
16 export default {
17 name: 'StepCategorySelect',
18 props: {
19 categories: Array,
20 activeCategory: String
21 },
22 mounted: function() {
23 var vm = this;
24 j(this.$el.getElementsByTagName('select'))
25 .select2({
26 data: this.categories,
27 //dropdownParent: j('.category-select-dropdown')
28 })
29 .val(this.value)
30 .trigger("change")
31 .on("change", function() {
32 vm.$emit("doCatFilter", this.value);
33 vm.$emit("doStepCatFilter", this.value);
34 });
35 },
36 data: function () {
37 return {
38 activeClass: '',
39 activeCat: 'all'
40 }
41 },
42 methods: {
43 doCatFilter: function (e) {
44 this.$emit('doCatFilter', e)
45 }
46 }
47
48 }
49 </script>
50