docs: update docs
Change-Id: I76d0f72679cd75085f5ffd42f641daa198cafe11 docs: update docs for alert/autocomplete/carousel, etc. Change-Id: Ib7507f4979024f53c127e4b64b88560b93999db7 fix: update for autocomplete filter Change-Id: Ie54556715fa52838aeb6caaa19b4f9a9f14b490f docs: add docs for calendar/transfer/cascader Change-Id: I655b3cb3d25dd0649de9ae7e224e7063a40dd079 fix: add more demos for input/textarea Change-Id: Iada527ca82643a435a4775110b332155512d62a7 docs: add docs for uploader,select,table, etc. Change-Id: Ib034fd5cc9d9a420d4e002956ae925175783c5f3 docs: adjust formatting and punc. docs: adjust docs for uploader, etc. Change-Id: If06c8c1102eafce43f5802a333676fc9e62cd474 docs: add docs for nav Change-Id: If56a653ec53f19239606128fd30cae80f8e10025 docs: improve anchor demos Change-Id: I6ac1c08cc8905924d0062def1f8921fe1f302f15 docs: refine wording and format docs: update docs for check-button-group desc Change-Id: Ica7d6d0692250f0be6bd330b1ad4cc41938afd46
This commit is contained in:
109
one/docs/demo/anchor/normal.vue
Normal file
109
one/docs/demo/anchor/normal.vue
Normal file
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<article class="anchor-offset-demo">
|
||||
<div
|
||||
ref="container"
|
||||
class="anchor-wrapper"
|
||||
>
|
||||
<div
|
||||
v-for="i in coffees"
|
||||
:id="i.value.indexOf('#') >= 0 ? i.value.slice(1) : i.value"
|
||||
:key="i.value"
|
||||
class="block"
|
||||
>
|
||||
{{ i.label }}
|
||||
</div>
|
||||
</div>
|
||||
<section class="anchor-two">
|
||||
<veui-anchor
|
||||
:items="coffees"
|
||||
container="container"
|
||||
/>
|
||||
</section>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Anchor } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-anchor': Anchor
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
coffees: [
|
||||
{
|
||||
label: 'Infused',
|
||||
value: '#infused',
|
||||
children: [
|
||||
{
|
||||
label: 'Breadcrumb',
|
||||
value: '/components/breadcrumb'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Boiled',
|
||||
value: '#boiled',
|
||||
children: [
|
||||
{
|
||||
label: 'Button',
|
||||
value: '/components/button'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Espresso',
|
||||
value: '#espresso'
|
||||
},
|
||||
{
|
||||
label: 'Milk coffee',
|
||||
value: '#milk-coffee'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.anchor-offset-demo {
|
||||
position: relative;
|
||||
|
||||
.anchor-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
border: 1px dashed;
|
||||
|
||||
& > section {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
.block {
|
||||
white-space: nowrap;
|
||||
border-top: 1px solid #000;
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
flex: none;
|
||||
|
||||
& + .block {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.anchor-two {
|
||||
position: absolute;
|
||||
left: 250px;
|
||||
top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<docs>
|
||||
虚线框标记容器,实线标记锚点项顶部,当二者重合触发激活。
|
||||
</docs>
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
coffees: [
|
||||
{
|
||||
label: 'Infused',
|
||||
value: '#infused2',
|
||||
value: '#infused1',
|
||||
children: [
|
||||
{
|
||||
label: 'Breadcrumb',
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
},
|
||||
{
|
||||
label: 'Boiled',
|
||||
value: '#boiled2',
|
||||
value: '#boiled1',
|
||||
children: [
|
||||
{
|
||||
label: 'Button',
|
||||
@@ -59,11 +59,11 @@ export default {
|
||||
},
|
||||
{
|
||||
label: 'Espresso',
|
||||
value: '#espresso2'
|
||||
value: '#espresso1'
|
||||
},
|
||||
{
|
||||
label: 'Milk coffee',
|
||||
value: '#milk-coffee2'
|
||||
value: '#milk-coffee1'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
border-top: 1px solid red;
|
||||
|
||||
&::after {
|
||||
content: "targetOffset: 20px";
|
||||
content: "targetOffset(切换于此)";
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
left: 250px;
|
||||
|
||||
&::after {
|
||||
content: "stickyOffset: 30px";
|
||||
content: "stickyOffset(吸附于此)";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
|
||||
.block {
|
||||
white-space: nowrap;
|
||||
border-top: 1px solid #ccc;
|
||||
border-top: 1px solid #000;
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
flex: none;
|
||||
@@ -136,5 +136,9 @@ export default {
|
||||
</style>
|
||||
|
||||
<docs>
|
||||
虚线框标记容器。
|
||||
虚线框标记容器,黑实线标记锚点项顶部。
|
||||
|
||||
当黑实线和 `tagetOffset` 线重合触发激活。
|
||||
|
||||
`Anchor` 吸附在 `stickyOffset` 线处。
|
||||
</docs>
|
||||
|
||||
@@ -13,17 +13,7 @@
|
||||
>
|
||||
{{ i.label }}
|
||||
</div>
|
||||
|
||||
<section class="anchor-one">
|
||||
<h3>普通锚点</h3>
|
||||
<veui-anchor
|
||||
:items="coffees"
|
||||
:sticky="false"
|
||||
container="container"
|
||||
/>
|
||||
</section>
|
||||
<section class="anchor-two">
|
||||
<h3>吸附锚点</h3>
|
||||
<veui-anchor
|
||||
:items="coffees"
|
||||
container="container"
|
||||
@@ -45,7 +35,7 @@ export default {
|
||||
coffees: [
|
||||
{
|
||||
label: 'Infused',
|
||||
value: '#infused',
|
||||
value: '#infused2',
|
||||
children: [
|
||||
{
|
||||
label: 'Breadcrumb',
|
||||
@@ -55,7 +45,7 @@ export default {
|
||||
},
|
||||
{
|
||||
label: 'Boiled',
|
||||
value: '#boiled',
|
||||
value: '#boiled2',
|
||||
children: [
|
||||
{
|
||||
label: 'Button',
|
||||
@@ -65,11 +55,11 @@ export default {
|
||||
},
|
||||
{
|
||||
label: 'Espresso',
|
||||
value: '#espresso'
|
||||
value: '#espresso2'
|
||||
},
|
||||
{
|
||||
label: 'Milk coffee',
|
||||
value: '#milk-coffee'
|
||||
value: '#milk-coffee2'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -81,22 +71,6 @@ export default {
|
||||
.anchor-demo {
|
||||
position: relative;
|
||||
|
||||
.line {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 180px;
|
||||
border-top: 1px solid red;;
|
||||
|
||||
&::after {
|
||||
content: "0";
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.anchor-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
@@ -112,7 +86,7 @@ export default {
|
||||
|
||||
.block {
|
||||
white-space: nowrap;
|
||||
border-top: 1px solid #ccc;
|
||||
border-top: 1px solid #000;
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
flex: none;
|
||||
@@ -130,7 +104,7 @@ export default {
|
||||
|
||||
.anchor-two {
|
||||
position: absolute;
|
||||
left: 450px;
|
||||
left: 250px;
|
||||
top: 50px;
|
||||
}
|
||||
}
|
||||
@@ -138,5 +112,5 @@ export default {
|
||||
</style>
|
||||
|
||||
<docs>
|
||||
虚线框标记容器。
|
||||
虚线框标记容器,实线标记锚点项顶部,当二者重合触发激活。
|
||||
</docs>
|
||||
|
||||
Reference in New Issue
Block a user