feat: publicize doc implemetation
This commit is contained in:
64
one/docs/demo/switch/size.vue
Normal file
64
one/docs/demo/switch/size.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<article>
|
||||
<section>
|
||||
<veui-switch
|
||||
v-model="disabled"
|
||||
ui="xs"
|
||||
>
|
||||
Disabled
|
||||
</veui-switch>
|
||||
</section>
|
||||
<section>
|
||||
<veui-switch
|
||||
v-model="on"
|
||||
:disabled="disabled"
|
||||
>
|
||||
Medium size
|
||||
</veui-switch>
|
||||
<veui-switch
|
||||
v-model="on"
|
||||
:disabled="disabled"
|
||||
ui="s"
|
||||
>
|
||||
Small size
|
||||
</veui-switch>
|
||||
<veui-switch
|
||||
v-model="on"
|
||||
:disabled="disabled"
|
||||
ui="xs"
|
||||
>
|
||||
Extra small size
|
||||
</veui-switch>
|
||||
</section>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Switch } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-switch': Switch
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
on: false,
|
||||
disabled: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.veui-switch {
|
||||
margin-right: 30px;
|
||||
}
|
||||
</style>
|
||||
33
one/docs/demo/switch/value.vue
Normal file
33
one/docs/demo/switch/value.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-switch
|
||||
v-model="status"
|
||||
true-value="ON"
|
||||
false-value="OFF"
|
||||
>
|
||||
Bluetooth
|
||||
</veui-switch>
|
||||
<p>Status: {{ statusMap[status] }}</p>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Switch } from 'veui'
|
||||
|
||||
const STATUS_MAP = {
|
||||
ON: 'On',
|
||||
OFF: 'Off'
|
||||
}
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-switch': Switch
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
status: 'ON',
|
||||
statusMap: STATUS_MAP
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user