docs: 新增 scroll 文档说明

This commit is contained in:
就眠儀式 2022-03-16 22:28:51 +08:00
parent 1fcb23a6bd
commit 8a6cab72ee
7 changed files with 67 additions and 4 deletions

View File

@ -0,0 +1,53 @@
::: anchor
:::
::: title 基本介绍
:::
::: describe 当有重要操作需告知用户处理结果,且反馈内容较为复杂时使用。
:::
::: title 基础使用
:::
::: demo 使用 `lay-scroll` 标签, 创建一个虚拟滚动容器
<template>
<lay-scroll height="200px">
<li v-for="i of 100">内容</li>
</lay-scroll>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
:::
::: title Scroll 属性
:::
::: table
| 属性 | 描述 | 可选值 |
| ----------- | -------- | ------ |
| height | 高度 | -- |
| scrollWidth | 滑块宽度 | -- |
| scrollColor | 滑块颜色 | -- |
| slotColor | 滑槽颜色 | -- |
:::
::: comment
:::
::: previousNext field
:::

View File

@ -145,7 +145,7 @@
</a>
</li>
<li class="layui-nav-item">
<a href="javascript:void(0)"> 0.3.9 </a>
<a href="javascript:void(0)"> 0.4.0 </a>
</li>
</ul>
</lay-header>

View File

@ -357,6 +357,11 @@ const zhCN = [
component: () =>
import("../../docs/zh-CN/components/fullscreen.md"),
meta: { title: "结果" },
}, {
path: "/zh-CN/components/scroll",
component: () =>
import("../../docs/zh-CN/components/scroll.md"),
meta: { title: "虚拟滚动" },
},
],
},

View File

@ -20,7 +20,7 @@
>
</div>
<div class="site-version">
<span>{{ t('home.version') }}v<cite class="site-showv">0.3.9</cite></span>
<span>{{ t('home.version') }}v<cite class="site-showv">0.4.0</cite></span>
<span
><router-link
class="layui-inline site-down"

View File

@ -327,6 +327,12 @@ const menus = [
subTitle: "result",
path: "/zh-CN/components/result",
},
{
id: 100,
title: "虚拟滚动",
subTitle: "result",
path: "/zh-CN/components/scroll",
},
],
},
{

View File

@ -1,6 +1,6 @@
{
"name": "@layui/layui-vue",
"version": "0.3.9",
"version": "0.4.0",
"author": "就眠儀式",
"license": "MIT",
"description": "a component library for Vue 3 base on layui-vue",

View File

@ -47,7 +47,6 @@ export default defineComponent({
name: "LayScroll",
props: {
height: {
//:height="'200px'"
type: String,
default: "100%",
},