chore: 修改生命周期函数

This commit is contained in:
就眠儀式
2022-02-20 22:15:59 +08:00
parent 8e85bf818c
commit 8819a4845e
4 changed files with 2 additions and 54 deletions

View File

@@ -15,9 +15,8 @@ import { layer } from "@layui/layer-vue"
export default {
setup() {
const openMsg = function() {
layer.msg("普通消息", { time: 100000 })
layer.msg("普通消息", { time: 1000 })
}
return {
openMsg
@@ -46,27 +45,21 @@ import { layer } from "@layui/layer-vue"
export default {
setup() {
const openSuccess = function() {
layer.msg("成功消息", { icon : 1, time: 100000})
}
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
}