|
@ -2,30 +2,61 @@ |
|
|
<div ref="divRef" class="border border-gray-200" style="height: 100%"></div> |
|
|
<div ref="divRef" class="border border-gray-200" style="height: 100%"></div> |
|
|
</template> |
|
|
</template> |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { axios, Environment } from '@/platform'; |
|
|
|
|
|
/* |
|
|
/* |
|
|
import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core'; |
|
|
import { ref, onMounted } from 'vue'; |
|
|
import UniverPresetSheetsCoreZhCN from '@univerjs/preset-sheets-core/locales/zh-CN'; |
|
|
import { LocaleType, mergeLocales, Univer, UniverInstanceType } from '@univerjs/core'; |
|
|
import { createUniver, LocaleType, mergeLocales } from '@univerjs/presets'; |
|
|
import DesignZhCN from '@univerjs/design/locale/zh-CN'; |
|
|
import '@univerjs/preset-sheets-core/lib/index.css'; |
|
|
import { UniverDocsPlugin } from '@univerjs/docs'; |
|
|
|
|
|
import { UniverDocsUIPlugin } from '@univerjs/docs-ui'; |
|
|
|
|
|
import DocsUIZhCN from '@univerjs/docs-ui/locale/zh-CN'; |
|
|
|
|
|
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula'; |
|
|
|
|
|
import { UniverRenderEnginePlugin } from '@univerjs/engine-render'; |
|
|
|
|
|
import { UniverSheetsPlugin } from '@univerjs/sheets'; |
|
|
|
|
|
import { UniverSheetsFormulaUIPlugin } from '@univerjs/sheets-formula-ui'; |
|
|
|
|
|
import SheetsFormulaUIZhCN from '@univerjs/sheets-formula-ui/locale/zh-CN'; |
|
|
|
|
|
import { UniverSheetsNumfmtUIPlugin } from '@univerjs/sheets-numfmt-ui'; |
|
|
|
|
|
import SheetsNumfmtUIZhCN from '@univerjs/sheets-numfmt-ui/locale/zh-CN'; |
|
|
|
|
|
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui'; |
|
|
|
|
|
import SheetsUIZhCN from '@univerjs/sheets-ui/locale/zh-CN'; |
|
|
|
|
|
import SheetsZhCN from '@univerjs/sheets/locale/zh-CN'; |
|
|
|
|
|
import { UniverUIPlugin } from '@univerjs/ui'; |
|
|
|
|
|
import UIZhCN from '@univerjs/ui/locale/zh-CN'; |
|
|
|
|
|
import type { IWorkbookData } from '@univerjs/core'; |
|
|
|
|
|
|
|
|
const { univer, univerAPI } = createUniver({ |
|
|
import '@univerjs/design/lib/index.css'; |
|
|
|
|
|
import '@univerjs/ui/lib/index.css'; |
|
|
|
|
|
import '@univerjs/docs-ui/lib/index.css'; |
|
|
|
|
|
import '@univerjs/sheets-ui/lib/index.css'; |
|
|
|
|
|
import '@univerjs/sheets-formula-ui/lib/index.css'; |
|
|
|
|
|
import '@univerjs/sheets-numfmt-ui/lib/index.css'; |
|
|
|
|
|
|
|
|
|
|
|
const divRef = ref(); |
|
|
|
|
|
const WORKBOOK_DATA: Partial<IWorkbookData> = {}; |
|
|
|
|
|
|
|
|
|
|
|
const univer = new Univer({ |
|
|
locale: LocaleType.ZH_CN, |
|
|
locale: LocaleType.ZH_CN, |
|
|
locales: { |
|
|
locales: { |
|
|
[LocaleType.ZH_CN]: mergeLocales(UniverPresetSheetsCoreZhCN), |
|
|
[LocaleType.ZH_CN]: mergeLocales(DesignZhCN, UIZhCN, DocsUIZhCN, SheetsZhCN, SheetsUIZhCN, SheetsFormulaUIZhCN, SheetsNumfmtUIZhCN), |
|
|
}, |
|
|
}, |
|
|
presets: [ |
|
|
|
|
|
UniverSheetsCorePreset({ |
|
|
|
|
|
container: 'app', |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
}); |
|
|
}); |
|
|
univerAPI.createWorkbook({}); |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
console.log(new Date()); |
|
|
onMounted(() => { |
|
|
axios.get(Environment.apiContextPath('/api/lcdp/configure/test')).then((response) => { |
|
|
univer.registerPlugin(UniverRenderEnginePlugin); |
|
|
console.log(response); |
|
|
univer.registerPlugin(UniverFormulaEnginePlugin); |
|
|
console.log(new Date()); |
|
|
|
|
|
|
|
|
univer.registerPlugin(UniverUIPlugin, { |
|
|
|
|
|
container: divRef.value, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
univer.registerPlugin(UniverDocsPlugin); |
|
|
|
|
|
univer.registerPlugin(UniverDocsUIPlugin); |
|
|
|
|
|
|
|
|
|
|
|
univer.registerPlugin(UniverSheetsPlugin); |
|
|
|
|
|
univer.registerPlugin(UniverSheetsUIPlugin); |
|
|
|
|
|
univer.registerPlugin(UniverSheetsFormulaUIPlugin); |
|
|
|
|
|
univer.registerPlugin(UniverSheetsNumfmtUIPlugin); |
|
|
|
|
|
|
|
|
|
|
|
univer.createUnit(UniverInstanceType.UNIVER_SHEET, WORKBOOK_DATA); |
|
|
|
|
|
}); |
|
|
|
|
|
*/ |
|
|
</script> |
|
|
</script> |
|
|