mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 01:12:30 +09:00
first
This commit is contained in:
61
documentation/switch-block/switch-block-documentation.md
Normal file
61
documentation/switch-block/switch-block-documentation.md
Normal file
@@ -0,0 +1,61 @@
|
||||
### VSwitchBlock
|
||||
|
||||
Vuero provides nicely styled switch checkboxes when you need to
|
||||
display such control in yoour forms. Vuero `VSwitchBlock` component have
|
||||
several color modififers. Available modifiers are `primary`, `success`,
|
||||
`info`, `warning` and `danger`.
|
||||
Please refer to the markup for more details about usage.
|
||||
|
||||
<!--code-->
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<VField horizontal>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="primary" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="success" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="info" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="warning" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="danger" :model-value="true" />
|
||||
</VControl>
|
||||
</VField>
|
||||
</template>
|
||||
```
|
||||
|
||||
<!--/code-->
|
||||
|
||||
<!--example-->
|
||||
|
||||
<VField horizontal>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="primary" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="success" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="info" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="warning" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock color="danger" :model-value="true" />
|
||||
</VControl>
|
||||
</VField>
|
||||
|
||||
<!--/example-->
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
state:
|
||||
value: true
|
||||
---
|
||||
|
||||
### Block label
|
||||
|
||||
You might have to add a label to your switches in some cases.
|
||||
If so, use the `VSwitchBlock` component, which provides a nice and clean
|
||||
flexbox layout. See the code example for more details about usage.
|
||||
|
||||
<!--code-->
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
|
||||
const value = ref(true)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VField>
|
||||
<VControl>
|
||||
<VSwitchBlock v-model="value" label="Some option" />
|
||||
</VControl>
|
||||
</VField>
|
||||
</template>
|
||||
```
|
||||
|
||||
<!--/code-->
|
||||
|
||||
<!--example-->
|
||||
|
||||
<div>
|
||||
<VField>
|
||||
<VControl>
|
||||
<VSwitchBlock
|
||||
v-model="frontmatter.state.value"
|
||||
label="Some option"
|
||||
/>
|
||||
</VControl>
|
||||
</VField>
|
||||
</div>
|
||||
|
||||
<!--/example-->
|
||||
@@ -0,0 +1,79 @@
|
||||
### Thin Switch
|
||||
|
||||
Vuero provides nice thin switch checkboxes when you need to display
|
||||
such control in your forms. Use `thin` modifier on `VSwitchBlock` component.
|
||||
Please refer to the markup for more details about usage.
|
||||
|
||||
<!--code-->
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<VField horizontal>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock thin />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock
|
||||
thin
|
||||
color="primary"
|
||||
:model-value="true"
|
||||
/>
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock
|
||||
thin
|
||||
color="success"
|
||||
:model-value="true"
|
||||
/>
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock
|
||||
thin
|
||||
color="info"
|
||||
:model-value="true"
|
||||
/>
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock
|
||||
thin
|
||||
color="warning"
|
||||
:model-value="true"
|
||||
/>
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock
|
||||
thin
|
||||
color="danger"
|
||||
:model-value="true"
|
||||
/>
|
||||
</VControl>
|
||||
</VField>
|
||||
</template>
|
||||
```
|
||||
|
||||
<!--/code-->
|
||||
|
||||
<!--example-->
|
||||
|
||||
<VField horizontal>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock thin />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock thin color="primary" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock thin color="success" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock thin color="info" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock thin color="warning" :model-value="true" />
|
||||
</VControl>
|
||||
<VControl subcontrol class="mr-2">
|
||||
<VSwitchBlock thin color="danger" :model-value="true" />
|
||||
</VControl>
|
||||
</VField>
|
||||
|
||||
<!--/example-->
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
state:
|
||||
value: true
|
||||
---
|
||||
|
||||
### Thin label
|
||||
|
||||
You might have to add a label to your switches in some cases.
|
||||
If so, use the `VSwitchBlock` component, which provides a nice and
|
||||
clean flexbox layout. See the code example for more details about usage.
|
||||
|
||||
<!--code-->
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
const value = ref(true)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VField>
|
||||
<VControl>
|
||||
<VSwitchBlock
|
||||
v-model="value"
|
||||
label="Some option"
|
||||
thin
|
||||
/>
|
||||
</VControl>
|
||||
</VField>
|
||||
</template>
|
||||
```
|
||||
|
||||
<!--/code-->
|
||||
|
||||
<!--example-->
|
||||
|
||||
<div>
|
||||
<VField>
|
||||
<VControl>
|
||||
<VSwitchBlock
|
||||
v-model="frontmatter.state.value"
|
||||
label="Some option"
|
||||
thin
|
||||
/>
|
||||
</VControl>
|
||||
</VField>
|
||||
</div>
|
||||
|
||||
<!--/example-->
|
||||
Reference in New Issue
Block a user