mirror of
https://github.com/tenrok/vue-form-wizard.git
synced 2026-06-21 07:10:33 +03:00
Merge pull request #316 from emielbeinema/lazy-load-tab
Add lazy-load property to `TabContent`
This commit is contained in:
@@ -141,6 +141,13 @@ props: {
|
|||||||
type: String,
|
type: String,
|
||||||
default: ''
|
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
|
* Function to execute before tab switch. Return value must be boolean
|
||||||
* If the return result is false, tab switch is restricted
|
* If the return result is false, tab switch is restricted
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="active" class="wizard-tab-container"
|
<div v-show="active" v-if="!lazy || active" class="wizard-tab-container"
|
||||||
role="tabpanel"
|
role="tabpanel"
|
||||||
:id="tabId"
|
:id="tabId"
|
||||||
:aria-hidden="!active"
|
:aria-hidden="!active"
|
||||||
@@ -23,6 +23,13 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: ''
|
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
|
* Function to execute before tab switch. Return value must be boolean
|
||||||
* If the return result is false, tab switch is restricted
|
* If the return result is false, tab switch is restricted
|
||||||
|
|||||||
Reference in New Issue
Block a user