This commit is contained in:
2022-12-09 16:41:41 +08:00
parent c1cce5a7c2
commit ff7aa8774f
2003 changed files with 156639 additions and 140 deletions

View File

@@ -0,0 +1,35 @@
@media screen and (max-width:768px) {
#app > .layui-layout > .layui-header > .layui-logo {
display: none;
}
#app > .layui-layout > .layui-header > .layui-layout-right {
display: none;
}
#app > .layui-layout > .layui-header > .layui-layout-left {
display: none;
}
#app > .layui-layout > .layui-layout > .layui-side {
display: none;
}
#app > .layui-layout > .layui-layout > .layui-body {
width: 100%;
left: 0px;
}
#app > .layui-layout > .layui-layout > .layui-body > div {
padding: 10px!important;
margin-right: 0px!important;
width: calc(100% - 20px)!important;
}
#app > .layui-layout > .layui-layout > .layui-body .lay-aside {
display: none;
}
#app > .layui-layout .site-banner {
background-size: 100% 100%;
}
#app > .layui-layout .link-list {
padding: 20px 0px;
}
#app > .layui-layout .box-list {
padding: 30px 30px;
}
}

View File

@@ -0,0 +1,71 @@
import { w as withInstall } from "../badge/index2.js";
import { defineComponent, openBlock, createBlock, withCtx, createVNode, renderSlot, createSlots, unref } from "vue";
import { _ as _sfc_main$1 } from "../dropdown/index2.js";
import { L as LayDropdownMenu } from "../dropdownMenu/index2.js";
import { _ as _sfc_main$2 } from "../dropdownMenuItem/index2.js";
import { _ as _sfc_main$2E } from "../checkbox/index2.js";
import "../_chunks/@vueuse/index.js";
const __default__ = {
name: "LayDropdownSubMenu"
};
const _sfc_main = defineComponent({
...__default__,
props: {
trigger: { default: "hover" },
placement: { default: "right-start" },
disabled: { type: Boolean, default: false },
contentOffset: { default: 2 }
},
setup(__props) {
return (_ctx, _cache) => {
return openBlock(), createBlock(_sfc_main$1, {
trigger: __props.trigger,
placement: __props.placement,
"auto-fit-min-width": false,
contentOffset: __props.contentOffset,
disabled: __props.disabled,
updateAtScroll: ""
}, {
content: withCtx(() => [
createVNode(LayDropdownMenu, null, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "content")
]),
_: 3
})
]),
default: withCtx(() => [
createVNode(_sfc_main$2, { disabled: __props.disabled }, createSlots({
suffix: withCtx(() => [
renderSlot(_ctx.$slots, "suffix", {}, () => [
createVNode(unref(_sfc_main$2E), {
type: "layui-icon-right",
size: "14px"
})
])
]),
_: 2
}, [
_ctx.$slots.prefix ? {
name: "prefix",
fn: withCtx(() => [
renderSlot(_ctx.$slots, "prefix")
]),
key: "0"
} : void 0,
_ctx.$slots.default ? {
name: "default",
fn: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
key: "1"
} : void 0
]), 1032, ["disabled"])
]),
_: 3
}, 8, ["trigger", "placement", "contentOffset", "disabled"]);
};
}
});
const component = withInstall(_sfc_main);
export { component as default };

View File

