feat: publicize doc implemetation
This commit is contained in:
26
one/docs/demo/breadcrumb/base.vue
Normal file
26
one/docs/demo/breadcrumb/base.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-breadcrumb>
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Home
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Components
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item type="text">
|
||||
Breadcrumb
|
||||
</veui-breadcrumb-item>
|
||||
</veui-breadcrumb>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Breadcrumb, BreadcrumbItem } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-breadcrumb': Breadcrumb,
|
||||
'veui-breadcrumb-item': BreadcrumbItem
|
||||
}
|
||||
}
|
||||
</script>
|
||||
32
one/docs/demo/breadcrumb/datasource.vue
Normal file
32
one/docs/demo/breadcrumb/datasource.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-breadcrumb :routes="routes"/>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Breadcrumb } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-breadcrumb': Breadcrumb
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
routes: [
|
||||
{
|
||||
to: './breadcrumb',
|
||||
label: 'Home'
|
||||
},
|
||||
{
|
||||
to: './breadcrumb',
|
||||
label: 'Components'
|
||||
},
|
||||
{
|
||||
label: 'Breadcrumb'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
55
one/docs/demo/breadcrumb/redirect.vue
Normal file
55
one/docs/demo/breadcrumb/redirect.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-breadcrumb
|
||||
:routes="routes"
|
||||
@redirect="handleRedirect"
|
||||
/>
|
||||
<div class="console">
|
||||
<template v-if="currentRoute">
|
||||
Redirected to <b>{{ currentRoute.label }}</b>.
|
||||
</template>
|
||||
<template v-else>
|
||||
Not redirected yet.
|
||||
</template>
|
||||
</div>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Breadcrumb } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-breadcrumb': Breadcrumb
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
currentRoute: null,
|
||||
routes: [
|
||||
{
|
||||
label: 'Home',
|
||||
type: 'link'
|
||||
},
|
||||
{
|
||||
label: 'Components',
|
||||
type: 'link'
|
||||
},
|
||||
{
|
||||
label: 'Breadcrumb'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleRedirect (event, route) {
|
||||
this.currentRoute = route
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
.veui-breadcrumb:first-child {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
49
one/docs/demo/breadcrumb/separator.vue
Normal file
49
one/docs/demo/breadcrumb/separator.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-breadcrumb :routes="routes">
|
||||
<template #separator>
|
||||
-
|
||||
</template>
|
||||
</veui-breadcrumb>
|
||||
<veui-breadcrumb :routes="routes">
|
||||
<template #separator>
|
||||
<veui-icon name="arrow-right"/>
|
||||
</template>
|
||||
</veui-breadcrumb>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Breadcrumb, Icon } from 'veui'
|
||||
import 'veui-theme-dls-icons/arrow-right'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-breadcrumb': Breadcrumb,
|
||||
'veui-icon': Icon
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
routes: [
|
||||
{
|
||||
to: './breadcrumb',
|
||||
label: 'Home'
|
||||
},
|
||||
{
|
||||
to: './breadcrumb',
|
||||
label: 'Components'
|
||||
},
|
||||
{
|
||||
label: 'Breadcrumb'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
.veui-breadcrumb:first-child {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
47
one/docs/demo/breadcrumb/size.vue
Normal file
47
one/docs/demo/breadcrumb/size.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<article>
|
||||
<section>
|
||||
<veui-breadcrumb ui="m">
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Home
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Components
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item type="text">
|
||||
Breadcrumb
|
||||
</veui-breadcrumb-item>
|
||||
</veui-breadcrumb>
|
||||
</section>
|
||||
<section>
|
||||
<veui-breadcrumb ui="s">
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Home
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Components
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item type="text">
|
||||
Breadcrumb
|
||||
</veui-breadcrumb-item>
|
||||
</veui-breadcrumb>
|
||||
</section>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Breadcrumb, BreadcrumbItem } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-breadcrumb': Breadcrumb,
|
||||
'veui-breadcrumb-item': BreadcrumbItem
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
section {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
</style>
|
||||
47
one/docs/demo/breadcrumb/style.vue
Normal file
47
one/docs/demo/breadcrumb/style.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<article>
|
||||
<section>
|
||||
<veui-breadcrumb>
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Home
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Components
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item type="text">
|
||||
Breadcrumb
|
||||
</veui-breadcrumb-item>
|
||||
</veui-breadcrumb>
|
||||
</section>
|
||||
<section>
|
||||
<veui-breadcrumb ui="strong">
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Home
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item to="./breadcrumb">
|
||||
Components
|
||||
</veui-breadcrumb-item>
|
||||
<veui-breadcrumb-item type="text">
|
||||
Breadcrumb
|
||||
</veui-breadcrumb-item>
|
||||
</veui-breadcrumb>
|
||||
</section>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Breadcrumb, BreadcrumbItem } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-breadcrumb': Breadcrumb,
|
||||
'veui-breadcrumb-item': BreadcrumbItem
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
section {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user