init
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<lay-layout>
|
||||
<lay-side>
|
||||
<lay-scroll style="overflow-y: scroll">
|
||||
<ul class="layui-menu layui-menu-lg layui-menu-docs">
|
||||
<li
|
||||
v-for="menu in menus"
|
||||
:key="menu"
|
||||
class="layui-menu-item-group"
|
||||
lay-options="{type: 'group', isAllowSpread: true}"
|
||||
>
|
||||
<div class="layui-menu-body-title">{{ menu.title }}</div>
|
||||
<hr />
|
||||
<ul>
|
||||
<li
|
||||
v-for="children in menu.children"
|
||||
:key="children"
|
||||
:class="[
|
||||
currentPath === children.path
|
||||
? 'layui-menu-item-checked2'
|
||||
: '',
|
||||
]"
|
||||
@click="handleClick(children)"
|
||||
>
|
||||
<div class="layui-menu-body-title">
|
||||
<router-link :to="children.path">
|
||||
<span>{{ children.title }}</span>
|
||||
<span class="layui-font-12 layui-font-gray">
|
||||
{{ children.subTitle }}
|
||||
</span>
|
||||
</router-link>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</lay-scroll>
|
||||
</lay-side>
|
||||
<lay-body>
|
||||
<div
|
||||
style="
|
||||
padding: 20px;
|
||||
margin-right: 180px;
|
||||
transition: margin 240ms 60ms;
|
||||
"
|
||||
>
|
||||
<router-view />
|
||||
</div>
|
||||
</lay-body>
|
||||
</lay-layout>
|
||||
</template>
|
||||
<script>
|
||||
import { ref, watch } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import menus from "./utils/menus";
|
||||
export default {
|
||||
setup() {
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const currentPath = ref("/zh-CN/guide");
|
||||
|
||||
watch(
|
||||
() => route.path,
|
||||
(val) => {
|
||||
currentPath.value = val;
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true,
|
||||
}
|
||||
);
|
||||
|
||||
const selected = ref(1);
|
||||
|
||||
const handleClick = function (menu) {
|
||||
selected.value = menu.id;
|
||||
router.push(menu.path);
|
||||
};
|
||||
|
||||
return {
|
||||
menus,
|
||||
selected,
|
||||
currentPath,
|
||||
handleClick,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
.layui-timeline{padding-left:5px}.layui-timeline-item{position:relative;padding-bottom:20px}.layui-timeline-axis{position:absolute;left:-5px;top:0;z-index:10;width:20px;height:20px;line-height:20px;background-color:#fff;color:var(--global-checked-color);border-radius:50%;text-align:center;cursor:pointer}.layui-timeline-axis:hover{color:#ff5722}.layui-timeline-item:before{content:"";position:absolute;left:5px;top:0;z-index:0;width:1px;height:100%}.layui-timeline-item:first-child:before{display:block}.layui-timeline-item:last-child:before{display:none}.layui-timeline-content{padding-left:25px}.layui-timeline-title{position:relative;margin-bottom:10px;line-height:22px}.layui-timeline-item:before{background-color:#eee}.layui-timeline-horizontal .layui-timeline-item{display:inline-block;width:25%;text-align:center;padding-top:10px;vertical-align:top}.layui-timeline-horizontal .layui-timeline-axis{left:47%;top:-4px}.layui-timeline-horizontal .layui-timeline-item:before{left:0px;top:5px;width:100%;height:1px}.layui-timeline-horizontal .layui-timeline-item:first-child:before{display:block}.layui-timeline-horizontal .layui-timeline-item:last-child:before{display:block}.layui-timeline-horizontal .layui-timeline-content{padding:15px}.layui-timeline-horizontal .layui-timeline-title{text-align:center;position:relative;margin-bottom:10px;line-height:22px}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
xe<><65>
|
||||
<EFBFBD>@<10><><EFBFBD><14><>V<EFBFBD>NR<4E><52><EFBFBD>0<>M<08>1grxn.h<><68>7-<2D>T3<0B><>N<EFBFBD>]
|
||||
i<EFBFBD>Yɗw<1C><>l@<40><0E>}~<7E>OdP<64>ge<67>G\ZdžttOb<13>!<21>J<EFBFBD>
|
||||
Binary file not shown.
Reference in New Issue
Block a user