Commit b25ceb4201bce806dc129f24c2d98fd2ff0392d1
1 parent
a98835e1
fix(echart): legend not work
Showing
7 changed files
with
37 additions
and
44 deletions
package.json
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | }, | 32 | }, |
33 | "dependencies": { | 33 | "dependencies": { |
34 | "@iconify/iconify": "^2.0.0-rc.6", | 34 | "@iconify/iconify": "^2.0.0-rc.6", |
35 | - "@vueuse/core": "^4.6.0", | 35 | + "@vueuse/core": "^4.6.1", |
36 | "@zxcvbn-ts/core": "^0.3.0", | 36 | "@zxcvbn-ts/core": "^0.3.0", |
37 | "ant-design-vue": "2.1.0", | 37 | "ant-design-vue": "2.1.0", |
38 | "apexcharts": "^3.26.0", | 38 | "apexcharts": "^3.26.0", |
@@ -83,7 +83,7 @@ | @@ -83,7 +83,7 @@ | ||
83 | "dotenv": "^8.2.0", | 83 | "dotenv": "^8.2.0", |
84 | "eslint": "^7.22.0", | 84 | "eslint": "^7.22.0", |
85 | "eslint-config-prettier": "^8.1.0", | 85 | "eslint-config-prettier": "^8.1.0", |
86 | - "eslint-define-config": "^1.0.2", | 86 | + "eslint-define-config": "^1.0.3", |
87 | "eslint-plugin-prettier": "^3.3.1", | 87 | "eslint-plugin-prettier": "^3.3.1", |
88 | "eslint-plugin-vue": "^7.8.0", | 88 | "eslint-plugin-vue": "^7.8.0", |
89 | "esno": "^0.5.0", | 89 | "esno": "^0.5.0", |
@@ -115,7 +115,7 @@ | @@ -115,7 +115,7 @@ | ||
115 | "vite-plugin-style-import": "^0.9.0", | 115 | "vite-plugin-style-import": "^0.9.0", |
116 | "vite-plugin-svg-icons": "^0.4.0", | 116 | "vite-plugin-svg-icons": "^0.4.0", |
117 | "vite-plugin-theme": "^0.5.0", | 117 | "vite-plugin-theme": "^0.5.0", |
118 | - "vite-plugin-windicss": "0.9.11", | 118 | + "vite-plugin-windicss": "0.10.2", |
119 | "vue-eslint-parser": "^7.6.0" | 119 | "vue-eslint-parser": "^7.6.0" |
120 | }, | 120 | }, |
121 | "resolutions": { | 121 | "resolutions": { |
src/main.ts
@@ -25,8 +25,6 @@ import '/@/router/guard'; | @@ -25,8 +25,6 @@ import '/@/router/guard'; | ||
25 | // Register icon Sprite | 25 | // Register icon Sprite |
26 | import 'vite-plugin-svg-icons/register'; | 26 | import 'vite-plugin-svg-icons/register'; |
27 | 27 | ||
28 | -import { isDevMode } from '/@/utils/env'; | ||
29 | - | ||
30 | (async () => { | 28 | (async () => { |
31 | const app = createApp(App); | 29 | const app = createApp(App); |
32 | // Register global components | 30 | // Register global components |
@@ -52,10 +50,4 @@ import { isDevMode } from '/@/utils/env'; | @@ -52,10 +50,4 @@ import { isDevMode } from '/@/utils/env'; | ||
52 | await router.isReady(); | 50 | await router.isReady(); |
53 | 51 | ||
54 | app.mount('#app', true); | 52 | app.mount('#app', true); |
55 | - | ||
56 | - // The development environment takes effect | ||
57 | - if (isDevMode()) { | ||
58 | - // app.config.performance = true; | ||
59 | - window.__APP__ = app; | ||
60 | - } | ||
61 | })(); | 53 | })(); |
src/plugins/echarts/index.ts
@@ -9,11 +9,13 @@ import { | @@ -9,11 +9,13 @@ import { | ||
9 | PolarComponent, | 9 | PolarComponent, |
10 | AriaComponent, | 10 | AriaComponent, |
11 | ParallelComponent, | 11 | ParallelComponent, |
12 | + LegendComponent, | ||
12 | } from 'echarts/components'; | 13 | } from 'echarts/components'; |
13 | 14 | ||
14 | import { SVGRenderer } from 'echarts/renderers'; | 15 | import { SVGRenderer } from 'echarts/renderers'; |
15 | 16 | ||
16 | echarts.use([ | 17 | echarts.use([ |
18 | + LegendComponent, | ||
17 | TitleComponent, | 19 | TitleComponent, |
18 | TooltipComponent, | 20 | TooltipComponent, |
19 | GridComponent, | 21 | GridComponent, |
src/utils/env.ts
@@ -17,7 +17,7 @@ export function getStorageShortName() { | @@ -17,7 +17,7 @@ export function getStorageShortName() { | ||
17 | export function getAppEnvConfig() { | 17 | export function getAppEnvConfig() { |
18 | const ENV_NAME = getConfigFileName(import.meta.env); | 18 | const ENV_NAME = getConfigFileName(import.meta.env); |
19 | 19 | ||
20 | - const ENV = ((isDevMode() | 20 | + const ENV = ((import.meta.env.DEV |
21 | ? // Get the global configuration (the configuration will be extracted independently when packaging) | 21 | ? // Get the global configuration (the configuration will be extracted independently when packaging) |
22 | ((import.meta.env as unknown) as GlobEnvConfig) | 22 | ((import.meta.env as unknown) as GlobEnvConfig) |
23 | : window[ENV_NAME as any]) as unknown) as GlobEnvConfig; | 23 | : window[ENV_NAME as any]) as unknown) as GlobEnvConfig; |
src/views/sys/error-log/index.vue
@@ -44,7 +44,6 @@ | @@ -44,7 +44,6 @@ | ||
44 | import { getColumns } from './data'; | 44 | import { getColumns } from './data'; |
45 | 45 | ||
46 | import { cloneDeep } from 'lodash-es'; | 46 | import { cloneDeep } from 'lodash-es'; |
47 | - import { isDevMode } from '/@/utils/env'; | ||
48 | 47 | ||
49 | export default defineComponent({ | 48 | export default defineComponent({ |
50 | name: 'ErrorHandler', | 49 | name: 'ErrorHandler', |
@@ -79,7 +78,7 @@ | @@ -79,7 +78,7 @@ | ||
79 | } | 78 | } |
80 | ); | 79 | ); |
81 | const { createMessage } = useMessage(); | 80 | const { createMessage } = useMessage(); |
82 | - if (isDevMode()) { | 81 | + if (import.meta.env.DEV) { |
83 | createMessage.info(t('sys.errorLog.enableMessage')); | 82 | createMessage.info(t('sys.errorLog.enableMessage')); |
84 | } | 83 | } |
85 | // ๆฅ็่ฏฆๆ | 84 | // ๆฅ็่ฏฆๆ |
types/global.d.ts
1 | import type { | 1 | import type { |
2 | - App, | ||
3 | ComponentRenderProxy, | 2 | ComponentRenderProxy, |
4 | VNode, | 3 | VNode, |
5 | ComponentPublicInstance, | 4 | ComponentPublicInstance, |
6 | FunctionalComponent, | 5 | FunctionalComponent, |
7 | } from 'vue'; | 6 | } from 'vue'; |
8 | declare global { | 7 | declare global { |
9 | - declare interface Window { | ||
10 | - // Global vue app instance | ||
11 | - __APP__: App<Element>; | ||
12 | - } | 8 | + // declare interface Window { |
9 | + // Global vue app instance | ||
10 | + // __APP__: App<Element>; | ||
11 | + // } | ||
13 | 12 | ||
14 | export type Writable<T> = { | 13 | export type Writable<T> = { |
15 | -readonly [P in keyof T]: T[P]; | 14 | -readonly [P in keyof T]: T[P]; |
yarn.lock
@@ -2062,31 +2062,31 @@ | @@ -2062,31 +2062,31 @@ | ||
2062 | resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.7.tgz#96d52988efc07444c108c7c6803ba7cc93e40045" | 2062 | resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.7.tgz#96d52988efc07444c108c7c6803ba7cc93e40045" |
2063 | integrity sha512-dn5FyfSc4ky424jH4FntiHno7Ss5yLkqKNmM/NXwANRnlkmqu74pnGetexDFVG5phMk9/FhwovUZCWGxsotVKg== | 2063 | integrity sha512-dn5FyfSc4ky424jH4FntiHno7Ss5yLkqKNmM/NXwANRnlkmqu74pnGetexDFVG5phMk9/FhwovUZCWGxsotVKg== |
2064 | 2064 | ||
2065 | -"@vueuse/core@^4.6.0": | ||
2066 | - version "4.6.0" | ||
2067 | - resolved "https://registry.npmjs.org/@vueuse/core/-/core-4.6.0.tgz#4bb7cbcc01ac27943d0a278e1bf4e714970d2a6d" | ||
2068 | - integrity sha512-SC9UK6eNESVSBkEzklNfmqxmIwAuohuW9FQvf7tvsz++XirbKblRPaXkohClS0ZmrtW+ylI5q3aOdBhADbbfEQ== | 2065 | +"@vueuse/core@^4.6.1": |
2066 | + version "4.6.1" | ||
2067 | + resolved "https://registry.npmjs.org/@vueuse/core/-/core-4.6.1.tgz#a4c736d19456e2f8ff00e6d7fe6746ba30f5a302" | ||
2068 | + integrity sha512-PGRBcX8w5immyGHlvI9Cvdwx+8TlPzMWT08Q4uVSFNVbKTiBt3sDxswNsMKyatqJn7QxYGt3sFfifadH7TMsGw== | ||
2069 | dependencies: | 2069 | dependencies: |
2070 | - "@vueuse/shared" "4.6.0" | 2070 | + "@vueuse/shared" "4.6.1" |
2071 | vue-demi latest | 2071 | vue-demi latest |
2072 | 2072 | ||
2073 | -"@vueuse/shared@4.6.0": | ||
2074 | - version "4.6.0" | ||
2075 | - resolved "https://registry.npmjs.org/@vueuse/shared/-/shared-4.6.0.tgz#4fb644ae0699d754506ad94c721845df00b0d6d0" | ||
2076 | - integrity sha512-330uwtbWoIy53O0YwllckYDiK/f353aVrqeB7Z6/Sg5uFckNiKqX68g2wlDdvUnW/SIOC6cyxIZutZe/xxEFAw== | 2073 | +"@vueuse/shared@4.6.1": |
2074 | + version "4.6.1" | ||
2075 | + resolved "https://registry.npmjs.org/@vueuse/shared/-/shared-4.6.1.tgz#e4e0345ad80264aa0a621419413bd306fb78b970" | ||
2076 | + integrity sha512-TXKw6nR0BPN4U3WGI6jE+ipNkFWZ+vVYQmtIDGkRbHT3wjA6OIAG70Ii6hI3PdhJOkPErAPHjDEUEqTllhvq6Q== | ||
2077 | dependencies: | 2077 | dependencies: |
2078 | vue-demi latest | 2078 | vue-demi latest |
2079 | 2079 | ||
2080 | -"@windicss/plugin-utils@0.9.11": | ||
2081 | - version "0.9.11" | ||
2082 | - resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.9.11.tgz#9b8951ff1495e1deb8a094098a343eb8babb9b3b" | ||
2083 | - integrity sha512-gGLe3/Ud63fcpj1FTq+0/feP/UM34j9W+iSyBtpPnmfLx8mi2a9g9vhZrojqL9X9IYY+ZhHczZ8Fn9qcHdzWVw== | 2080 | +"@windicss/plugin-utils@0.10.2": |
2081 | + version "0.10.2" | ||
2082 | + resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.10.2.tgz#d4a79c41f02c1704b54510a2bd2deaa43c905a7d" | ||
2083 | + integrity sha512-IeKaZEZ1Ww3KO5C3AxWLotMX3aGxhrj0MsTmiyMS1H5KXm6HOgfk+zsRiB0ysxGKrGZ4pMLe2H3Riku8o7YfuQ== | ||
2084 | dependencies: | 2084 | dependencies: |
2085 | debug "^4.3.2" | 2085 | debug "^4.3.2" |
2086 | fast-glob "^3.2.5" | 2086 | fast-glob "^3.2.5" |
2087 | micromatch "^4.0.2" | 2087 | micromatch "^4.0.2" |
2088 | sucrase "^3.17.1" | 2088 | sucrase "^3.17.1" |
2089 | - windicss "^2.5.4" | 2089 | + windicss "^2.5.5" |
2090 | 2090 | ||
2091 | "@zxcvbn-ts/core@^0.3.0": | 2091 | "@zxcvbn-ts/core@^0.3.0": |
2092 | version "0.3.0" | 2092 | version "0.3.0" |
@@ -4326,10 +4326,10 @@ eslint-config-prettier@^8.1.0: | @@ -4326,10 +4326,10 @@ eslint-config-prettier@^8.1.0: | ||
4326 | resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz#4ef1eaf97afe5176e6a75ddfb57c335121abc5a6" | 4326 | resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz#4ef1eaf97afe5176e6a75ddfb57c335121abc5a6" |
4327 | integrity sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw== | 4327 | integrity sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw== |
4328 | 4328 | ||
4329 | -eslint-define-config@^1.0.2: | ||
4330 | - version "1.0.2" | ||
4331 | - resolved "https://registry.npmjs.org/eslint-define-config/-/eslint-define-config-1.0.2.tgz#42775cfd2eedf0ed1b57d15a3f5ade45419fbb46" | ||
4332 | - integrity sha512-TiSz3uwXdgvoO4kGcC+xqazY4bvHD95BK+zsu7+xTSpn4fnfTBcs14CoxE7VmlCqiodeuU5uNtGO00Aks5sEjQ== | 4329 | +eslint-define-config@^1.0.3: |
4330 | + version "1.0.3" | ||
4331 | + resolved "https://registry.npmjs.org/eslint-define-config/-/eslint-define-config-1.0.3.tgz#26efbf9124d3855c8ff49233e6d3e3e3be939f60" | ||
4332 | + integrity sha512-GlfTqk2lysLHRx4YH3xuliY06t/p4WMZc3GABLqZ84RcxJxwRVMp0qF9cQSL42gf0pO7IY+dyUsxMrv2b6rZTQ== | ||
4333 | 4333 | ||
4334 | eslint-plugin-jest@^24.1.5: | 4334 | eslint-plugin-jest@^24.1.5: |
4335 | version "24.3.2" | 4335 | version "24.3.2" |
@@ -10950,14 +10950,15 @@ vite-plugin-theme@^0.5.0: | @@ -10950,14 +10950,15 @@ vite-plugin-theme@^0.5.0: | ||
10950 | tinycolor2 "^1.4.2" | 10950 | tinycolor2 "^1.4.2" |
10951 | ts-jest "^26.5.3" | 10951 | ts-jest "^26.5.3" |
10952 | 10952 | ||
10953 | -vite-plugin-windicss@0.9.11: | ||
10954 | - version "0.9.11" | ||
10955 | - resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.9.11.tgz#46809a7d30d5531f9f3568949cd00646a3178f5b" | ||
10956 | - integrity sha512-wcF2VmglWqvtsi8Zq4kTVVU9jPiiAfdyy91TnlgaJYlgRaBZcwb7QSJ9p5SeOWIyl6RpzjlK2JFWa0djrVmG8w== | 10953 | +vite-plugin-windicss@0.10.2: |
10954 | + version "0.10.2" | ||
10955 | + resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.10.2.tgz#126edae552f2bec22273f5f533806e2b5d61c8ff" | ||
10956 | + integrity sha512-+kgzjwW6VNFlMlQvN4C5iCIqCAhSmTLteVz9IA7LjnpyM6X4tpZmWiTiNlLzAeiJt1eUpu9lFcA7GfuZR+OQDA== | ||
10957 | dependencies: | 10957 | dependencies: |
10958 | - "@windicss/plugin-utils" "0.9.11" | 10958 | + "@windicss/plugin-utils" "0.10.2" |
10959 | + chalk "^4.1.0" | ||
10959 | debug "^4.3.2" | 10960 | debug "^4.3.2" |
10960 | - windicss "^2.5.4" | 10961 | + windicss "^2.5.5" |
10961 | 10962 | ||
10962 | vite@2.1.3: | 10963 | vite@2.1.3: |
10963 | version "2.1.3" | 10964 | version "2.1.3" |
@@ -11131,7 +11132,7 @@ which@^2.0.1, which@^2.0.2: | @@ -11131,7 +11132,7 @@ which@^2.0.1, which@^2.0.2: | ||
11131 | dependencies: | 11132 | dependencies: |
11132 | isexe "^2.0.0" | 11133 | isexe "^2.0.0" |
11133 | 11134 | ||
11134 | -windicss@^2.5.4: | 11135 | +windicss@^2.5.5: |
11135 | version "2.5.5" | 11136 | version "2.5.5" |
11136 | resolved "https://registry.npmjs.org/windicss/-/windicss-2.5.5.tgz#691cc08e13dc9ee41293cd20cfdb6fed101e1d6a" | 11137 | resolved "https://registry.npmjs.org/windicss/-/windicss-2.5.5.tgz#691cc08e13dc9ee41293cd20cfdb6fed101e1d6a" |
11137 | integrity sha512-tKLYY9qQoFKoxitG2B8toa9QUPAjsBOKjmFrxhDi2i0eaVOFQh+YEPElBCa7N5ma03YVIW9HPVbgVU0Z4JxZ5g== | 11138 | integrity sha512-tKLYY9qQoFKoxitG2B8toa9QUPAjsBOKjmFrxhDi2i0eaVOFQh+YEPElBCa7N5ma03YVIW9HPVbgVU0Z4JxZ5g== |