升级 layer-vue 1.1.0

This commit is contained in:
就眠儀式 2021-12-08 17:40:28 +08:00
parent debdc84b25
commit 888f5e797f
3 changed files with 58 additions and 3 deletions

View File

@ -41,6 +41,34 @@ export default {
:::
::: title 其他方式
:::
::: demo
<template>
<lay-button type="primary" @click="openLoading">加载消息</lay-button>
</template>
<script>
import { layer } from "../../../../src/index.ts"
export default {
setup() {
const openLoading = function() {
layer.msg("加载中...", { icon : 16, time: 1000})
}
return {
openLoading
}
}
}
</script>
:::
::: title 手动关闭
:::
@ -48,7 +76,7 @@ export default {
<template>
<lay-button-container>
<lay-button @click="loading" type="primary">加载</lay-button>
<lay-button @click="loading" type="primary">关闭消息</lay-button>
</lay-button-container>
</template>

View File

@ -3,6 +3,33 @@
::: demo
<template>
<lay-button type="primary" @click="openMsg">普通消息</lay-button>
</template>
<script>
import { layer } from "../../../../src/index.ts"
export default {
setup() {
const openMsg = function() {
layer.msg("普通消息", { time: 1000 })
}
return {
openMsg
}
}
}
</script>
:::
::: title 指定图标
:::
::: demo
<template>
<lay-button type="primary" @click="openSuccess">成功消息</lay-button>
<lay-button type="primary" @click="openFailure">失败消息</lay-button>

View File

@ -30,14 +30,14 @@
"peerDependencies": {
"vue": "^3.2.24",
"vue-router": "^4.0.12",
"@layui/layer-vue": "^1.0.9",
"@layui/layer-vue": "^1.1.0",
"@layui/icons-vue": "^1.0.0",
"@layui/hooks-vue": "^0.1.6"
},
"dependencies": {
"vue": "^3.2.24",
"vue-router": "^4.0.12",
"@layui/layer-vue": "^1.0.9",
"@layui/layer-vue": "^1.1.0",
"@layui/icons-vue": "^1.0.0",
"@layui/hooks-vue": "^0.1.6"
},