@@ -0,0 +1 @@
export declare type SelectSize = "lg" | "md" | "sm" | "xs";

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,48 @@
import { w as withInstall } from "../badge/index2.js";
import { defineComponent, getCurrentInstance, useSlots, inject, reactive, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from "vue";
const TabInjectKey = Symbol("layuiTab");
const __default__ = {
name: "LayTabItem"
};
const _sfc_main = defineComponent({
...__default__,
props: {
id: null,
title: null,
icon: null,
closable: { type: [Boolean, String], default: true }
},
setup(__props) {
var _a;
const props = __props;
const instance = getCurrentInstance();
const slots = useSlots();
const active = inject("active");
const tabsCtx = inject(TabInjectKey, {});
const data = reactive({
id: props.id,
title: props.title,
icon: props.icon,
closable: props.closable,
slots
});
if (instance == null ? void 0 : instance.uid) {
(_a = tabsCtx.addItem) == null ? void 0 : _a.call(tabsCtx, props.id, data);
}
onBeforeUnmount(() => {
var _a2;
if (instance == null ? void 0 : instance.uid) {
(_a2 = tabsCtx.removeItem) == null ? void 0 : _a2.call(tabsCtx, props.id);
}
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(["layui-tab-item", [unref(active) === __props.id ? "layui-show" : ""]])
}, [
renderSlot(_ctx.$slots, "default")
], 2);
};
}
});
const component = withInstall(_sfc_main);
export { TabInjectKey as T, _sfc_main as _, component as c };

View File

@@ -0,0 +1,140 @@
::: anchor
:::
::: title 基本介绍
:::
::: describe 页面正在渲染过程时,合适的加载动效会有效缓解用户的焦虑。
:::
::: title 基础使用
:::
::: demo 使用 layer.load(type, options) 方法创建一个加载层, `type` 属性用于设置弹出层类型。
<template>
<lay-button-container>
<lay-button @click="loading0" type="primary">加载一</lay-button>
<lay-button @click="loading1" type="primary">加载二</lay-button>
<lay-button @click="loading2" type="primary">加载三</lay-button>
</lay-button-container>
</template>
<script>
import { ref } from 'vue'
import { layer } from "@layui/layer-vue"
export default {
setup() {
const loading0 = function() {
layer.load(0, {time: 3000})
}
const loading1 = function() {
layer.load(1, {time: 3000})
}
const loading2 = function() {
layer.load(2, {time: 3000})
}
return {
loading0,
loading1,
loading2,
}
}
}
</script>
:::
::: title 其他方式
:::
::: demo 使用 `layer.msg` 方法, 设置 `icon` 为 16, 弹出一个带有加载动画的提示信息。
<template>
<lay-button type="primary" @click="openLoading">加载消息</lay-button>
</template>
<script>
import { layer } from "@layui/layer-vue"
export default {
setup() {
const openLoading = function() {
layer.msg("加载中...", { icon : 16, time: 1000})
}
return {
openLoading
}
}
}
</script>
:::
::: title 手动关闭
:::
::: demo 通过 `layer.close()` 方法来关闭一个正在加载的实例。
<template>
<lay-button-container>
<lay-button @click="loading" type="primary">关闭消息</lay-button>
</lay-button-container>
</template>
<script>
import { ref } from 'vue'
import { layer } from "@layui/layer-vue"
export default {
setup() {
const loading = function() {
let id = layer.load(0)
setTimeout(() => {
layer.close(id)
},3000)
}
return {
loading
}
}
}
</script>
:::
::: title 组件方法
:::
```
layer.load(load, options)
```
::: title 组件属性
:::
::: table
| 属性 | 描述 | 备注 |
| ------------------- | ------ | ---- |
| load | 组件类型 | `1` `2` `3` |
| options | 选配属性 | { time: 加载时长 } |
:::
::: contributor load
:::
::: previousNext load
:::

View File

@@ -0,0 +1,3 @@
x<01><><EFBFBD>n<EFBFBD>0 E<><45>WdoT#<23>L<EFBFBD>&e_<65><5F>,<2C>q<EFBFBD><71> 6<><36>
⥊d_<><5F><EFBFBD><EFBFBD>زUݼ= B<><42>k<EFBFBD><18><><EFBFBD>=:<3A>t<>|<7C>I<><49><EFBFBD>9<EFBFBD>&<10><><EFBFBD><EFBFBD>=<3D>Z$<24><><EFBFBD>T0<><7F><16><><EFBFBD>li<6C>a<04>z<EFBFBD>
<EFBFBD><EFBFBD>O3<EFBFBD>4yXi<>8<EFBFBD>:P<><50><EFBFBD><EFBFBD><06><>|j<><6A>2N<><4E>