fix: 修改折线图不展示,不会动态变更的bug

This commit is contained in:
奔跑的面条 2022-04-06 13:38:19 +08:00
parent cc0ecedd4e
commit e8ce806082
6 changed files with 3869 additions and 5703 deletions

View File

@ -11,52 +11,52 @@
"@types/color": "^3.0.3", "@types/color": "^3.0.3",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"axios": "0.23.0", "axios": "0.23.0",
"color": "^4.2.1", "color": "^4.2.3",
"crypto-ts": "^1.0.2", "crypto-ts": "^1.0.2",
"echarts-liquidfill": "3", "echarts-liquidfill": "^3.1.0",
"highlight.js": "^11.5.0", "highlight.js": "^11.5.0",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"naive-ui": "^2.25.2", "naive-ui": "^2.27.0",
"pinia": "^2.0.6", "pinia": "^2.0.13",
"screenfull": "^6.0.0", "screenfull": "^6.0.1",
"vue": "^3.2.16", "vue": "^3.2.31",
"vue-i18n": "^9.2.0-beta.23", "vue-i18n": "^9.2.0-beta.34",
"vue-router": "4.0.12", "vue-router": "4.0.12",
"vue3-lazyload": "^0.2.5-beta", "vue3-lazyload": "^0.2.5-beta",
"vue3-sketch-ruler": "^1.3.3", "vue3-sketch-ruler": "^1.3.3",
"vuedraggable": "^4.1.0" "vuedraggable": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^16.11.1", "@types/node": "^16.11.26",
"@typescript-eslint/eslint-plugin": "^5.6.0", "@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.6.0", "@typescript-eslint/parser": "^5.18.0",
"@vicons/carbon": "~0.11.0", "@vicons/carbon": "~0.11.0",
"@vicons/ionicons5": "~0.11.0", "@vicons/ionicons5": "~0.11.0",
"@vitejs/plugin-vue": "^1.9.3", "@vitejs/plugin-vue": "^1.10.2",
"@vitejs/plugin-vue-jsx": "^1.2.0", "@vitejs/plugin-vue-jsx": "^1.3.9",
"@vue/compiler-sfc": "^3.2.20", "@vue/compiler-sfc": "^3.2.31",
"@vueuse/core": "^7.3.0", "@vueuse/core": "^7.7.1",
"default-passive-events": "^2.0.0", "default-passive-events": "^2.0.0",
"echarts": "^5.3.0", "echarts": "^5.3.2",
"eslint": "^8.4.1", "eslint": "^8.12.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.3", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.2.0", "eslint-plugin-vue": "^8.5.0",
"lodash": "~4.17.21", "lodash": "~4.17.21",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"plop": "^3.0.5", "plop": "^3.0.5",
"prettier": "^2.5.1", "prettier": "^2.6.2",
"sass": "^1.43.2", "sass": "^1.49.11",
"sass-loader": "^12.2.0", "sass-loader": "^12.6.0",
"typescript": "^4.4.4", "typescript": "^4.6.3",
"vite": "^2.6.10", "vite": "^2.9.1",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-importer": "^0.2.5", "vite-plugin-importer": "^0.2.5",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vite-plugin-style-import": "^1.2.1", "vite-plugin-style-import": "^1.4.1",
"vue-echarts": "^6.0.2", "vue-echarts": "^6.0.2",
"vue-tsc": "^0.28.7" "vue-tsc": "^0.28.10"
}, },
"lint-staged": { "lint-staged": {
"*.{vue,js,ts,tsx}": "eslint --fix" "*.{vue,js,ts,tsx}": "eslint --fix"

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@ export const useChartDataFetch = (
fetchInterval = setInterval(async () => { fetchInterval = setInterval(async () => {
const res:any = await http(requestHttpType.value)(completePath || '', {}) const res:any = await http(requestHttpType.value)(completePath || '', {})
if (res.data) { if (res.data) {
// 是否是 Echarts // 是否是 Echarts 组件
const isECharts = const isECharts =
targetComponent.chartConfig.package === targetComponent.chartConfig.package ===
PackagesCategoryEnum.CHARTS PackagesCategoryEnum.CHARTS

View File

@ -26,6 +26,7 @@ export const langList = [
const i18n = createI18n({ const i18n = createI18n({
locale: langStorage?.lang || lang, locale: langStorage?.lang || lang,
globalInjection: true, globalInjection: true,
legacy:false,
messages: { messages: {
[LangEnum.zh]: zh, [LangEnum.zh]: zh,
[LangEnum.en]: en [LangEnum.en]: en

View File

@ -56,6 +56,7 @@ watch(() => chartEditStore.getEditCanvasConfig.chartThemeColor, (newColor: keyof
}) })
}) })
option.options = mergeTheme(props.chartConfig.option, props.themeSetting, includes) option.options = mergeTheme(props.chartConfig.option, props.themeSetting, includes)
option.options = props.chartConfig.option
} }
}, { }, {
immediate: true, immediate: true,
@ -64,6 +65,7 @@ watch(() => chartEditStore.getEditCanvasConfig.chartThemeColor, (newColor: keyof
watch(() => props.chartConfig.option.dataset, () => { watch(() => props.chartConfig.option.dataset, () => {
option.options = props.chartConfig.option option.options = props.chartConfig.option
}, { }, {
immediate: true,
deep: true deep: true
}) })

View File

@ -15,7 +15,7 @@ export const mergeTheme = <T, U>(
themeSetting: U, themeSetting: U,
includes: string[] includes: string[]
) => { ) => {
return merge({}, pick(themeSetting, includes), option) return option = merge({}, pick(themeSetting, includes), option)
} }
/** /**