📝: 更新文档
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
::: title 基本介绍
|
||||
:::
|
||||
|
||||
::: describe 需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 Modal 在当前页面正中打开一个浮层,承载相应的操作。
|
||||
::: describe 需要用户处理事务,又不希望跳转页面以致打断工作流程时,承载相应的操作。
|
||||
:::
|
||||
|
||||
::: title 基本使用
|
||||
|
||||
@@ -52,7 +52,7 @@ import { layer } from "@layui/layer-vue"
|
||||
export default {
|
||||
setup() {
|
||||
const openSuccess = function() {
|
||||
layer.msg("成功消息", { icon : 1, time: 100000})
|
||||
layer.msg("成功消息", { icon : 1, time: 1000})
|
||||
}
|
||||
const openFailure = function() {
|
||||
layer.msg("失败消息", { icon : 2, time: 1000})
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
::: anchor
|
||||
:::
|
||||
|
||||
::: title 基本介绍
|
||||
:::
|
||||
|
||||
::: describe 全局展示通知提醒信息。
|
||||
:::
|
||||
|
||||
::: title 基础使用
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-row :space="30" >
|
||||
<lay-col :span="24">
|
||||
<lay-button type="primary" @click="baseNotifiy">右上位置</lay-button>
|
||||
<lay-button type="primary" @click="baseNotifiyRB">右下位置</lay-button>
|
||||
<lay-button type="primary" @click="baseNotifiyLT">左上位置</lay-button>
|
||||
<lay-button type="primary" @click="baseNotifiyLB">左下位置</lay-button>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { layer } from "@layui/layer-vue"
|
||||
|
||||
const baseNotifiy = function() {
|
||||
layer.notifiy({
|
||||
title:"这是标题",
|
||||
content:"默认就是右上,也是用得最多的"
|
||||
})
|
||||
}
|
||||
const baseNotifiyRB = function() {
|
||||
layer.notifiy({
|
||||
title:"这是标题",
|
||||
content:"我出现在右下",
|
||||
offset:'rb',
|
||||
})
|
||||
}
|
||||
const baseNotifiyLT = function() {
|
||||
layer.notifiy({
|
||||
title:"这是标题",
|
||||
content:"我出现在左上",
|
||||
offset:'lt',
|
||||
})
|
||||
}
|
||||
const baseNotifiyLB = function() {
|
||||
layer.notifiy({
|
||||
title:"这是标题",
|
||||
content:"我出现在左下",
|
||||
offset:'lb',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 指定图标
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-row :space="30" >
|
||||
<lay-col :span="24">
|
||||
<lay-button type="primary" @click="NotifiySuccess">成功通知</lay-button>
|
||||
<lay-button type="primary" @click="NotifiyFailure">失败通知</lay-button>
|
||||
<lay-button type="primary" @click="NotifiyWarm">警告通知</lay-button>
|
||||
<lay-button type="primary" @click="NotifiyInfo">锁定通知</lay-button>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { layer } from "@layui/layer-vue"
|
||||
|
||||
const NotifiySuccess=function(){
|
||||
layer.notifiy({
|
||||
title:"Success",
|
||||
content:"默认就是右上,也是用得最多的",
|
||||
icon:1
|
||||
})
|
||||
}
|
||||
const NotifiyFailure=function(){
|
||||
layer.notifiy({
|
||||
title:"Error",
|
||||
content:"默认就是右上,也是用得最多的",
|
||||
icon:2
|
||||
})
|
||||
}
|
||||
const NotifiyWarm=function(){
|
||||
layer.notifiy({
|
||||
title:"Warming",
|
||||
content:"默认就是右上,也是用得最多的",
|
||||
icon:3
|
||||
})
|
||||
}
|
||||
const NotifiyInfo=function(){
|
||||
layer.notifiy({
|
||||
title:"Question",
|
||||
content:"默认就是右上,也是用得最多的",
|
||||
icon:4
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 组件方法
|
||||
:::
|
||||
|
||||
```
|
||||
layer.notifiy(options)
|
||||
```
|
||||
|
||||
::: title 组件属性
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 属性 | 描述 | 备注 |
|
||||
| ------------------- | ------ | ----|
|
||||
| options | 选配属性 | { time: 加载时长, icon: 图标 } |
|
||||
|
||||
:::
|
||||
|
||||
::: contributor msg
|
||||
:::
|
||||
|
||||
::: previousNext msg
|
||||
:::
|
||||
@@ -0,0 +1,66 @@
|
||||
::: anchor
|
||||
:::
|
||||
|
||||
::: title 基本介绍
|
||||
:::
|
||||
|
||||
::: describe 预览图片。
|
||||
:::
|
||||
|
||||
::: title 指定图标
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-button @click="signleImg">图片查看</lay-button>
|
||||
<lay-button @click="signleImg2">图片标题</lay-button>
|
||||
<lay-button @click="groupImg">图片分组</lay-button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { layer } from "@layui/layui-vue"
|
||||
|
||||
const signleImg = function() {
|
||||
layer.photos("http://www.pearadmin.com/assets/images/un1.svg")
|
||||
}
|
||||
const signleImg2 = function() {
|
||||
layer.photos({
|
||||
imgList:[{src:'http://www.pearadmin.com/assets/images/un2.svg',alt:'layer for vue'}]
|
||||
})
|
||||
}
|
||||
const groupImg = function() {
|
||||
layer.photos({
|
||||
imgList:[
|
||||
{ src:'http://www.pearadmin.com/assets/images/un8.svg', alt:'图片1'},
|
||||
{ src:'http://www.pearadmin.com/assets/images/un32.svg', alt:'图片2'}
|
||||
]
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 组件方法
|
||||
:::
|
||||
|
||||
```
|
||||
layer.photos(options)
|
||||
```
|
||||
|
||||
::: title 组件属性
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 属性 | 描述 | 备注 |
|
||||
| ------------------- | ------ | ----|
|
||||
| options | 选配属性 | { time: 加载时长, icon: 图标 } |
|
||||
|
||||
:::
|
||||
|
||||
::: contributor msg
|
||||
:::
|
||||
|
||||
::: previousNext msg
|
||||
:::
|
||||
Reference in New Issue
Block a user