更新 layer 文档, 整理更新日志
This commit is contained in:
		
							parent
							
								
									9f0bec1339
								
							
						
					
					
						commit
						aec3db3503
					
				@ -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       | 关闭回调      | --             |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:::
 | 
					:::
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -11,7 +11,20 @@
 | 
				
			|||||||
<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-1"> </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>[修复] layer.close layer.closeAll 函数无法触发 OutAnim 过度动画问题。</li>
 | 
				
			||||||
 | 
					          <li>[升级] layer-vue 1.2.3。</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> 
 | 
				
			||||||
 | 
				
			|||||||
@ -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";
 | 
				
			||||||
@ -128,7 +128,7 @@ const components: Record<string, IDefineComponent> = {
 | 
				
			|||||||
  LayCarousel,
 | 
					  LayCarousel,
 | 
				
			||||||
  LayCarouselItem,
 | 
					  LayCarouselItem,
 | 
				
			||||||
  LayColorPicker,
 | 
					  LayColorPicker,
 | 
				
			||||||
  LayModal,
 | 
					  LayLayer,
 | 
				
			||||||
  LayTooltip,
 | 
					  LayTooltip,
 | 
				
			||||||
  LayInputNumber,
 | 
					  LayInputNumber,
 | 
				
			||||||
  LaySkeleton,
 | 
					  LaySkeleton,
 | 
				
			||||||
@ -205,7 +205,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;
 | 
					 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user