From 656e9501d6c3db1e4b34dcf5c0321c5cc7c0f70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 31 Aug 2021 11:32:47 +0300 Subject: [PATCH 01/11] refactor --- api-generator/components/image.js | 2 +- api-generator/components/virtualscroller.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api-generator/components/image.js b/api-generator/components/image.js index 80c588b4e..b7643278f 100644 --- a/api-generator/components/image.js +++ b/api-generator/components/image.js @@ -22,7 +22,7 @@ const ImageSlots = [ { name: "indicator", description: "Custom content for the preview indicator" - }- + } ]; module.exports = { diff --git a/api-generator/components/virtualscroller.js b/api-generator/components/virtualscroller.js index e454f8b89..75afb734e 100644 --- a/api-generator/components/virtualscroller.js +++ b/api-generator/components/virtualscroller.js @@ -110,7 +110,7 @@ const VirtualScrollerSlots = [ { name: "content", description: "Custom content for the component" - } + }, { name: "loader", description: "Custom content for the loader items" From 2495d6099adf753fb1e2b06de99acbd70c7da4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 31 Aug 2021 12:16:23 +0300 Subject: [PATCH 02/11] Fixed #1488 - activeIndex for TabMenu --- api-generator/components/tabmenu.js | 26 ++++++++++++++++++++++ src/components/tabmenu/TabMenu.d.ts | 1 + src/components/tabmenu/TabMenu.vue | 34 ++++++++++++++++++++++++----- 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/api-generator/components/tabmenu.js b/api-generator/components/tabmenu.js index 8ac64f24a..de136a868 100644 --- a/api-generator/components/tabmenu.js +++ b/api-generator/components/tabmenu.js @@ -10,6 +10,31 @@ const TabMenuProps = [ type: "boolean", default: "true", description: "Defines if active route highlight should match the exact route path." + }, + { + name: "activeIndex", + type: "number", + default: "0", + description: "Active index of menuitem." + } +]; + +const TabMenuEvents = [ + { + name: "tab-change", + description: "Callback to invoke when an active tab is changed.", + arguments: [ + { + name: "event.originalEvent", + type: "object", + description: "Original event" + }, + { + name: "event.index", + type: "number", + description: "Index of the selected tab" + } + ] } ]; @@ -25,6 +50,7 @@ module.exports = { name: "TabMenu", description: "TabMenu is a navigation component that displays items as tab headers.", props: TabMenuProps, + events: TabMenuEvents, slots: TabMenuSlots } }; diff --git a/src/components/tabmenu/TabMenu.d.ts b/src/components/tabmenu/TabMenu.d.ts index 31942d9c7..a33d7aaa5 100755 --- a/src/components/tabmenu/TabMenu.d.ts +++ b/src/components/tabmenu/TabMenu.d.ts @@ -3,6 +3,7 @@ import { VNode } from 'vue'; interface TabMenuProps { model?: any[]; exact?: boolean; + activeIndex?: number; } declare class TabMenu { diff --git a/src/components/tabmenu/TabMenu.vue b/src/components/tabmenu/TabMenu.vue index 340ca35fa..fbc7c4f01 100755 --- a/src/components/tabmenu/TabMenu.vue +++ b/src/components/tabmenu/TabMenu.vue @@ -5,7 +5,7 @@
  • @@ -946,11 +952,11 @@ export default { } } } - + ` } } } } } - \ No newline at end of file + From fb256ed938ec9d621de405607d3c87b709fe95ea Mon Sep 17 00:00:00 2001 From: Burtchen Date: Tue, 31 Aug 2021 13:39:15 +0200 Subject: [PATCH 11/11] Update SeatDemo.vue (#1409) vagon => wagon --- src/views/steps/SeatDemo.vue | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/views/steps/SeatDemo.vue b/src/views/steps/SeatDemo.vue index 3d7573d7e..30e0cdb13 100755 --- a/src/views/steps/SeatDemo.vue +++ b/src/views/steps/SeatDemo.vue @@ -11,11 +11,11 @@
    - +
    - +
    @@ -43,24 +43,24 @@ export default { {name: 'Second Class', code: 'B', factor: 2}, {name: 'Third Class', code: 'C', factor: 3} ], - vagons: [], - selectedVagon: '', + wagons: [], + selectedWagon: '', seats: [], selectedSeat: '' } }, methods: { - setVagons(event) { + setWagons(event) { if (this.selectedClass && event.value) { - this.vagons = []; + this.wagons = []; this.seats = []; for (let i = 1; i < 3 * event.value.factor; i++) { - this.vagons.push({vagon: i + event.value.code, type: event.value.name, factor: event.value.factor}); + this.wagons.push({wagon: i + event.value.code, type: event.value.name, factor: event.value.factor}); } } }, setSeats(event) { - if (this.selectedVagon && event.value) { + if (this.selectedWagon && event.value) { this.seats = []; for (let i = 1; i < 10 * event.value.factor; i++) { this.seats.push({seat: i, type: event.value.type}); @@ -68,11 +68,11 @@ export default { } }, nextPage() { - this.$emit('next-page', {formData: {class: this.selectedClass.name, vagon: this.selectedVagon.vagon, seat: this.selectedSeat.seat}, pageIndex: 1}); + this.$emit('next-page', {formData: {class: this.selectedClass.name, wagon: this.selectedWagon.wagon, seat: this.selectedSeat.seat}, pageIndex: 1}); }, prevPage() { this.$emit('prev-page', {pageIndex: 1}); } } } - \ No newline at end of file +