liding
4 天以前 6eeb82e56306d645a290a0f5ba202efe3ef2385d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { installCryptoRandomUUID } from './cryptoRandomUUID'
 
let modulePromise
 
// 审核开始时预加载;编辑器复用同一次加载,失败后仍允许重试。
export function loadSuperDoc() {
  if (!modulePromise) {
    installCryptoRandomUUID()
    modulePromise = import('superdoc').catch(error => {
      modulePromise = null
      throw error
    })
  }
  return modulePromise
}