2
0
mirror of https://github.com/tenrok/vue-form-wizard.git synced 2026-05-17 03:09:36 +03:00

Merge pull request #316 from emielbeinema/lazy-load-tab

Add lazy-load property to `TabContent`
This commit is contained in:
BRafols
2020-09-22 09:19:24 +02:00
committed by GitHub
2 changed files with 15 additions and 1 deletions
+7
View File
@@ -141,6 +141,13 @@ props: {
type: String,
default: ''
},
/***
* Only render the content when the tab is active
*/
lazy: {
type: Boolean,
default: false
},
/***
* Function to execute before tab switch. Return value must be boolean
* If the return result is false, tab switch is restricted
+8 -1
View File
@@ -1,5 +1,5 @@
<template>
<div v-show="active" class="wizard-tab-container"
<div v-show="active" v-if="!lazy || active" class="wizard-tab-container"
role="tabpanel"
:id="tabId"
:aria-hidden="!active"
@@ -23,6 +23,13 @@
type: String,
default: ''
},
/***
* Only render the content when the tab is active
*/
lazy: {
type: Boolean,
default: false
},
/***
* Function to execute before tab switch. Return value must be boolean
* If the return result is false, tab switch is restricted