本帖最后由 小码农 于 2023-9-25 17:01 编辑
因为服务器不确定性,所以先申请了一个临时秘钥,但是部署之后一直提示找不到许可证,不知道为什么,之前部署过另一个系统,引用方式都一样,但是之前是vue2,现在是vue3+vite,测试环境正常使用
设计器没问题,但是使用 [size=13.0667px]@grapecity/activereports-vue 就提示这个
测试环境没问题,打包后部署就不行了,秘钥也能正常打印
还有spread-ExcelIo测试服也没问题,正式服就提示无法把秘钥赋值进去
使用的vue3,版本如下
const start = async () => {
console.log('开始导入');
console.log('exportCenter', exportCenter)
console.time('依赖加载时间');
let {
Core,
XlsxExport
} = await import(/* webpackChunkName: 'activereports', webpackPrefetch: true*/ '@grapecity/activereports');
cXlsxExport.value = XlsxExport;
cCore.value = Core;
await import('@grapecity/activereports-localization'); // 视图中文
await import('@grapecity/activereports/styles/ar-js-ui.css');
await import('@grapecity/activereports/styles/ar-js-viewer.css');
await import('@grapecity/activereports/styles/ar-js-designer.css');
await import('@grapecity/activereports-localization/dist/designer/zh-locale');
await import('@grapecity/activereports/pdfexport');
await import('@grapecity/activereports/xlsxexport');
let {
FontStore: FontStores,
PageReport: PageReports
} = await import(/* webpackChunkName: 'grapecity-activereports', webpackPrefetch: true*/'@grapecity/activereports/core');
PageReports.LicenseKey = exportCenter.sheJiQi;
FontStores.registerFonts('/static/Font/fontsConfig.json');
PageReport = PageReports;
FontStore = FontStores;
await import('@/style/ar-js-theme/ar-js-ui.css');
await import('@/style/ar-js-theme/ar-js-viewer.css');
await import('@grapecity/spread-sheets/styles/gc.spread.sheets.excel2013white.css');
await import('@grapecity/spread-sheets-designer/styles/gc.spread.sheets.designer.min.css');
await import('@grapecity/spread-sheets-designer-resources-cn');
let gc = await import('@grapecity/spread-sheets');
gc.Spread.Common.CultureManager.culture('zh-cn');
gc.Spread.Sheets.LicenseKey = exportCenter.sheetsLicenseKey;
console.log(exportCenter.sheetsLicenseKey)
gc.Spread.Sheets.Designer.LicenseKey = exportCenter.sheetsLicenseKey;
GC = gc;
let ExcelIOs = await import('@grapecity/spread-excelio');
console.log('ExcelIOs', ExcelIOs)
ExcelIOs.LicenseKey = exportCenter.sheetsLicenseKey;
ExcelIO = ExcelIOs;
await import('@grapecity/spread-sheets-designer');
console.timeEnd('依赖加载时间');
}
|