You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1004 B
39 lines
1004 B
<example-loading>
|
|
<div class="example m-top-5">
|
|
<label class="field-label">
|
|
<input class="field-choice" type="checkbox" name="radio" value="true" onchange={ () => { handleSwitch() } }>
|
|
<span class="field-switch"></span>
|
|
</label>
|
|
<div class="panel" if={ state.active }>
|
|
<div class="panel__body">
|
|
<tiny-loading active={ state.active }></tiny-loading>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
|
|
export default {
|
|
|
|
state: {
|
|
active: false
|
|
},
|
|
|
|
/**
|
|
* toggle active to show panel and tiny-loading
|
|
*
|
|
*/
|
|
handleSwitch()
|
|
{
|
|
if (this.state.active === true) {
|
|
this.state.active = false
|
|
} else {
|
|
this.state.active = true
|
|
}
|
|
|
|
this.update()
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
</example-loading> |