提交 8baa9d56 作者: 方治民

feat: 添加应用维护全屏通知示例

上级 98491b1e
......@@ -7,6 +7,7 @@
page: string
type?: 'link' | 'bottom'
animationType?: Pages.AnimationType
before?: () => void
event?: () => void
}
......@@ -42,13 +43,24 @@
{
name: '应用维护全屏通知',
icon: 'twemoji-laptop',
page: '/pages/common/repair/index',
page: '/pages/common/notice/index',
animationType: 'fade-in',
before() {
if (getApp().globalData.notice) {
getApp().globalData.notice.id = Date.now()
getApp().globalData.notice.confirmed = false
getApp().globalData.notice.buttons = ['confirm', 'exit']
}
},
},
],
})
function to(item: Item) {
if (item.before) {
item.before?.()
}
if (item.type === 'bottom') {
item.event?.()
return
......
......@@ -16,6 +16,7 @@ const ICONS = [
'emojione:letter-z',
'emojione:robot-face',
'emojione:cowboy-hat-face',
'twemoji:laptop',
]
export default defineConfig({
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论