refactor: update examples
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<CRow>
|
||||
<CCol>
|
||||
<CCard class="mb-4">
|
||||
<CCardHeader>
|
||||
<strong>Vue Collapse</strong>
|
||||
</CCardHeader>
|
||||
<CCardBody>
|
||||
<p class="text-medium-emphasis small">
|
||||
You can use a link or a button component.
|
||||
</p>
|
||||
<Example href="components/collapse.html#example">
|
||||
<CButton color="primary" href="#" @click="visible = !visible"
|
||||
>Link</CButton
|
||||
>
|
||||
<CButton color="primary" @click="visible = !visible"
|
||||
>Button</CButton
|
||||
>
|
||||
<CCollapse :visible="visible">
|
||||
<CCard class="mt-3">
|
||||
<CCardBody>
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life
|
||||
accusamus terry richardson ad squid. Nihil anim keffiyeh
|
||||
helvetica, craft beer labore wes anderson cred nesciunt
|
||||
sapiente ea proident.
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCollapse>
|
||||
</Example>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
<CCard class="mb-4">
|
||||
<CCardHeader>
|
||||
<strong>Vue Collapse</strong> <small> multi target</small>
|
||||
</CCardHeader>
|
||||
<CCardBody>
|
||||
<p class="text-medium-emphasis small">
|
||||
A <code><CButton></code> can show and hide multiple elements.
|
||||
</p>
|
||||
<h4 class="mt-4">Toggle multiple targets</h4>
|
||||
<Example href="components/collapse.html#multiple-targets">
|
||||
<CButton color="primary" @click="visibleA = !visibleA"
|
||||
>Toggle first element</CButton
|
||||
>
|
||||
<CButton color="primary" @click="visibleB = !visibleB"
|
||||
>Toggle second element</CButton
|
||||
>
|
||||
<CButton
|
||||
color="primary"
|
||||
@click="
|
||||
() => {
|
||||
visibleA = !visibleA;
|
||||
visibleB = !visibleB;
|
||||
}
|
||||
"
|
||||
>
|
||||
Toggle both elements
|
||||
</CButton>
|
||||
<CRow>
|
||||
<CCol xs="6">
|
||||
<CCollapse :visible="visibleA">
|
||||
<CCard class="mt-3">
|
||||
<CCardBody>
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life
|
||||
accusamus terry richardson ad squid. Nihil anim keffiyeh
|
||||
helvetica, craft beer labore wes anderson cred nesciunt
|
||||
sapiente ea proident.
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCollapse>
|
||||
</CCol>
|
||||
<CCol xs="6">
|
||||
<CCollapse :visible="visibleB">
|
||||
<CCard class="mt-3">
|
||||
<CCardBody>
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life
|
||||
accusamus terry richardson ad squid. Nihil anim keffiyeh
|
||||
helvetica, craft beer labore wes anderson cred nesciunt
|
||||
sapiente ea proident.
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCollapse>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</Example>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Breadcrumbs",
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
visibleA: false,
|
||||
visibleB: false,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user