Merge branch 'develop' of https://gitee.com/dingyongya/layui-vue into setup
Conflicts: example/src/router/zh-CN.ts src/index.ts
This commit is contained in:
commit
b53e16e7a7
11
README.md
11
README.md
@ -1,6 +1,6 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="http://www.layui.com">
|
<a href="http://www.layui.com">
|
||||||
<img src="https://images.gitee.com/uploads/images/2021/1213/173638_d6911839_4835367.png" alt="layui" width="360">
|
<img src="https://images.gitee.com/uploads/images/2022/0104/135039_3f41c467_4835367.png" alt="layui" width="360">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -70,18 +70,19 @@ createApp(App).use(Layui).mount('#app')
|
|||||||
|
|
||||||
### 使用趋势
|
### 使用趋势
|
||||||
|
|
||||||
[](https://giteye.net/chart/5ZQ67WWS)
|
[](https://giteye.net/chart/5ZQ67WWS)
|
||||||
|
|
||||||
### 贡献代码
|
### 贡献代码
|
||||||
|
|
||||||
> 大概是因为 layui - vue 让开发者变得更懒,所以贡献者才这么少?
|
> 在人的尺度里,世界既无始也无终,唯一的信仰是,总有人认得你站在暴风雪里的样子。
|
||||||
> 好的,姑且就这样认为吧。
|
|
||||||
|
|
||||||
[](https://giteye.net/chart/DBC9Z6HQ)
|
[](https://giteye.net/chart/DBC9Z6HQ)
|
||||||
|
|
||||||
## 交流群
|
## 交流群
|
||||||
|
|
||||||

|
| QQ | 微信 |
|
||||||
|
|----|----|
|
||||||
|
| <img src="https://images.gitee.com/uploads/images/2021/1008/090410_8b349271_4835367.png" width="180px" /> | <img src="https://images.gitee.com/uploads/images/2022/0103/195713_7e626723_4835367.png" width="180px" /> |
|
||||||
|
|
||||||
## 相关
|
## 相关
|
||||||
|
|
||||||
|
@ -12,9 +12,13 @@
|
|||||||
<lay-menu-item title="用户" id="2"></lay-menu-item>
|
<lay-menu-item title="用户" id="2"></lay-menu-item>
|
||||||
<lay-menu-item title="角色" id="3"></lay-menu-item>
|
<lay-menu-item title="角色" id="3"></lay-menu-item>
|
||||||
<lay-menu-item title="目录" id="7">
|
<lay-menu-item title="目录" id="7">
|
||||||
<lay-menu-child-item title="菜单一" id="4"></lay-menu-child-item>
|
<lay-menu-item title="菜单一" id="8"></lay-menu-item>
|
||||||
<lay-menu-child-item title="菜单二" id="5"></lay-menu-child-item>
|
<lay-menu-item title="菜单二" id="9"></lay-menu-item>
|
||||||
<lay-menu-child-item title="菜单三" id="6"></lay-menu-child-item>
|
<lay-menu-item title="菜单三" id="10">
|
||||||
|
<lay-menu-item title="菜单一" id="11"></lay-menu-item>
|
||||||
|
<lay-menu-item title="菜单二" id="12"></lay-menu-item>
|
||||||
|
<lay-menu-item title="菜单三" id="13"></lay-menu-item>
|
||||||
|
</lay-menu-item>
|
||||||
</lay-menu-item>
|
</lay-menu-item>
|
||||||
</lay-menu>
|
</lay-menu>
|
||||||
</template>
|
</template>
|
||||||
@ -52,9 +56,13 @@ export default {
|
|||||||
<lay-menu-item title="用户" id="2"></lay-menu-item>
|
<lay-menu-item title="用户" id="2"></lay-menu-item>
|
||||||
<lay-menu-item title="角色" id="3"></lay-menu-item>
|
<lay-menu-item title="角色" id="3"></lay-menu-item>
|
||||||
<lay-menu-item title="目录" id="7">
|
<lay-menu-item title="目录" id="7">
|
||||||
<lay-menu-child-item title="菜单一" id="4"></lay-menu-child-item>
|
<lay-menu-item title="菜单一" id="8"></lay-menu-item>
|
||||||
<lay-menu-child-item title="菜单二" id="5"></lay-menu-child-item>
|
<lay-menu-item title="菜单二" id="9"></lay-menu-item>
|
||||||
<lay-menu-child-item title="菜单三" id="6"></lay-menu-child-item>
|
<lay-menu-item title="菜单三" id="10">
|
||||||
|
<lay-menu-item title="菜单一" id="11"></lay-menu-item>
|
||||||
|
<lay-menu-item title="菜单二" id="12"></lay-menu-item>
|
||||||
|
<lay-menu-item title="菜单三" id="13"></lay-menu-item>
|
||||||
|
</lay-menu-item>
|
||||||
</lay-menu-item>
|
</lay-menu-item>
|
||||||
</lay-menu>
|
</lay-menu>
|
||||||
</template>
|
</template>
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeVisible1" type="primary">基础使用</lay-button>
|
<lay-button @click="changeVisible1" type="primary">基础使用</lay-button>
|
||||||
<lay-modal title="基础使用" v-model="visible1">
|
<lay-layer title="基础使用" v-model="visible1">
|
||||||
内容
|
内容
|
||||||
</lay-modal>
|
</lay-layer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -41,9 +41,9 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeVisible2" type="primary">允许拖动</lay-button>
|
<lay-button @click="changeVisible2" type="primary">允许拖动</lay-button>
|
||||||
<lay-modal title="允许拖动" v-model="visible2">
|
<lay-layer title="允许拖动" v-model="visible2">
|
||||||
内容
|
内容
|
||||||
</lay-modal>
|
</lay-layer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -74,9 +74,9 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeVisible3" type="primary">放大缩小</lay-button>
|
<lay-button @click="changeVisible3" type="primary">放大缩小</lay-button>
|
||||||
<lay-modal title="放大缩小" v-model="visible3" move="true" maxmin="true">
|
<lay-layer title="放大缩小" v-model="visible3" move="true" maxmin="true">
|
||||||
内容
|
内容
|
||||||
</lay-modal>
|
</lay-layer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -107,9 +107,9 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeVisible4" type="primary">指定位置</lay-button>
|
<lay-button @click="changeVisible4" type="primary">指定位置</lay-button>
|
||||||
<lay-modal title="指定位置" v-model="visible4" move="true" :offset="['100px','100px']">
|
<lay-layer title="指定位置" v-model="visible4" move="true" :offset="['100px','100px']">
|
||||||
内容
|
内容
|
||||||
</lay-modal>
|
</lay-layer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -140,9 +140,9 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeVisible8" type="primary">尺寸拉伸</lay-button>
|
<lay-button @click="changeVisible8" type="primary">尺寸拉伸</lay-button>
|
||||||
<lay-modal title="拉伸尺寸" resize="true" v-model="visible8" move="true">
|
<lay-layer title="拉伸尺寸" resize="true" v-model="visible8" move="true">
|
||||||
内容
|
内容
|
||||||
</lay-modal>
|
</lay-layer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -173,7 +173,7 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeVisible5" type="primary">远程窗体</lay-button>
|
<lay-button @click="changeVisible5" type="primary">远程窗体</lay-button>
|
||||||
<lay-modal title="加载 Iframe 内容" width="500px" height="400px" maxmin="true" v-model="visible5" move="true" :type="type5" content="http://www.pearadmin.com"></lay-modal>
|
<lay-layer title="加载 Iframe 内容" width="500px" height="400px" maxmin="true" v-model="visible5" move="true" :type="type5" content="http://www.pearadmin.com"></lay-layer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -206,9 +206,9 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeVisible6" type="primary">定义操作</lay-button>
|
<lay-button @click="changeVisible6" type="primary">定义操作</lay-button>
|
||||||
<lay-modal title="定义操作" v-model="visible6" move="true" :btn="btn6">
|
<lay-layer title="定义操作" v-model="visible6" move="true" :btn="btn6">
|
||||||
内容
|
内容
|
||||||
</lay-modal>
|
</lay-layer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -244,9 +244,9 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeVisible7" type="primary">开启遮盖</lay-button>
|
<lay-button @click="changeVisible7" type="primary">开启遮盖</lay-button>
|
||||||
<lay-modal title="开启遮盖" move="true" shade="false" v-model="visible7">
|
<lay-layer title="开启遮盖" move="true" shade="false" v-model="visible7">
|
||||||
内容
|
内容
|
||||||
</lay-modal>
|
</lay-layer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -329,6 +329,7 @@ export default {
|
|||||||
| content | 内容 | -- |
|
| content | 内容 | -- |
|
||||||
| shade | 开启遮盖 | -- |
|
| shade | 开启遮盖 | -- |
|
||||||
| shadeClose | 遮盖点击关闭 | -- |
|
| shadeClose | 遮盖点击关闭 | -- |
|
||||||
|
| shadeOpacity | 遮盖层透明度 | `0.1` |
|
||||||
| zIndex | 自定义层级 | -- |
|
| zIndex | 自定义层级 | -- |
|
||||||
| type | 类型 | `1: component` `2: iframe` |
|
| type | 类型 | `1: component` `2: iframe` |
|
||||||
| closeBtn | 显示关闭 | true |
|
| closeBtn | 显示关闭 | true |
|
||||||
@ -336,6 +337,8 @@ export default {
|
|||||||
| btnAlign | 按钮布局 | `l` `r` `c` |
|
| btnAlign | 按钮布局 | `l` `r` `c` |
|
||||||
| anim | 入场动画 | `0` `-` `6` |
|
| anim | 入场动画 | `0` `-` `6` |
|
||||||
| isOutAnim | 关闭动画 | `true` `false` |
|
| isOutAnim | 关闭动画 | `true` `false` |
|
||||||
|
| success | 显示回调 | -- |
|
||||||
|
| end | 关闭回调 | -- |
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
::: anchor
|
||||||
|
:::
|
||||||
|
|
||||||
::: title 基础使用
|
::: title 基础使用
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
@ -11,7 +11,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<lay-timeline>
|
<lay-timeline>
|
||||||
<lay-timeline-item title="0.3.x">
|
<lay-timeline-item title="0.3.x">
|
||||||
<ul>
|
<ul>
|
||||||
|
<a name="0-3-2"> </a>
|
||||||
|
<li>
|
||||||
|
<h3>0.3.2 <span class="layui-badge-rim">2022-01-03</span></h3>
|
||||||
|
<ul>
|
||||||
|
<li>[新增] skeleton 骨架屏组件。</li>
|
||||||
|
<li>[重构] tooltip 内部 popper 组件,支持移动到 tooltip 内部。</li>
|
||||||
|
<li>[增强] layer 部分函数 msg open confirm 等, content 支持 VNode 类型。</li>
|
||||||
|
<li>[增强] menu 菜单组件, 初步支持无限级嵌套。</li>
|
||||||
|
<li>[修复] layer.close layer.closeAll 函数无法触发 OutAnim 过度动画问题。</li>
|
||||||
|
<li>[废弃] menu-child-item 组件, 使用 menu-item 替代。</li>
|
||||||
|
<li>[升级] layer-vue 1.2.4。</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
<a name="0-3-1"> </a>
|
<a name="0-3-1"> </a>
|
||||||
<li>
|
<li>
|
||||||
<h3>0.3.1 <span class="layui-badge-rim">2021-12-28</span></h3>
|
<h3>0.3.1 <span class="layui-badge-rim">2021-12-28</span></h3>
|
||||||
|
@ -2,29 +2,30 @@
|
|||||||
<aside :class="classAside">
|
<aside :class="classAside">
|
||||||
<div class="lay-aside-top">
|
<div class="lay-aside-top">
|
||||||
<lay-button
|
<lay-button
|
||||||
@click="handlerBtnClick()"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
size="xs"
|
size="xs"
|
||||||
:class="classAsideBtn"
|
:class="classAsideBtn"
|
||||||
|
@click="handlerBtnClick()"
|
||||||
>
|
>
|
||||||
<lay-icon :type="iconType" size="40"> </lay-icon>
|
<lay-icon :type="iconType" size="40"> </lay-icon>
|
||||||
</lay-button>
|
</lay-button>
|
||||||
</div>
|
</div>
|
||||||
<lay-scroll
|
<lay-scroll
|
||||||
class="layui-side-scroll-bar layui-side-scroll::-webkit-scrollbar" >
|
class="layui-side-scroll-bar layui-side-scroll::-webkit-scrollbar"
|
||||||
|
>
|
||||||
<ul>
|
<ul>
|
||||||
<li
|
<li
|
||||||
v-for="(item, index) in anchorsComput"
|
v-for="(anchor, index) in anchorList"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="lay-aside-list"
|
class="lay-aside-list"
|
||||||
:class="{ active: index === curridx }"
|
:class="{ active: index === activeIndex }"
|
||||||
@click="curridx = index"
|
@click.prevent="handlerListItemClick(index, anchor)"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
:href="`#${item}`"
|
:href="`#${anchor}`"
|
||||||
class="lay-aside-link"
|
class="lay-aside-link"
|
||||||
:class="{ active: index === curridx }"
|
:class="{ active: index === activeIndex }"
|
||||||
>{{ item }}</a
|
>{{ anchor }}</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -32,41 +33,138 @@
|
|||||||
</aside>
|
</aside>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from "vue";
|
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
anchors?: Array<string> | string;
|
anchors?: Array<string> | string;
|
||||||
currIndex: number;
|
currIndex: number;
|
||||||
show: boolean | string;
|
show: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let curridx = ref(props.currIndex);
|
let activeIndex = ref<number>(0);
|
||||||
const show = ref(props.show);
|
const show = ref<boolean>(props.show);
|
||||||
const iconType = ref("layui-icon-right");
|
const iconType = ref<string>("layui-icon-right");
|
||||||
const anchor = props.anchors;
|
const anchors: string | string[] | undefined = props.anchors;
|
||||||
|
/**滚动条高度 */
|
||||||
|
const scrollTop = ref<number>(0);
|
||||||
|
/**要监听的滚动元素 */
|
||||||
|
const scrollRefEl = shallowRef<HTMLElement | undefined>(undefined);
|
||||||
|
/**折叠动画 */
|
||||||
|
let enableAnimation = false;
|
||||||
|
|
||||||
const anchorsComput = computed(() => {
|
const anchorList = computed(() => {
|
||||||
return typeof anchor === "string" ? anchor?.split(",") : anchor;
|
return typeof anchors === "string" ? anchors?.split(",") : anchors;
|
||||||
});
|
});
|
||||||
|
|
||||||
const classAside = computed(() => [
|
const classAside = computed(() => [
|
||||||
"lay-aside",
|
"lay-aside",
|
||||||
|
{ "lay-aside-animation": enableAnimation },
|
||||||
{ "lay-aside-collapse": !show.value },
|
{ "lay-aside-collapse": !show.value },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const classAsideBtn = computed(() => [
|
const classAsideBtn = computed(() => {
|
||||||
"lay-aside-collapse-btn",
|
let classBtn = [];
|
||||||
{ "lay-aside-collapse-btn-collapse": !show.value },
|
if (enableAnimation) {
|
||||||
]);
|
classBtn = [
|
||||||
|
"lay-aside-collapse-btn",
|
||||||
|
"lay-aside-animation",
|
||||||
|
{ "lay-aside-collapse-btn-collapse": !show.value }
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
classBtn = [
|
||||||
|
"lay-aside-collapse-btn",
|
||||||
|
{ "lay-aside-collapse-btn-collapse": !show.value }
|
||||||
|
];
|
||||||
|
|
||||||
|
enableAnimation = true;
|
||||||
|
}
|
||||||
|
return classBtn;
|
||||||
|
});
|
||||||
|
|
||||||
const handlerBtnClick = () => {
|
const handlerBtnClick = () => {
|
||||||
show.value = !show.value;
|
show.value = !show.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handlerListItemClick = (index: number, id: string) => {
|
||||||
|
activeIndex.value = index;
|
||||||
|
scrollToTitle(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**锚点标签跟随滚动高亮 */
|
||||||
|
const handlerScroll = () => {
|
||||||
|
// 距离顶部 90 改变 activeIndex
|
||||||
|
scrollTop.value = getScrollTop(scrollRefEl.value) + 90;
|
||||||
|
anchorList.value?.forEach((item, index) => {
|
||||||
|
const elOffsetTop = document.getElementById(item)?.offsetTop;
|
||||||
|
if (elOffsetTop) {
|
||||||
|
if (index === 0 && scrollTop.value < elOffsetTop) {
|
||||||
|
activeIndex.value = 0;
|
||||||
|
} else if (scrollTop.value >= elOffsetTop) {
|
||||||
|
activeIndex.value = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const handlerCollapse = () => {
|
||||||
iconType.value = show.value ? "layui-icon-right" : "layui-icon-left";
|
iconType.value = show.value ? "layui-icon-right" : "layui-icon-left";
|
||||||
|
// @ts-ignore
|
||||||
|
scrollRefEl.value!.firstElementChild!.style.marginRight = show.value
|
||||||
|
? "180px"
|
||||||
|
: "0px";
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(show, () => {
|
||||||
|
handlerCollapse();
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// @ts-ignore TODO 封装 hooks
|
||||||
|
scrollRefEl.value = document.querySelector(".layui-body");
|
||||||
|
if (!scrollRefEl.value) {
|
||||||
|
throw new Error(`scroll element is not existed: ".layui-body"`);
|
||||||
|
}
|
||||||
|
scrollRefEl.value.scrollTop = 0;
|
||||||
|
scrollRefEl.value?.addEventListener("scroll", throttle(handlerScroll, 500));
|
||||||
|
// 如果已折叠,关闭组件初始渲染时的动画,然后自动开启
|
||||||
|
// @ts-ignore
|
||||||
|
show.value = scrollRefEl.value!.firstElementChild!.style.marginRight !== "0px";
|
||||||
|
enableAnimation = show.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
/**获取滚动高度 */
|
||||||
|
const getScrollTop = (el: HTMLElement | undefined): number => {
|
||||||
|
return el
|
||||||
|
? el.scrollTop
|
||||||
|
: window.pageYOffset ||
|
||||||
|
document.documentElement.scrollTop ||
|
||||||
|
document.body.scrollTop ||
|
||||||
|
0;
|
||||||
|
}
|
||||||
|
/**平滑滚动 */
|
||||||
|
const scrollToTitle = (id: string): void => {
|
||||||
|
document.getElementById(id)?.scrollIntoView({
|
||||||
|
behavior: "smooth",
|
||||||
|
block: "start",
|
||||||
|
inline: "nearest",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const throttle = (func: Function, wait: number) => {
|
||||||
|
var timer: any = null;
|
||||||
|
return (...args: any) => {
|
||||||
|
if (!timer) {
|
||||||
|
timer = setTimeout(() => {
|
||||||
|
timer = null;
|
||||||
|
func.apply(this, args);
|
||||||
|
}, wait);
|
||||||
|
}
|
||||||
|
};
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.layui-side-scroll-bar{
|
.layui-side-scroll-bar {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
max-width: 156px;
|
max-width: 156px;
|
||||||
}
|
}
|
||||||
.layui-side-scroll::-webkit-scrollbar {
|
.layui-side-scroll::-webkit-scrollbar {
|
||||||
@ -81,10 +179,16 @@ const handlerBtnClick = () => {
|
|||||||
padding: 0 25px;
|
padding: 0 25px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-left: 1px solid rgb(229 230 235);
|
border-left: 1px solid rgb(229 230 235);
|
||||||
transition: right 200ms;
|
transition: none;
|
||||||
|
-webkit-transition: none;
|
||||||
height: calc(100% - 60px);
|
height: calc(100% - 60px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lay-aside-collapse {
|
||||||
|
right: -180px;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
.lay-aside-top {
|
.lay-aside-top {
|
||||||
height: 29px;
|
height: 29px;
|
||||||
}
|
}
|
||||||
@ -102,14 +206,6 @@ const handlerBtnClick = () => {
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.1s cubic-bezier(0, 0, 1, 1);
|
transition: all 0.1s cubic-bezier(0, 0, 1, 1);
|
||||||
&:hover {
|
|
||||||
background-color: #f6f6f6 !important;
|
|
||||||
color: #5fb878;
|
|
||||||
}
|
|
||||||
&:active {
|
|
||||||
background-color: #f6f6f6 !important;
|
|
||||||
color: #89d89f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.lay-aside-list {
|
.lay-aside-list {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -122,15 +218,16 @@ const handlerBtnClick = () => {
|
|||||||
background-color: #f6f6f6 !important;
|
background-color: #f6f6f6 !important;
|
||||||
color: #5fb878;
|
color: #5fb878;
|
||||||
}
|
}
|
||||||
}
|
&:active {
|
||||||
.active {
|
background-color: #f6f6f6 !important;
|
||||||
background-color: #f6f6f6 !important;
|
color: #89d89f;
|
||||||
color: #5fb878 !important;
|
}
|
||||||
}
|
&.active {
|
||||||
|
background-color: #f6f6f6 !important;
|
||||||
.lay-aside-collapse {
|
* {
|
||||||
right: -180px;
|
color: #5fb878 !important;
|
||||||
opacity: 0.7;
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.lay-aside-collapse-btn {
|
.lay-aside-collapse-btn {
|
||||||
@ -148,14 +245,20 @@ const handlerBtnClick = () => {
|
|||||||
border-bottom-left-radius: 4px;
|
border-bottom-left-radius: 4px;
|
||||||
border: rgb(229 230 235) 1px solid;
|
border: rgb(229 230 235) 1px solid;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
transition: right 200ms;
|
|
||||||
box-shadow: 2px 0 8px 0 rgb(29 35 41 / 5%);
|
box-shadow: 2px 0 8px 0 rgb(29 35 41 / 5%);
|
||||||
|
transition: none;
|
||||||
|
-webkit-transition: none;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #e2e2e2;
|
background-color: #e2e2e2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.lay-aside-collapse-btn-collapse {
|
.lay-aside-collapse-btn-collapse {
|
||||||
right:0px;
|
right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lay-aside-animation {
|
||||||
|
transition: right 200ms;
|
||||||
|
-webkit-transition: right 200ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
@ -171,8 +274,8 @@ const handlerBtnClick = () => {
|
|||||||
.lay-aside-list {
|
.lay-aside-list {
|
||||||
max-width: 68px;
|
max-width: 68px;
|
||||||
}
|
}
|
||||||
.layui-side-scroll-bar{
|
.layui-side-scroll-bar {
|
||||||
max-width: 68px;
|
max-width: 68px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
.lay-table-box table {
|
.lay-table-box table {
|
||||||
width: 100%; /*表格宽度*/
|
width: 100%;
|
||||||
border-collapse: collapse; /*使用单一线条的边框*/
|
border-collapse: collapse;
|
||||||
empty-cells: show; /*单元格无内容依旧绘制边框*/
|
empty-cells: show;
|
||||||
border-right: 1px solid whitesmoke;
|
border-right: 1px solid whitesmoke;
|
||||||
border-left: 1px solid whitesmoke;
|
border-left: 1px solid whitesmoke;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="layui-nav-item">
|
<li class="layui-nav-item">
|
||||||
<a href="javascript:void(0)"> 0.3.1 </a>
|
<a href="javascript:void(0)"> 0.3.2 </a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</lay-header>
|
</lay-header>
|
||||||
|
@ -37,4 +37,4 @@ const plugins = [
|
|||||||
}),
|
}),
|
||||||
] as any
|
] as any
|
||||||
|
|
||||||
export default plugins
|
export default plugins
|
@ -2,12 +2,9 @@ import container from "markdown-it-container";
|
|||||||
import type Token from "markdown-it/lib/token";
|
import type Token from "markdown-it/lib/token";
|
||||||
|
|
||||||
type ContainerArgs = [
|
type ContainerArgs = [
|
||||||
typeof container,
|
typeof container, string,
|
||||||
string,
|
{ render(tokens: Token[], idx: number): string }
|
||||||
{
|
]
|
||||||
render(tokens: Token[], idx: number): string;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function createContainer(
|
export default function createContainer(
|
||||||
klass: string,
|
klass: string,
|
||||||
|
@ -2,11 +2,8 @@ import container from 'markdown-it-container'
|
|||||||
import type Token from 'markdown-it/lib/token'
|
import type Token from 'markdown-it/lib/token'
|
||||||
|
|
||||||
type ContainerArgs = [
|
type ContainerArgs = [
|
||||||
typeof container,
|
typeof container, string,
|
||||||
string,
|
{ render(tokens: Token[], idx: number): string }
|
||||||
{
|
|
||||||
render(tokens: Token[], idx: number): string
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default function createContainer(
|
export default function createContainer(
|
||||||
|
@ -2,11 +2,8 @@ import container from 'markdown-it-container'
|
|||||||
import type Token from 'markdown-it/lib/token'
|
import type Token from 'markdown-it/lib/token'
|
||||||
|
|
||||||
type ContainerArgs = [
|
type ContainerArgs = [
|
||||||
typeof container,
|
typeof container, string,
|
||||||
string,
|
{ render(tokens: Token[], idx: number): string }
|
||||||
{
|
|
||||||
render(tokens: Token[], idx: number): string
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default function createContainer(
|
export default function createContainer(
|
||||||
@ -27,4 +24,4 @@ export default function createContainer(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -2,11 +2,8 @@ import container from 'markdown-it-container'
|
|||||||
import type Token from 'markdown-it/lib/token'
|
import type Token from 'markdown-it/lib/token'
|
||||||
|
|
||||||
type ContainerArgs = [
|
type ContainerArgs = [
|
||||||
typeof container,
|
typeof container, string,
|
||||||
string,
|
{ render(tokens: Token[], idx: number): string }
|
||||||
{
|
|
||||||
render(tokens: Token[], idx: number): string
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default function createContainer(
|
export default function createContainer(
|
||||||
@ -28,4 +25,4 @@ export default function createContainer(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -2,11 +2,8 @@ import container from 'markdown-it-container'
|
|||||||
import type Token from 'markdown-it/lib/token'
|
import type Token from 'markdown-it/lib/token'
|
||||||
|
|
||||||
type ContainerArgs = [
|
type ContainerArgs = [
|
||||||
typeof container,
|
typeof container, string,
|
||||||
string,
|
{ render(tokens: Token[], idx: number): string }
|
||||||
{
|
|
||||||
render(tokens: Token[], idx: number): string
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default function createContainer(
|
export default function createContainer(
|
||||||
@ -28,4 +25,4 @@ export default function createContainer(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -2,11 +2,8 @@ import container from 'markdown-it-container'
|
|||||||
import type Token from 'markdown-it/lib/token'
|
import type Token from 'markdown-it/lib/token'
|
||||||
|
|
||||||
type ContainerArgs = [
|
type ContainerArgs = [
|
||||||
typeof container,
|
typeof container, string,
|
||||||
string,
|
{ render(tokens: Token[], idx: number): string }
|
||||||
{
|
|
||||||
render(tokens: Token[], idx: number): string
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default function createContainer(
|
export default function createContainer(
|
||||||
@ -23,11 +20,11 @@ export default function createContainer(
|
|||||||
if (token.nesting === 1) {
|
if (token.nesting === 1) {
|
||||||
return `<lay-field id="${info || defaultTitle}" title="${
|
return `<lay-field id="${info || defaultTitle}" title="${
|
||||||
info || defaultTitle
|
info || defaultTitle
|
||||||
}" style="margin-top:20px;margin-bottom: 20px;">`
|
}" style="margin-top:21px;margin-bottom: 20px;">`
|
||||||
} else {
|
} else {
|
||||||
return '</lay-field>\n'
|
return '</lay-field>\n'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -19,13 +19,8 @@ export default (md: MarkdownIt): void => {
|
|||||||
}
|
}
|
||||||
const start = pos + 3
|
const start = pos + 3
|
||||||
const end = state.skipSpacesBack(max, pos)
|
const end = state.skipSpacesBack(max, pos)
|
||||||
const rawPath = state.src
|
const rawPath = state.src.slice(start, end).trim().replace(/^@/, process.cwd())
|
||||||
.slice(start, end)
|
const content = fs.existsSync(rawPath) ? fs.readFileSync(rawPath).toString() : 'Not found: ' + rawPath
|
||||||
.trim()
|
|
||||||
.replace(/^@/, process.cwd())
|
|
||||||
const content = fs.existsSync(rawPath)
|
|
||||||
? fs.readFileSync(rawPath).toString()
|
|
||||||
: 'Not found: ' + rawPath
|
|
||||||
const meta = rawPath.replace(rawPath, '')
|
const meta = rawPath.replace(rawPath, '')
|
||||||
state.line = startLine + 1
|
state.line = startLine + 1
|
||||||
const token = state.push('fence', 'code', 0)
|
const token = state.push('fence', 'code', 0)
|
||||||
@ -36,4 +31,4 @@ export default (md: MarkdownIt): void => {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
md.block.ruler.before('fence', 'snippet', parser)
|
md.block.ruler.before('fence', 'snippet', parser)
|
||||||
}
|
}
|
@ -1,373 +1,362 @@
|
|||||||
import BaseLayout from "../layouts/Layout.vue";
|
import BaseLayout from '../layouts/Layout.vue'
|
||||||
import Component from "../view/component.vue";
|
import Component from '../view/component.vue'
|
||||||
import Hooks from "../view/hooks.vue";
|
import Hooks from '../view/hooks.vue'
|
||||||
import Guide from "../view/guide.vue";
|
import Guide from '../view/guide.vue'
|
||||||
import Index from "../view/index.vue";
|
import Index from '../view/index.vue'
|
||||||
import Ecology from "../view/ecology.vue";
|
import Ecology from '../view/ecology.vue'
|
||||||
|
|
||||||
const zhCN = [
|
const zhCN = [
|
||||||
{
|
{
|
||||||
path: "/",
|
path: '/',
|
||||||
redirect: "/zh-CN/index",
|
redirect: '/zh-CN/index',
|
||||||
component: BaseLayout,
|
component: BaseLayout,
|
||||||
meta: { title: "首页" },
|
meta: { title: '首页' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/zh-CN/index",
|
path: '/zh-CN/index',
|
||||||
component: Index,
|
component: Index,
|
||||||
meta: { title: "指南" },
|
meta: { title: '指南' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/ecology",
|
path: '/zh-CN/ecology',
|
||||||
component: Ecology,
|
component: Ecology,
|
||||||
meta: { title: "生态" },
|
meta: { title: '生态' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide",
|
path: '/zh-CN/guide',
|
||||||
redirect: "/zh-CN/guide/introduce",
|
redirect: '/zh-CN/guide/introduce',
|
||||||
component: Guide,
|
component: Guide,
|
||||||
meta: { title: "指南" },
|
meta: { title: '指南' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide/introduce",
|
path: '/zh-CN/guide/introduce',
|
||||||
component: () => import("../../docs/zh-CN/guide/introduce.md"),
|
component: () => import('../../docs/zh-CN/guide/introduce.md'),
|
||||||
meta: { title: "介绍" },
|
meta: { title: '介绍' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide/getStarted",
|
path: '/zh-CN/guide/getStarted',
|
||||||
component: () => import("../../docs/zh-CN/guide/getStarted.md"),
|
component: () => import('../../docs/zh-CN/guide/getStarted.md'),
|
||||||
meta: { title: "安装" },
|
meta: { title: '安装' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide/changelog",
|
path: '/zh-CN/guide/changelog',
|
||||||
component: () => import("../../docs/zh-CN/guide/changelog.md"),
|
component: () => import('../../docs/zh-CN/guide/changelog.md'),
|
||||||
meta: { title: "更新" },
|
meta: { title: '更新' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide/problem",
|
path: '/zh-CN/guide/problem',
|
||||||
component: () => import("../../docs/zh-CN/guide/problem.md"),
|
component: () => import('../../docs/zh-CN/guide/problem.md'),
|
||||||
meta: { title: "问题" },
|
meta: { title: '问题' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide/member",
|
path: '/zh-CN/guide/member',
|
||||||
component: () => import("../../docs/zh-CN/guide/member.md"),
|
component: () => import('../../docs/zh-CN/guide/member.md'),
|
||||||
meta: { title: "团队" },
|
meta: { title: '团队' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide/norms",
|
path: '/zh-CN/guide/norms',
|
||||||
component: () => import("../../docs/zh-CN/guide/norms.md"),
|
component: () => import('../../docs/zh-CN/guide/norms.md'),
|
||||||
meta: { title: "规范" },
|
meta: { title: '规范' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide/theme",
|
path: '/zh-CN/guide/theme',
|
||||||
component: () => import("../../docs/zh-CN/guide/theme.md"),
|
component: () => import('../../docs/zh-CN/guide/theme.md'),
|
||||||
meta: { title: "主题" },
|
meta: { title: '主题' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/guide/sponsor",
|
path: '/zh-CN/guide/sponsor',
|
||||||
component: () => import("../../docs/zh-CN/guide/sponsor.md"),
|
component: () => import('../../docs/zh-CN/guide/sponsor.md'),
|
||||||
meta: { title: "赞助" },
|
meta: { title: '赞助' },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components",
|
path: '/zh-CN/components',
|
||||||
redirect: "/zh-CN/components/color",
|
redirect: '/zh-CN/components/color',
|
||||||
component: Component,
|
component: Component,
|
||||||
meta: { title: "组件" },
|
meta: { title: '组件' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/step",
|
path: '/zh-CN/components/skeleton',
|
||||||
component: () => import("../../docs/zh-CN/components/step.md"),
|
component: () => import('../../docs/zh-CN/components/skeleton.md'),
|
||||||
meta: { title: "分步" },
|
meta: { title: '骨架屏' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/skeleton",
|
path: '/zh-CN/components/layout',
|
||||||
component: () => import("../../docs/zh-CN/components/skeleton.md"),
|
component: () => import('../../docs/zh-CN/components/layout.md'),
|
||||||
meta: { title: "骨架屏" },
|
meta: { title: '布局' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/layout",
|
path: '/zh-CN/components/color',
|
||||||
component: () => import("../../docs/zh-CN/components/layout.md"),
|
component: () => import('../../docs/zh-CN/components/color.md'),
|
||||||
meta: { title: "布局" },
|
meta: { title: '颜色' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/color",
|
path: '/zh-CN/components/container',
|
||||||
component: () => import("../../docs/zh-CN/components/color.md"),
|
component: () => import('../../docs/zh-CN/components/container.md'),
|
||||||
meta: { title: "颜色" },
|
meta: { title: '容器' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/container",
|
path: '/zh-CN/components/breadcrumb',
|
||||||
component: () => import("../../docs/zh-CN/components/container.md"),
|
|
||||||
meta: { title: "容器" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/breadcrumb",
|
|
||||||
component: () =>
|
component: () =>
|
||||||
import("../../docs/zh-CN/components/breadcrumb.md"),
|
import('../../docs/zh-CN/components/breadcrumb.md'),
|
||||||
meta: { title: "面包屑" },
|
meta: { title: '面包屑' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/button",
|
path: '/zh-CN/components/button',
|
||||||
component: () => import("../../docs/zh-CN/components/button.md"),
|
component: () => import('../../docs/zh-CN/components/button.md'),
|
||||||
meta: { title: "按钮" },
|
meta: { title: '按钮' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/icon",
|
path: '/zh-CN/components/icon',
|
||||||
component: () => import("../../docs/zh-CN/components/icon.md"),
|
component: () => import('../../docs/zh-CN/components/icon.md'),
|
||||||
meta: { title: "图标" },
|
meta: { title: '图标' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/panel",
|
path: '/zh-CN/components/panel',
|
||||||
component: () => import("../../docs/zh-CN/components/panel.md"),
|
component: () => import('../../docs/zh-CN/components/panel.md'),
|
||||||
meta: { title: "面板" },
|
meta: { title: '面板' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/animation",
|
path: '/zh-CN/components/animation',
|
||||||
component: () => import("../../docs/zh-CN/components/animation.md"),
|
component: () => import('../../docs/zh-CN/components/animation.md'),
|
||||||
meta: { title: "动画" },
|
meta: { title: '动画' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/card",
|
path: '/zh-CN/components/card',
|
||||||
component: () => import("../../docs/zh-CN/components/card.md"),
|
component: () => import('../../docs/zh-CN/components/card.md'),
|
||||||
meta: { title: "卡片" },
|
meta: { title: '卡片' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/grid",
|
path: '/zh-CN/components/grid',
|
||||||
component: () => import("../../docs/zh-CN/components/grid.md"),
|
component: () => import('../../docs/zh-CN/components/grid.md'),
|
||||||
meta: { title: "栅格" },
|
meta: { title: '栅格' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/form",
|
path: '/zh-CN/components/form',
|
||||||
component: () => import("../../docs/zh-CN/components/form.md"),
|
component: () => import('../../docs/zh-CN/components/form.md'),
|
||||||
meta: { title: "表单" },
|
meta: { title: '表单' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/badge",
|
path: '/zh-CN/components/badge',
|
||||||
component: () => import("../../docs/zh-CN/components/badge.md"),
|
component: () => import('../../docs/zh-CN/components/badge.md'),
|
||||||
meta: { title: "徽章" },
|
meta: { title: '徽章' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/block",
|
path: '/zh-CN/components/block',
|
||||||
component: () => import("../../docs/zh-CN/components/block.md"),
|
component: () => import('../../docs/zh-CN/components/block.md'),
|
||||||
meta: { title: "辅助" },
|
meta: { title: '辅助' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/line",
|
path: '/zh-CN/components/line',
|
||||||
component: () => import("../../docs/zh-CN/components/line.md"),
|
component: () => import('../../docs/zh-CN/components/line.md'),
|
||||||
meta: { title: "分割" },
|
meta: { title: '分割' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/progress",
|
path: '/zh-CN/components/progress',
|
||||||
component: () => import("../../docs/zh-CN/components/progress.md"),
|
component: () => import('../../docs/zh-CN/components/progress.md'),
|
||||||
meta: { title: "进度" },
|
meta: { title: '进度' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/menu",
|
path: '/zh-CN/components/menu',
|
||||||
component: () => import("../../docs/zh-CN/components/menu.md"),
|
component: () => import('../../docs/zh-CN/components/menu.md'),
|
||||||
meta: { title: "菜单" },
|
meta: { title: '菜单' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/timeline",
|
path: '/zh-CN/components/timeline',
|
||||||
component: () => import("../../docs/zh-CN/components/timeline.md"),
|
component: () => import('../../docs/zh-CN/components/timeline.md'),
|
||||||
meta: { title: "时间线" },
|
meta: { title: '时间线' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/collapse",
|
path: '/zh-CN/components/collapse',
|
||||||
component: () => import("../../docs/zh-CN/components/collapse.md"),
|
component: () => import('../../docs/zh-CN/components/collapse.md'),
|
||||||
meta: { title: "折叠面板" },
|
meta: { title: '折叠面板' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/table",
|
path: '/zh-CN/components/table',
|
||||||
component: () => import("../../docs/zh-CN/components/table.md"),
|
component: () => import('../../docs/zh-CN/components/table.md'),
|
||||||
meta: { title: "表格" },
|
meta: { title: '表格' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/avatar",
|
path: '/zh-CN/components/avatar',
|
||||||
component: () => import("../../docs/zh-CN/components/avatar.md"),
|
component: () => import('../../docs/zh-CN/components/avatar.md'),
|
||||||
meta: { title: "头像" },
|
meta: { title: '头像' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/field",
|
path: '/zh-CN/components/field',
|
||||||
component: () => import("../../docs/zh-CN/components/field.md"),
|
component: () => import('../../docs/zh-CN/components/field.md'),
|
||||||
meta: { title: "字段" },
|
meta: { title: '字段' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/empty",
|
path: '/zh-CN/components/empty',
|
||||||
component: () => import("../../docs/zh-CN/components/empty.md"),
|
component: () => import('../../docs/zh-CN/components/empty.md'),
|
||||||
meta: { title: "空" },
|
meta: { title: '空' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/rate",
|
path: '/zh-CN/components/rate',
|
||||||
component: () => import("../../docs/zh-CN/components/rate.md"),
|
component: () => import('../../docs/zh-CN/components/rate.md'),
|
||||||
meta: { title: "评分" },
|
meta: { title: '评分' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/dropdown",
|
path: '/zh-CN/components/dropdown',
|
||||||
component: () => import("../../docs/zh-CN/components/dropdown.md"),
|
component: () => import('../../docs/zh-CN/components/dropdown.md'),
|
||||||
meta: { title: "下拉" },
|
meta: { title: '下拉' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/tab",
|
path: '/zh-CN/components/tab',
|
||||||
component: () => import("../../docs/zh-CN/components/tab.md"),
|
component: () => import('../../docs/zh-CN/components/tab.md'),
|
||||||
meta: { title: "选项卡" },
|
meta: { title: '选项卡' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/iconPicker",
|
path: '/zh-CN/components/iconPicker',
|
||||||
component: () =>
|
component: () =>
|
||||||
import("../../docs/zh-CN/components/iconPicker.md"),
|
import('../../docs/zh-CN/components/iconPicker.md'),
|
||||||
meta: { title: "图标选择" },
|
meta: { title: '图标选择' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/tree",
|
path: '/zh-CN/components/tree',
|
||||||
component: () => import("../../docs/zh-CN/components/tree.md"),
|
component: () => import('../../docs/zh-CN/components/tree.md'),
|
||||||
meta: { title: "树形组件" },
|
meta: { title: '树形组件' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/page",
|
path: '/zh-CN/components/page',
|
||||||
component: () => import("../../docs/zh-CN/components/page.md"),
|
component: () => import('../../docs/zh-CN/components/page.md'),
|
||||||
meta: { title: "分页" },
|
meta: { title: '分页' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/transfer",
|
path: '/zh-CN/components/transfer',
|
||||||
component: () => import("../../docs/zh-CN/components/transfer.md"),
|
component: () => import('../../docs/zh-CN/components/transfer.md'),
|
||||||
meta: { title: "穿梭框" },
|
meta: { title: '穿梭框' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/checkbox",
|
path: '/zh-CN/components/checkbox',
|
||||||
component: () => import("../../docs/zh-CN/components/checkbox.md"),
|
component: () => import('../../docs/zh-CN/components/checkbox.md'),
|
||||||
meta: { title: "复选框" },
|
meta: { title: '复选框' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/radio",
|
path: '/zh-CN/components/radio',
|
||||||
component: () => import("../../docs/zh-CN/components/radio.md"),
|
component: () => import('../../docs/zh-CN/components/radio.md'),
|
||||||
meta: { title: "单选框" },
|
meta: { title: '单选框' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/input",
|
path: '/zh-CN/components/input',
|
||||||
component: () => import("../../docs/zh-CN/components/input.md"),
|
component: () => import('../../docs/zh-CN/components/input.md'),
|
||||||
meta: { title: "输入框" },
|
meta: { title: '输入框' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/inputNumber",
|
path: '/zh-CN/components/inputNumber',
|
||||||
|
component: () => import('../../docs/zh-CN/components/inputNumber.md'),
|
||||||
|
meta: { title: '数字输入框' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/zh-CN/components/textarea',
|
||||||
|
component: () => import('../../docs/zh-CN/components/textarea.md'),
|
||||||
|
meta: { title: '文本域' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/zh-CN/components/switch',
|
||||||
|
component: () => import('../../docs/zh-CN/components/switch.md'),
|
||||||
|
meta: { title: '开关' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/zh-CN/components/slider',
|
||||||
|
component: () => import('../../docs/zh-CN/components/slider.md'),
|
||||||
|
meta: { title: '滑块' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/zh-CN/components/carousel',
|
||||||
|
component: () => import('../../docs/zh-CN/components/carousel.md'),
|
||||||
|
meta: { title: '轮播' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/zh-CN/components/select',
|
||||||
|
component: () => import('../../docs/zh-CN/components/select.md'),
|
||||||
|
meta: { title: '下拉选择' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/zh-CN/components/colorPicker',
|
||||||
component: () =>
|
component: () =>
|
||||||
import("../../docs/zh-CN/components/inputNumber.md"),
|
import('../../docs/zh-CN/components/colorPicker.md'),
|
||||||
meta: { title: "数字输入框" },
|
meta: { title: '颜色选择器' },
|
||||||
|
},{
|
||||||
|
path: '/zh-CN/components/layer',
|
||||||
|
component: () => import('../../docs/zh-CN/components/layer.md'),
|
||||||
|
meta: { title: '简介' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/textarea",
|
path: '/zh-CN/components/tooltip',
|
||||||
component: () => import("../../docs/zh-CN/components/textarea.md"),
|
component: () => import('../../docs/zh-CN/components/tooltip.md'),
|
||||||
meta: { title: "文本域" },
|
meta: { title: '文字提示' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/switch",
|
path: '/zh-CN/components/modal',
|
||||||
component: () => import("../../docs/zh-CN/components/switch.md"),
|
component: () => import('../../docs/zh-CN/components/modal.md'),
|
||||||
meta: { title: "开关" },
|
meta: { title: '弹层' },
|
||||||
|
},{
|
||||||
|
path: '/zh-CN/components/load',
|
||||||
|
component: () => import('../../docs/zh-CN/components/load.md'),
|
||||||
|
meta: { title: '加载' },
|
||||||
|
},{
|
||||||
|
path: '/zh-CN/components/confirm',
|
||||||
|
component: () => import('../../docs/zh-CN/components/confirm.md'),
|
||||||
|
meta: { title: '询问' },
|
||||||
|
},{
|
||||||
|
path: '/zh-CN/components/msg',
|
||||||
|
component: () => import('../../docs/zh-CN/components/msg.md'),
|
||||||
|
meta: { title: '信息' },
|
||||||
|
},{
|
||||||
|
path: '/zh-CN/components/backtop',
|
||||||
|
component: () => import('../../docs/zh-CN/components/backtop.md'),
|
||||||
|
meta: { title: '返回顶部' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/components/slider",
|
path: '/zh-CN/components/countup',
|
||||||
component: () => import("../../docs/zh-CN/components/slider.md"),
|
component: () => import('../../docs/zh-CN/components/countup.md'),
|
||||||
meta: { title: "滑块" },
|
meta: { title: '数字滚动' },
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/carousel",
|
|
||||||
component: () => import("../../docs/zh-CN/components/carousel.md"),
|
|
||||||
meta: { title: "轮播" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/select",
|
|
||||||
component: () => import("../../docs/zh-CN/components/select.md"),
|
|
||||||
meta: { title: "下拉选择" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/colorPicker",
|
|
||||||
component: () =>
|
|
||||||
import("../../docs/zh-CN/components/colorPicker.md"),
|
|
||||||
meta: { title: "颜色选择器" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/layer",
|
|
||||||
component: () => import("../../docs/zh-CN/components/layer.md"),
|
|
||||||
meta: { title: "简介" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/tooltip",
|
|
||||||
component: () => import("../../docs/zh-CN/components/tooltip.md"),
|
|
||||||
meta: { title: "文字提示" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/modal",
|
|
||||||
component: () => import("../../docs/zh-CN/components/modal.md"),
|
|
||||||
meta: { title: "弹层" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/load",
|
|
||||||
component: () => import("../../docs/zh-CN/components/load.md"),
|
|
||||||
meta: { title: "加载" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/confirm",
|
|
||||||
component: () => import("../../docs/zh-CN/components/confirm.md"),
|
|
||||||
meta: { title: "询问" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/msg",
|
|
||||||
component: () => import("../../docs/zh-CN/components/msg.md"),
|
|
||||||
meta: { title: "信息" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/backtop",
|
|
||||||
component: () => import("../../docs/zh-CN/components/backtop.md"),
|
|
||||||
meta: { title: "返回顶部" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/components/countup",
|
|
||||||
component: () => import("../../docs/zh-CN/components/countup.md"),
|
|
||||||
meta: { title: "数字滚动" },
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/hooks",
|
path: '/zh-CN/hooks',
|
||||||
redirect: "/zh-CN/hooks/useStarted",
|
redirect: '/zh-CN/hooks/useStarted',
|
||||||
component: Hooks,
|
component: Hooks,
|
||||||
meta: { title: "hooks" },
|
meta: { title: 'hooks' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/zh-CN/hooks/useStarted",
|
path: '/zh-CN/hooks/useStarted',
|
||||||
component: () => import("../../docs/zh-CN/hooks/useStarted.md"),
|
|
||||||
meta: { title: "useStarted" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/zh-CN/hooks/useClickOutside",
|
|
||||||
component: () =>
|
component: () =>
|
||||||
import("../../docs/zh-CN/hooks/useClickOutside.md"),
|
import('../../docs/zh-CN/hooks/useStarted.md'),
|
||||||
meta: { title: "useClickOutside" },
|
meta: { title: 'useStarted' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/hooks/useFullScreen",
|
path: '/zh-CN/hooks/useClickOutside',
|
||||||
component: () => import("../../docs/zh-CN/hooks/useFullScreen.md"),
|
component: () =>
|
||||||
meta: { title: "useFullScreen" },
|
import('../../docs/zh-CN/hooks/useClickOutside.md'),
|
||||||
|
meta: { title: 'useClickOutside' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/hooks/useMove",
|
path: '/zh-CN/hooks/useFullScreen',
|
||||||
component: () => import("../../docs/zh-CN/hooks/useMove.md"),
|
component: () => import('../../docs/zh-CN/hooks/useFullScreen.md'),
|
||||||
meta: { title: "useMove" },
|
meta: { title: 'useFullScreen' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/hooks/useState",
|
path: '/zh-CN/hooks/useMove',
|
||||||
component: () => import("../../docs/zh-CN/hooks/useState.md"),
|
component: () => import('../../docs/zh-CN/hooks/useMove.md'),
|
||||||
meta: { title: "useState" },
|
meta: { title: 'useMove' },
|
||||||
|
}, {
|
||||||
|
path: '/zh-CN/hooks/useState',
|
||||||
|
component: () => import('../../docs/zh-CN/hooks/useState.md'),
|
||||||
|
meta: { title: 'useState' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/zh-CN/hooks/useBoolean",
|
path: '/zh-CN/hooks/useBoolean',
|
||||||
component: () => import("../../docs/zh-CN/hooks/useBoolean.md"),
|
component: () => import('../../docs/zh-CN/hooks/useBoolean.md'),
|
||||||
meta: { title: "useBoolean" },
|
meta: { title: 'useBoolean' },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
]
|
||||||
|
|
||||||
export default zhCN;
|
export default zhCN
|
@ -37,7 +37,13 @@
|
|||||||
</lay-scroll>
|
</lay-scroll>
|
||||||
</lay-side>
|
</lay-side>
|
||||||
<lay-body>
|
<lay-body>
|
||||||
<div style="padding: 20px; margin-right: 180px">
|
<div
|
||||||
|
style="
|
||||||
|
padding: 20px;
|
||||||
|
margin-right: 180px;
|
||||||
|
transition: margin 240ms 60ms;
|
||||||
|
"
|
||||||
|
>
|
||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
</lay-body>
|
</lay-body>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="site-version">
|
<div class="site-version">
|
||||||
<span>当前版本:v<cite class="site-showv">0.3.1</cite></span>
|
<span>当前版本:v<cite class="site-showv">0.3.2</cite></span>
|
||||||
<span
|
<span
|
||||||
><router-link
|
><router-link
|
||||||
class="layui-inline site-down"
|
class="layui-inline site-down"
|
||||||
@ -34,7 +34,7 @@
|
|||||||
>更新日志</router-link
|
>更新日志</router-link
|
||||||
></span
|
></span
|
||||||
>
|
>
|
||||||
<span>下载量:<em class="site-showdowns">2324</em></span>
|
<span>下载量:<em class="site-showdowns">3124</em></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="site-banner-other">
|
<div class="site-banner-other">
|
||||||
@ -44,7 +44,7 @@
|
|||||||
rel="nofollow"
|
rel="nofollow"
|
||||||
class="site-star"
|
class="site-star"
|
||||||
>
|
>
|
||||||
<i class="layui-icon"></i> Star <cite id="getStars">521</cite>
|
<i class="layui-icon"></i> Star <cite id="getStars">544</cite>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="https://gitee.com/layui-vue"
|
href="https://gitee.com/layui-vue"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@layui/layui-vue",
|
"name": "@layui/layui-vue",
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"author": "sleeprite",
|
"author": "sleeprite",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "a component library for Vue 3 base on layui-vue",
|
"description": "a component library for Vue 3 base on layui-vue",
|
||||||
@ -28,13 +28,12 @@
|
|||||||
"build:example": "vite build example",
|
"build:example": "vite build example",
|
||||||
"lint:eslint": "eslint 'src/**/*.{vue,ts,tsx}' --fix",
|
"lint:eslint": "eslint 'src/**/*.{vue,ts,tsx}' --fix",
|
||||||
"lint:prettier": "prettier --write 'src/**/*'",
|
"lint:prettier": "prettier --write 'src/**/*'",
|
||||||
"publish": "npm run build && npm publish --access=public",
|
|
||||||
"commit": "git cz"
|
"commit": "git cz"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@layui/hooks-vue": "^0.1.6",
|
"@layui/hooks-vue": "^0.1.6",
|
||||||
"@layui/icons-vue": "^1.0.2",
|
"@layui/icons-vue": "^1.0.2",
|
||||||
"@layui/layer-vue": "^1.2.2",
|
"@layui/layer-vue": "^1.2.4",
|
||||||
"async-validator": "^4.0.7",
|
"async-validator": "^4.0.7",
|
||||||
"countup.js": "^2.0.8",
|
"countup.js": "^2.0.8",
|
||||||
"evtd": "^0.2.3",
|
"evtd": "^0.2.3",
|
||||||
|
@ -2844,6 +2844,25 @@ body .layui-table-tips .layui-layer-content {
|
|||||||
color: #5fb878;
|
color: #5fb878;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-show.layui-anim-upbit .layui-show.layui-anim-upbit {
|
||||||
|
top: 0px;
|
||||||
|
left: 106px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-show.layui-anim-upbit .layui-nav-item {
|
||||||
|
display: block;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-show.layui-anim-upbit .layui-nav-item.layui-this {
|
||||||
|
background-color: whitesmoke;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-show.layui-anim-upbit .layui-nav-item.layui-this:after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.layui-nav {
|
.layui-nav {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
@ -2868,7 +2887,7 @@ body .layui-table-tips .layui-layer-content {
|
|||||||
|
|
||||||
.layui-nav .layui-nav-item a {
|
.layui-nav .layui-nav-item a {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 0 20px;
|
padding: 0 30px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
color: rgba(255, 255, 255, 0.7);
|
color: rgba(255, 255, 255, 0.7);
|
||||||
-webkit-transition: all 0.3s;
|
-webkit-transition: all 0.3s;
|
||||||
@ -2881,7 +2900,7 @@ body .layui-table-tips .layui-layer-content {
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 5px;
|
height: 3px;
|
||||||
background-color: #5fb878;
|
background-color: #5fb878;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
-webkit-transition: all 0.2s;
|
-webkit-transition: all 0.2s;
|
||||||
@ -2917,7 +2936,7 @@ body .layui-table-tips .layui-layer-content {
|
|||||||
.layui-nav .layui-nav-more {
|
.layui-nav .layui-nav-more {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 3px;
|
right: 8px;
|
||||||
left: auto !important;
|
left: auto !important;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
font-size: 12.5px !important;
|
font-size: 12.5px !important;
|
||||||
@ -2988,13 +3007,13 @@ body .layui-table-tips .layui-layer-content {
|
|||||||
.layui-nav-tree .layui-nav-item {
|
.layui-nav-tree .layui-nav-item {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 40px;
|
line-height: 42px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-nav-tree .layui-nav-item a {
|
.layui-nav-tree .layui-nav-item a {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 46px;
|
height: 42px;
|
||||||
line-height: 46px;
|
line-height: 42px;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -6,7 +6,7 @@ import "@layui/layer-vue/lib/index.css";
|
|||||||
import "@layui/icons-vue/lib/index.css";
|
import "@layui/icons-vue/lib/index.css";
|
||||||
import { layer } from "@layui/layer-vue";
|
import { layer } from "@layui/layer-vue";
|
||||||
|
|
||||||
import LayModal from "./module/layer/modal/index";
|
import LayLayer from "./module/layer/index";
|
||||||
import LayBacktop from "./module/backTop/index";
|
import LayBacktop from "./module/backTop/index";
|
||||||
import LayAvatar from "./module/avatar/index";
|
import LayAvatar from "./module/avatar/index";
|
||||||
import LayRadio from "./module/radio/index";
|
import LayRadio from "./module/radio/index";
|
||||||
@ -40,7 +40,6 @@ import LayContainer from "./module/container/index";
|
|||||||
import LayCountUp from "./module/countUp/index";
|
import LayCountUp from "./module/countUp/index";
|
||||||
import LayMenu from "./module/menu/index";
|
import LayMenu from "./module/menu/index";
|
||||||
import LayMenuItem from "./module/menuItem/index";
|
import LayMenuItem from "./module/menuItem/index";
|
||||||
import LayMenuChildItem from "./module/menuChildItem/index";
|
|
||||||
import LayCheckbox from "./module/checkbox/index";
|
import LayCheckbox from "./module/checkbox/index";
|
||||||
import LayCheckboxGroup from "./module/checkboxGroup/index";
|
import LayCheckboxGroup from "./module/checkboxGroup/index";
|
||||||
import LayForm from "./module/form/index";
|
import LayForm from "./module/form/index";
|
||||||
@ -103,7 +102,6 @@ const components: Record<string, IDefineComponent> = {
|
|||||||
LayContainer,
|
LayContainer,
|
||||||
LayMenu,
|
LayMenu,
|
||||||
LayMenuItem,
|
LayMenuItem,
|
||||||
LayMenuChildItem,
|
|
||||||
LayCheckbox,
|
LayCheckbox,
|
||||||
LayForm,
|
LayForm,
|
||||||
LayBreadcrumb,
|
LayBreadcrumb,
|
||||||
@ -130,7 +128,7 @@ const components: Record<string, IDefineComponent> = {
|
|||||||
LayCarousel,
|
LayCarousel,
|
||||||
LayCarouselItem,
|
LayCarouselItem,
|
||||||
LayColorPicker,
|
LayColorPicker,
|
||||||
LayModal,
|
LayLayer,
|
||||||
LayTooltip,
|
LayTooltip,
|
||||||
LayInputNumber,
|
LayInputNumber,
|
||||||
LaySkeleton,
|
LaySkeleton,
|
||||||
@ -184,7 +182,6 @@ export {
|
|||||||
LayContainer,
|
LayContainer,
|
||||||
LayMenu,
|
LayMenu,
|
||||||
LayMenuItem,
|
LayMenuItem,
|
||||||
LayMenuChildItem,
|
|
||||||
LayCheckbox,
|
LayCheckbox,
|
||||||
LayForm,
|
LayForm,
|
||||||
LayBreadcrumb,
|
LayBreadcrumb,
|
||||||
@ -211,7 +208,7 @@ export {
|
|||||||
LayCarousel,
|
LayCarousel,
|
||||||
LayCarouselItem,
|
LayCarouselItem,
|
||||||
LayColorPicker,
|
LayColorPicker,
|
||||||
LayModal,
|
LayLayer
|
||||||
};
|
};
|
||||||
|
|
||||||
export { layer };
|
export { layer };
|
||||||
|
9
src/module/layer/index.ts
Normal file
9
src/module/layer/index.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import type { App } from "vue";
|
||||||
|
import { LayLayer } from "@layui/layer-vue";
|
||||||
|
import type { IDefineComponent } from "../type/index";
|
||||||
|
|
||||||
|
LayLayer.install = (app: App) => {
|
||||||
|
app.component(LayLayer.name || "LayLayer", LayLayer);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LayLayer as IDefineComponent;
|
@ -1,9 +0,0 @@
|
|||||||
import type { App } from "vue";
|
|
||||||
import { LayModal } from "@layui/layer-vue";
|
|
||||||
import type { IDefineComponent } from "../../type/index";
|
|
||||||
|
|
||||||
LayModal.install = (app: App) => {
|
|
||||||
app.component(LayModal.name || "LayModal", LayModal);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default LayModal as IDefineComponent;
|
|
@ -1,9 +0,0 @@
|
|||||||
import type { App } from "vue";
|
|
||||||
import Component from "./index.vue";
|
|
||||||
import type { IDefineComponent } from "../type/index";
|
|
||||||
|
|
||||||
Component.install = (app: App) => {
|
|
||||||
app.component(Component.name || "LayMenuChildItem", Component);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Component as IDefineComponent;
|
|
@ -1,25 +0,0 @@
|
|||||||
<template>
|
|
||||||
<dd :class="[selectedKey === id ? 'layui-this' : '']" @click="selectHandle()">
|
|
||||||
<slot v-if="slots.title" name="title"></slot>
|
|
||||||
<a v-else href="javascript:void(0)">
|
|
||||||
{{ title }}
|
|
||||||
</a>
|
|
||||||
</dd>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="LayMenuChildItem" lang="ts">
|
|
||||||
import { defineProps, inject, Ref, useSlots } from "vue";
|
|
||||||
|
|
||||||
const slots = useSlots();
|
|
||||||
|
|
||||||
const props = defineProps<{
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
const selectedKey: Ref<string> = inject("selectedKey") as Ref<string>;
|
|
||||||
|
|
||||||
const selectHandle = function () {
|
|
||||||
selectedKey.value = props.id;
|
|
||||||
};
|
|
||||||
</script>
|
|
Loading…
x
Reference in New Issue
Block a user