perf: 更新文档

This commit is contained in:
就眠仪式 2021-10-24 20:35:43 +08:00
parent 3bd3dbf6cb
commit 3f60aabe19
10 changed files with 146 additions and 115 deletions

View File

@ -120,7 +120,7 @@ export default {
::: :::
| Name | Description | Accepted Values | | Name | Description | Accepted Values |
| --------- | ------ | --- | | --------- | ------------ | ------------------------- |
| v-model | 当前激活项 | `--` | | v-model | 当前激活项 | `--` |
| anim | 切换方向 | `default` `updown` | | anim | 切换方向 | `default` `updown` |
| indicator | 控制器位置 | `inside` `outside` `none` | | indicator | 控制器位置 | `inside` `outside` `none` |
@ -130,5 +130,5 @@ export default {
::: :::
| Name | Description | Accepted Values | | Name | Description | Accepted Values |
| --------- | ------ | --- | | ------ | ----------- | --------------- |
| change | 切换回调 | id | | change | 切换回调 | id |

View File

@ -29,18 +29,21 @@ export default {
line-height: 60px; line-height: 60px;
text-align: center; text-align: center;
background: #87ca9a; background: #87ca9a;
color: white;
} }
.lay-code .layui-side { .lay-code .layui-side {
display: flex; display: flex;
background: #77c38c; background: #77c38c;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: white;
} }
.lay-code .layui-body { .lay-code .layui-body {
display: flex; display: flex;
background: #5FB878; background: #5FB878;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: white;
} }
</style> </style>

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="width:100%;height:300px"> <lay-layout class="layui-layout-document">
<lay-layout> <lay-header
<lay-header style="background: #393d49; border-bottom: 1px solid #404553"
><lay-logo style="box-shadow: 0 0px 2px 0 rgba(0, 0, 0, 0.15)"> ><lay-logo style="box-shadow: 0 0px 2px 0 rgba(0, 0, 0, 0.15)">
<img src="../assets/logo.png" /> <img src="../assets/logo.png" />
</lay-logo> </lay-logo>
@ -47,7 +46,6 @@
</lay-header> </lay-header>
<router-view></router-view> <router-view></router-view>
</lay-layout> </lay-layout>
</div>
</template> </template>
<script> <script>
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
@ -335,6 +333,29 @@ export default {
} }
</script> </script>
<style> <style>
.layui-layout-document > .layui-header {
z-index: 9999;
width: 100%;
position: fixed;
background: #393d49;
border-bottom: 1px solid #404553;
}
.layui-layout-document > .layui-layout > .layui-side {
overflow-x: hidden;
position: fixed;
margin-top: 60px;
height: calc(100% - 60px);
}
.layui-layout-document > .layui-layout > .layui-body {
margin-top: 60px;
left: 200px;
position: absolute;
width: calc(100% - 200px);
height: calc(100% - 60px);
}
.layui-logo img { .layui-logo img {
height: 31px; height: 31px;
width: 82px; width: 82px;
@ -350,6 +371,9 @@ export default {
.layui-menu-docs .layui-menu-body-title .layui-font-gray { .layui-menu-docs .layui-menu-body-title .layui-font-gray {
padding-left: 10px; padding-left: 10px;
} }
.layui-side hr {
margin: 8px;
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.layui-side { .layui-side {

View File

@ -1,6 +1,7 @@
<template> <template>
<lay-layout> <lay-layout>
<lay-side> <lay-side>
<lay-scroll>
<ul class="layui-menu layui-menu-lg layui-menu-docs"> <ul class="layui-menu layui-menu-lg layui-menu-docs">
<li <li
v-for="menu in menus" v-for="menu in menus"
@ -15,7 +16,9 @@
v-for="children in menu.children" v-for="children in menu.children"
:key="children" :key="children"
:class="[ :class="[
currentPath === children.path ? 'layui-menu-item-checked2' : '', currentPath === children.path
? 'layui-menu-item-checked2'
: '',
]" ]"
@click="handleClick(children)" @click="handleClick(children)"
> >
@ -31,6 +34,7 @@
</ul> </ul>
</li> </li>
</ul> </ul>
</lay-scroll>
</lay-side> </lay-side>
<lay-body> <lay-body>
<div style="padding: 20px"> <div style="padding: 20px">
@ -160,6 +164,12 @@ export default {
id: 1, id: 1,
title: '表单', title: '表单',
children: [ children: [
{
id: 36,
title: '开关',
subTitle: 'switch',
path: '/zh-CN/components/switch',
},
{ {
id: 32, id: 32,
title: '复选框', title: '复选框',
@ -184,30 +194,24 @@ export default {
subTitle: 'textarea', subTitle: 'textarea',
path: '/zh-CN/components/textarea', path: '/zh-CN/components/textarea',
}, },
{
id: 36,
title: '开关',
subTitle: 'switch',
path: '/zh-CN/components/switch',
},
{ {
id: 39, id: 39,
title: '下拉选择', title: '下拉选择',
subTitle: 'select', subTitle: 'select',
path: '/zh-CN/components/select', path: '/zh-CN/components/select',
}, },
{
id: 29,
title: '图标选择',
subTitle: 'iconPicker',
path: '/zh-CN/components/iconPicker',
},
{ {
id: 40, id: 40,
title: '颜色选择器', title: '颜色选择器',
subTitle: 'colorPicker', subTitle: 'colorPicker',
path: '/zh-CN/components/colorPicker', path: '/zh-CN/components/colorPicker',
}, },
{
id: 29,
title: '图标选择器',
subTitle: 'iconPicker',
path: '/zh-CN/components/iconPicker',
},
{ {
id: 26, id: 26,
title: '评分', title: '评分',

View File

@ -1,6 +1,7 @@
<template> <template>
<lay-layout> <lay-layout>
<lay-side> <lay-side>
<lay-scroll>
<ul class="layui-menu layui-menu-lg layui-menu-docs"> <ul class="layui-menu layui-menu-lg layui-menu-docs">
<li <li
v-for="menu in menus" v-for="menu in menus"
@ -33,6 +34,7 @@
</ul> </ul>
</li> </li>
</ul> </ul>
</lay-scroll>
</lay-side> </lay-side>
<lay-body> <lay-body>
<div style="padding: 20px"> <div style="padding: 20px">

View File

@ -1,11 +1,5 @@
<template> <template>
<div <div style="margin-top:60px;background-color: whitesmoke; height: 100%; width: 100%">
style="
background-color: whitesmoke;
height: 100%;
width: 100%;
"
>
<div class="site-banner"> <div class="site-banner">
<div class="site-banner-main"> <div class="site-banner-main">
<div class="site-zfj site-zfj-anim"> <div class="site-zfj site-zfj-anim">

View File

@ -24,7 +24,6 @@ html #layuicss-layer {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
_height: expression(document.body.offsetHeight + 'px');
} }
.layui-layer { .layui-layer {
@ -839,7 +838,6 @@ html #layuicss-layer {
height: 44px; height: 44px;
margin-top: -22px; margin-top: -22px;
outline: 0; outline: 0;
blr: expression(this.onFocus=this.blur());
} }
.layui-layer-imgprev { .layui-layer-imgprev {
@ -873,7 +871,6 @@ html #layuicss-layer {
width: 100%; width: 100%;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
background-color: #000\9;
filter: Alpha(opacity=60); filter: Alpha(opacity=60);
background-color: rgba(2, 0, 0, 0.35); background-color: rgba(2, 0, 0, 0.35);
color: #fff; color: #fff;

View File

@ -35,7 +35,14 @@
</div> </div>
</template> </template>
<script setup name="LayCarousel" lang="ts"> <script setup name="LayCarousel" lang="ts">
import { withDefaults, defineProps, provide, useSlots, ref, computed } from 'vue' import {
withDefaults,
defineProps,
provide,
useSlots,
ref,
computed,
} from 'vue'
const slot = useSlots() as any const slot = useSlots() as any
const slots = slot.default && (slot.default() as any[]) const slots = slot.default && (slot.default() as any[])
@ -54,7 +61,7 @@ const props = withDefaults(
height: '280px', height: '280px',
anim: 'default', anim: 'default',
arrow: 'hover', arrow: 'hover',
indicator: 'inside' indicator: 'inside',
} }
) )