升级 layer-vue 1.1.0
This commit is contained in:
parent
debdc84b25
commit
888f5e797f
@ -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 手动关闭
|
::: title 手动关闭
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -48,7 +76,7 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button-container>
|
<lay-button-container>
|
||||||
<lay-button @click="loading" type="primary">加载</lay-button>
|
<lay-button @click="loading" type="primary">关闭消息</lay-button>
|
||||||
</lay-button-container>
|
</lay-button-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -3,6 +3,33 @@
|
|||||||
|
|
||||||
::: demo
|
::: 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>
|
<template>
|
||||||
<lay-button type="primary" @click="openSuccess">成功消息</lay-button>
|
<lay-button type="primary" @click="openSuccess">成功消息</lay-button>
|
||||||
<lay-button type="primary" @click="openFailure">失败消息</lay-button>
|
<lay-button type="primary" @click="openFailure">失败消息</lay-button>
|
||||||
|
@ -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.9",
|
"@layui/layer-vue": "^1.1.0",
|
||||||
"@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.9",
|
"@layui/layer-vue": "^1.1.0",
|
||||||
"@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…
x
Reference in New Issue
Block a user