import pMinDelay from 'p-min-delay' const el = document.getElementById('loading') export const close = async () => { // loading 最少等待300ms await pMinDelay(Promise.resolve(), 300) el?.classList.remove('show') // 同时关闭系统升级提示 document.getElementById('update')?.classList.remove('show') } export const open = () => { el?.classList.add('show') }