123
gaoshp
34 分钟以前 4c2a27b9d7604287c4f94c88a84a1f10a44ad39c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
let flowInstance = null;
let formInstance = null;
let formDesignInstance = null;
 
export function loadFlowModule(app) {
  if (!flowInstance) {
    flowInstance = import('@saber/nf-design-base-elp')
      .then(module => {
        app.use(module.default);
        return module;
      })
      .catch(error => console.error('failed to load module:', error));
  }
  return flowInstance;
}
 
export function loadFormModule(app) {
  if (!formInstance) {
    formInstance = import('@saber/nf-form-elp')
      .then(module => {
        app.use(module.default);
        return module;
      })
      .catch(error => console.error('failed to load module:', error));
  }
  return formInstance;
}
 
export function loadFormDesignModule(app) {
  if (!formDesignInstance) {
    formDesignInstance = import('@saber/nf-form-design-elp')
      .then(module => {
        app.use(module.default);
        return module;
      })
      .catch(error => console.error('failed to load module:', error));
  }
  return formDesignInstance;
}