刘光辉
11 小时以前 0dfe84494048ce27ba8449831782128412d3eb13
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
import { App, createApp, h } from 'vue';
 
import { createPinia } from 'pinia';
 
import { setupGlobDirectives } from '../../directives';
import JnpfUniver from './Design/index.vue';
import JnpfUniverCellEchart from './Design/univer/components/Echart/cell.vue';
import JnpfUniverFloatEchartVM from './Design/univer/components/Echart/floatVM.vue';
import JnpfUniverPrint from './Print/Render/index.vue';
 
const pinia = createPinia();
 
const app = createApp(h('div'));
 
app.use(pinia);
setupGlobDirectives(app);
 
JnpfUniver.install = (app: App) => app.component(JnpfUniver.name as string, JnpfUniver);
JnpfUniverPrint.install = (app: App) => app.component(JnpfUniverPrint.name as string, JnpfUniverPrint);
JnpfUniverFloatEchartVM.install = (app: App) => app.component(JnpfUniverFloatEchartVM.name as string, JnpfUniverFloatEchartVM);
JnpfUniverCellEchart.install = (app: App) => app.component(JnpfUniverCellEchart.name as string, JnpfUniverCellEchart);
 
export { JnpfUniver, JnpfUniverCellEchart, JnpfUniverFloatEchartVM, JnpfUniverPrint };
 
export default {
  install(app: App) {
    app.component(JnpfUniver.name as string, JnpfUniver);
    app.component(JnpfUniverPrint.name as string, JnpfUniverPrint);
    app.component(JnpfUniverFloatEchartVM.name as string, JnpfUniverFloatEchartVM);
    app.component(JnpfUniverCellEchart.name as string, JnpfUniverCellEchart);
  },
};