解决打印原生设计缺少依赖的问题

This commit is contained in:
2026-04-14 17:49:26 +08:00
parent e04169a694
commit 52ad06e28f
3 changed files with 55 additions and 9 deletions

View File

@@ -11,6 +11,10 @@
"dependencies": {
"@ant-design/colors": "^7.2.1",
"@ant-design/icons-vue": "^7.0.1",
"@fontsource/noto-sans-sc": "^5.2.9",
"@fontsource/noto-serif-sc": "^5.2.8",
"@fontsource/open-sans": "^5.2.7",
"@fontsource/roboto": "^5.2.10",
"@iconify/iconify": "^3.1.1",
"@jeecg/aiflow": "3.9.1-beta",
"@jeecg/online": "3.9.1-beta",
@@ -42,6 +46,7 @@
"html2canvas": "^1.4.1",
"intro.js": "^7.2.0",
"jquery": "^3.7.1",
"jsbarcode": "^3.12.3",
"jspdf": "^4.2.1",
"lodash-es": "^4.17.21",
"lodash.get": "^4.4.2",
@@ -2979,6 +2984,42 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@fontsource/noto-sans-sc": {
"version": "5.2.9",
"resolved": "https://registry.npmmirror.com/@fontsource/noto-sans-sc/-/noto-sans-sc-5.2.9.tgz",
"integrity": "sha512-bTUIWGBgJDpwi5qAr+x0/lcgv80IHTB9vl6s2f6EymZEa7qYV99yNRBZuKFT+SYDKVunZrjCEhWtpxqmbXWl5Q==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@fontsource/noto-serif-sc": {
"version": "5.2.8",
"resolved": "https://registry.npmmirror.com/@fontsource/noto-serif-sc/-/noto-serif-sc-5.2.8.tgz",
"integrity": "sha512-C7fAr+d1GjOAw1qIbntsnqbA3l5dkdzcmNNgeCXLC8QZ7VNubL7MTrX8UcYKHceX4mI//z8gGtXbOeeQrB6P7g==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@fontsource/open-sans": {
"version": "5.2.7",
"resolved": "https://registry.npmmirror.com/@fontsource/open-sans/-/open-sans-5.2.7.tgz",
"integrity": "sha512-8yfgDYjE5O0vmTPdrcjV35y4yMnctsokmi9gN49Gcsr0sjzkMkR97AnKDe6OqZh2SFkYlR28fxOvi21bYEgMSw==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@fontsource/roboto": {
"version": "5.2.10",
"resolved": "https://registry.npmmirror.com/@fontsource/roboto/-/roboto-5.2.10.tgz",
"integrity": "sha512-8HlA5FtSfz//oFSr2eL7GFXAiE7eIkcGOtx7tjsLKq+as702x9+GU7K95iDeWFapHC4M2hv9RrpXKRTGGBI8Zg==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",

View File

@@ -26,7 +26,7 @@
"@ant-design/colors": "^7.2.1",
"@ant-design/icons-vue": "^7.0.1",
"@fontsource/noto-sans-sc": "^5.2.9",
"@fontsource/noto-serif-sc": "^5.2.9",
"@fontsource/noto-serif-sc": "^5.2.8",
"@fontsource/open-sans": "^5.2.7",
"@fontsource/roboto": "^5.2.10",
"@iconify/iconify": "^3.1.1",

View File

@@ -1,11 +1,16 @@
import '@fontsource/noto-sans-sc/400.css';
import '@fontsource/noto-sans-sc/700.css';
import '@fontsource/noto-serif-sc/400.css';
import '@fontsource/noto-serif-sc/700.css';
import '@fontsource/roboto/400.css';
import '@fontsource/roboto/700.css';
import '@fontsource/open-sans/400.css';
import '@fontsource/open-sans/700.css';
const FONT_CSS_PATHS = [
'@fontsource/noto-sans-sc/400.css',
'@fontsource/noto-sans-sc/700.css',
'@fontsource/noto-serif-sc/400.css',
'@fontsource/noto-serif-sc/700.css',
'@fontsource/roboto/400.css',
'@fontsource/roboto/700.css',
'@fontsource/open-sans/400.css',
'@fontsource/open-sans/700.css',
];
// 字体资源在部分环境可能缺失,按可选依赖加载避免阻塞页面渲染。
void Promise.allSettled(FONT_CSS_PATHS.map((path) => import(/* @vite-ignore */ path)));
export const TABLE_FONT_OPTIONS = [
{ label: '默认字体', value: '' },