fix(echart): legend not work

This commit is contained in:
Vben
2021-03-27 00:04:36 +08:00
parent a98835e18b
commit b25ceb4201
7 changed files with 37 additions and 44 deletions

View File

@@ -25,8 +25,6 @@ import '/@/router/guard';
// Register icon Sprite
import 'vite-plugin-svg-icons/register';
import { isDevMode } from '/@/utils/env';
(async () => {
const app = createApp(App);
// Register global components
@@ -52,10 +50,4 @@ import { isDevMode } from '/@/utils/env';
await router.isReady();
app.mount('#app', true);
// The development environment takes effect
if (isDevMode()) {
// app.config.performance = true;
window.__APP__ = app;
}
})();

View File

@@ -9,11 +9,13 @@ import {
PolarComponent,
AriaComponent,
ParallelComponent,
LegendComponent,
} from 'echarts/components';
import { SVGRenderer } from 'echarts/renderers';
echarts.use([
LegendComponent,
TitleComponent,
TooltipComponent,
GridComponent,

View File

@@ -17,7 +17,7 @@ export function getStorageShortName() {
export function getAppEnvConfig() {
const ENV_NAME = getConfigFileName(import.meta.env);
const ENV = ((isDevMode()
const ENV = ((import.meta.env.DEV
? // Get the global configuration (the configuration will be extracted independently when packaging)
((import.meta.env as unknown) as GlobEnvConfig)
: window[ENV_NAME as any]) as unknown) as GlobEnvConfig;

View File

@@ -44,7 +44,6 @@
import { getColumns } from './data';
import { cloneDeep } from 'lodash-es';
import { isDevMode } from '/@/utils/env';
export default defineComponent({
name: 'ErrorHandler',
@@ -79,7 +78,7 @@
}
);
const { createMessage } = useMessage();
if (isDevMode()) {
if (import.meta.env.DEV) {
createMessage.info(t('sys.errorLog.enableMessage'));
}
// 查看详情