//- 服务器反馈UI include @/helper/helper.pug if flash .message-container - index = 0 if flash.error each item in flash.error - index++ .message.is-danger.animate__animated.animate__slideInRight(id="message"+index) .message-header p 错误 button.delete.messagec(aria-label='delete' data-target="message"+index) .message-body | #{item} if flash.success each item in flash.success - index++ .message.is-success.animate__animated.animate__slideInRight(id="message"+index) .message-header p 成功 button.delete.messagec(aria-label='delete' data-target="message"+index) .message-body | #{item} if flash.info each item in flash.info - index++ .message.is-info.animate__animated.animate__slideInRight(id="message"+index) .message-header p 信息 button.delete.messagec(aria-label='delete' data-target="message"+index) .message-body | #{item} if flash.warning each item in flash.warning - index++ .message.is-warning.animate__animated.animate__slideInRight(id="message"+index) .message-header p 警告 button.delete.messagec(aria-label='delete' data-target="message"+index) .message-body | #{item} //- .toast-container.top-0.end-0.p-3 //- each item in flash.error //- .toast.show(role='alert', aria-live='assertive', aria-atomic='true') //- .toast-header //- img.rounded.me-2(src='/public/image/icons/error.svg', alt='错误' style="width:20px;height: 20px;") //- strong.me-auto 提示 //- //- small.text-muted just now //- button.btn-close(type='button', data-bs-dismiss='toast', aria-label='Close') //- .toast-body. //- #{item} //- .toast-container.position-fixed.bottom-0.end-0.p-3 //- #liveToast.toast(role='alert', aria-live='assertive', aria-atomic='true') //- .toast-header //- img.rounded.me-2(src='...', alt='...') //- strong.me-auto Bootstrap //- small 11 mins ago //- button.btn-close(type='button', data-bs-dismiss='toast', aria-label='Close') //- .toast-body. //- Hello, world! This is a toast message. //- ul //- each item in flash.error //- li #{item} +script("js/common/flush.js")