fix:修改API文档
This commit is contained in:
parent
f506ebcf30
commit
4e899f25e0
@ -6,7 +6,7 @@
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Lay-backtop target=".layui-body"></Lay-backtop>
|
<lay-backtop target=".layui-body"></lay-backtop>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -30,7 +30,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Lay-backtop target=".layui-body" :showHeight="0" :bottom="100" @click="handlerClick" disabled style="background-color:#FFFFFF">
|
<lay-backtop target=".layui-body" :showHeight="0" :bottom="100" @click="handlerClick" disabled style="background-color:#FFFFFF">
|
||||||
<div style="
|
<div style="
|
||||||
width:50px;
|
width:50px;
|
||||||
height:50px;
|
height:50px;
|
||||||
@ -40,7 +40,7 @@ export default {
|
|||||||
border-radius:50%">
|
border-radius:50%">
|
||||||
<lay-icon type="layui-icon-dialogue" size="30px"></lay-icon>
|
<lay-icon type="layui-icon-dialogue" size="30px"></lay-icon>
|
||||||
</div>
|
</div>
|
||||||
</Lay-backtop>
|
</lay-backtop>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -77,7 +77,7 @@ export default {
|
|||||||
{{index + ". layui-vue , 基 于 vue 3.0 的 桌 面 端 组 件 库 , layui 的 另 一 种 呈 现 方 式"}}
|
{{index + ". layui-vue , 基 于 vue 3.0 的 桌 面 端 组 件 库 , layui 的 另 一 种 呈 现 方 式"}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Lay-backtop target="#scrollContainer" :showHeight="100" :bottom="30" position="absolute"></Lay-backtop>
|
<lay-backtop target="#scrollContainer" :showHeight="100" :bottom="30" position="absolute"></lay-backtop>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ export default {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<lay-tooltip content="backtop" position="left">
|
<lay-tooltip content="backtop" position="left">
|
||||||
<Lay-backtop target="#scrollContainer2" :showHeight="100" :bottom="30" position="absolute" style="border-radius: 50%;background-color: #5FB878;"></Lay-backtop>
|
<lay-backtop target="#scrollContainer2" :showHeight="100" :bottom="30" position="absolute" style="border-radius: 50%;background-color: #5FB878;"></lay-backtop>
|
||||||
</lay-tooltip>
|
</lay-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -97,7 +97,6 @@ const getScrollTarget = () => {
|
|||||||
if (props.position === 'absolute') {
|
if (props.position === 'absolute') {
|
||||||
if (!targetElement.parentElement) throw new Error(`target parent element is not existed: ${props.target}`);
|
if (!targetElement.parentElement) throw new Error(`target parent element is not existed: ${props.target}`);
|
||||||
targetElement.parentElement.style.position = 'relative';
|
targetElement.parentElement.style.position = 'relative';
|
||||||
console.log(backtopRef.value);
|
|
||||||
if (!backtopRef.value) throw new Error(`backtop component ref is null: ${props.target}`);
|
if (!backtopRef.value) throw new Error(`backtop component ref is null: ${props.target}`);
|
||||||
backtopRef.value.style.position = props.position;
|
backtopRef.value.style.position = props.position;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user