feat(amis): chart组件补充内置词云插件

This commit is contained in:
wibetter 2023-06-08 16:46:09 +08:00
parent 6aadb62a18
commit db0d9e56e6
3 changed files with 11 additions and 4 deletions

View File

@ -227,7 +227,7 @@ fis.match('*.html:jsx', {
// 这些用了 esm
fis.match(
'{echarts/extension/**.js,zrender/**.js,markdown-it-html5-media/**.js,react-hook-form/**.js,qrcode.react/**.js,axios/**.js}',
'{echarts/**.js,zrender/**.js,echarts-wordcloud/**.js,markdown-it-html5-media/**.js,react-hook-form/**.js,qrcode.react/**.js,axios/**.js}',
{
parser: fis.plugin('typescript', {
sourceMap: false,
@ -464,6 +464,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'!zrender/**',
'!echarts/**',
'!echarts-stat/**',
'!echarts-wordcloud/**',
'!papaparse/**',
'!exceljs/**',
'!xlsx/**',
@ -533,7 +534,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'barcode.js': ['src/components/BarCode.tsx', 'jsbarcode/**'],
'charts.js': ['zrender/**', 'echarts/**', 'echarts-stat/**'],
'charts.js': ['zrender/**', 'echarts/**', 'echarts-stat/**', 'echarts-wordcloud/**'],
'ooxml-viewer.js': ['ooxml-viewer/**', 'fflate/**'],
@ -548,6 +549,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'!amis-ui/lib/components/RichText.js',
'!zrender/**',
'!echarts/**',
'!echarts-wordcloud/**',
'!papaparse/**',
'!exceljs/**',
'!xlsx/**',
@ -760,6 +762,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'!zrender/**',
'!echarts/**',
'!echarts-stat/**',
'!echarts-wordcloud/**',
'!papaparse/**',
'!exceljs/**',
'!xlsx/**',
@ -835,7 +838,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'pkg/cropperjs.js': ['cropperjs/**', 'react-cropper/**'],
'pkg/charts.js': ['zrender/**', 'echarts/**', 'echarts-stat/**'],
'pkg/charts.js': ['zrender/**', 'echarts/**', 'echarts-stat/**', 'echarts-wordcloud/**'],
'pkg/api-mock.js': ['mock/*.ts'],
@ -862,6 +865,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'!amis-ui/lib/components/RichText.tsx',
'!zrender/**',
'!echarts/**',
'!echarts-wordcloud/**',
'!papaparse/**',
'!exceljs/**',
'!xlsx/**',

View File

@ -44,6 +44,7 @@
"downshift": "6.1.12",
"echarts": "5.4.0",
"echarts-stat": "^1.2.0",
"echarts-wordcloud": "^2.1.0",
"exceljs": "^4.3.0",
"file-saver": "^2.0.2",
"hls.js": "1.1.3",

View File

@ -344,7 +344,9 @@ export class Chart extends React.Component<ChartProps> {
// @ts-ignore 官方没提供 type
import('echarts/extension/dataTool'),
// @ts-ignore 官方没提供 type
import('echarts/extension/bmap/bmap')
import('echarts/extension/bmap/bmap'),
// @ts-ignore 官方没提供 type
import('echarts-wordcloud/dist/echarts-wordcloud')
]).then(async ([echarts, ecStat]) => {
(window as any).echarts = echarts;
(window as any).ecStat = ecStat?.default || ecStat;