补充 layer.msg 文档
This commit is contained in:
parent
4708732d6e
commit
debdc84b25
@ -14,7 +14,7 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
const openConfirm1 = function() {
|
const openConfirm1 = function() {
|
||||||
layer.confirm("你没事吧???")
|
layer.confirm("layui-vue 1.0.0 已经发布")
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -42,7 +42,7 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
const openConfirm2 = function() {
|
const openConfirm2 = function() {
|
||||||
layer.confirm("你没事吧???", {btn: [{text:'确认'},{text:'取消'}]})
|
layer.confirm("你如何看待 layui-vue 的发布", {btn: [{text:'站着看'},{text:'坐着看'}]})
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
47
example/docs/zh-CN/components/msg.md
Normal file
47
example/docs/zh-CN/components/msg.md
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
::: title 基础使用
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: demo
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<lay-button type="primary" @click="openSuccess">成功消息</lay-button>
|
||||||
|
<lay-button type="primary" @click="openFailure">失败消息</lay-button>
|
||||||
|
<lay-button type="primary" @click="openWarning">警告消息</lay-button>
|
||||||
|
<lay-button type="primary" @click="openPrimary">详情消息</lay-button>
|
||||||
|
<lay-button type="primary" @click="openLoading">加载消息</lay-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { layer } from "../../../../src/index.ts"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
|
||||||
|
const openSuccess = function() {
|
||||||
|
layer.msg("成功消息", { icon : 1, time: 1000})
|
||||||
|
}
|
||||||
|
|
||||||
|
const openFailure = function() {
|
||||||
|
layer.msg("失败消息", { icon : 2, time: 1000})
|
||||||
|
}
|
||||||
|
|
||||||
|
const openWarning = function() {
|
||||||
|
layer.msg("警告消息", { icon : 3, time: 1000})
|
||||||
|
}
|
||||||
|
|
||||||
|
const openPrimary = function() {
|
||||||
|
layer.msg("详情消息", { icon : 4, time: 1000})
|
||||||
|
}
|
||||||
|
|
||||||
|
const openLoading = function() {
|
||||||
|
layer.msg("加载消息", { icon : 16, time: 1000})
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
openSuccess, openFailure, openWarning, openPrimary, openLoading
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
:::
|
@ -274,7 +274,11 @@ const zhCN = [
|
|||||||
},{
|
},{
|
||||||
path: '/zh-CN/components/confirm',
|
path: '/zh-CN/components/confirm',
|
||||||
component: () => import('../../docs/zh-CN/components/confirm.md'),
|
component: () => import('../../docs/zh-CN/components/confirm.md'),
|
||||||
meta: { title: '确认' },
|
meta: { title: '询问' },
|
||||||
|
},{
|
||||||
|
path: '/zh-CN/components/msg',
|
||||||
|
component: () => import('../../docs/zh-CN/components/msg.md'),
|
||||||
|
meta: { title: '信息' },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -334,19 +334,24 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: 90,
|
id: 90,
|
||||||
title: '模态窗',
|
title: '弹层',
|
||||||
subTitle: 'modal',
|
subTitle: 'modal',
|
||||||
path: '/zh-CN/components/modal',
|
path: '/zh-CN/components/modal',
|
||||||
},{
|
},{
|
||||||
id: 90,
|
id: 91,
|
||||||
title: '加载层',
|
title: '加载',
|
||||||
subTitle: 'modal',
|
subTitle: 'modal',
|
||||||
path: '/zh-CN/components/load',
|
path: '/zh-CN/components/load',
|
||||||
},{
|
},{
|
||||||
id: 90,
|
id: 92,
|
||||||
title: '询问框',
|
title: '询问',
|
||||||
subTitle: 'confirm',
|
subTitle: 'confirm',
|
||||||
path: '/zh-CN/components/confirm',
|
path: '/zh-CN/components/confirm',
|
||||||
|
},{
|
||||||
|
id: 93,
|
||||||
|
title: '消息',
|
||||||
|
subTitle: 'msg',
|
||||||
|
path: '/zh-CN/components/msg',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -30,14 +30,14 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.2.24",
|
"vue": "^3.2.24",
|
||||||
"vue-router": "^4.0.12",
|
"vue-router": "^4.0.12",
|
||||||
"@layui/layer-vue": "^1.0.8",
|
"@layui/layer-vue": "^1.0.9",
|
||||||
"@layui/icons-vue": "^1.0.0",
|
"@layui/icons-vue": "^1.0.0",
|
||||||
"@layui/hooks-vue": "^0.1.6"
|
"@layui/hooks-vue": "^0.1.6"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.2.24",
|
"vue": "^3.2.24",
|
||||||
"vue-router": "^4.0.12",
|
"vue-router": "^4.0.12",
|
||||||
"@layui/layer-vue": "^1.0.8",
|
"@layui/layer-vue": "^1.0.9",
|
||||||
"@layui/icons-vue": "^1.0.0",
|
"@layui/icons-vue": "^1.0.0",
|
||||||
"@layui/hooks-vue": "^0.1.6"
|
"@layui/hooks-vue": "^0.1.6"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user