Skip to content

Commit

Permalink
build(projects): 升级依赖,修复TS类型
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Aug 31, 2022
1 parent f408ea0 commit 73ce53a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 26 deletions.
20 changes: 10 additions & 10 deletions package.json
Expand Up @@ -65,14 +65,14 @@
"echarts": "^5.3.3",
"form-data": "^4.0.0",
"lodash-es": "^4.17.21",
"naive-ui": "2.32.2",
"naive-ui": "2.33.1",
"pinia": "^2.0.21",
"print-js": "^1.6.0",
"qs": "^6.11.0",
"swiper": "^8.3.2",
"ua-parser-js": "^1.0.2",
"vditor": "^3.8.17",
"vue": "3.2.37",
"vue": "3.2.38",
"vue-router": "^4.1.5",
"wangeditor": "^4.7.15",
"xgplayer": "^2.31.7"
Expand All @@ -81,12 +81,12 @@
"@amap/amap-jsapi-types": "^0.0.8",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@iconify/json": "^2.1.100",
"@iconify/json": "^2.1.101",
"@iconify/vue": "^3.2.1",
"@milahu/patch-package": "^6.4.14",
"@types/bmapgl": "^0.0.5",
"@types/crypto-js": "^4.1.1",
"@types/node": "^18.7.13",
"@types/node": "^18.7.14",
"@types/qs": "^6.9.7",
"@types/ua-parser-js": "^0.7.36",
"@vitejs/plugin-vue": "^3.0.3",
Expand All @@ -96,28 +96,28 @@
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^6.9.2",
"eslint": "^8.23.0",
"eslint-config-soybeanjs-vue": "^0.0.9",
"eslint-config-soybeanjs-vue": "^0.0.10",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"mockjs": "^1.1.0",
"postinstall-postinstall": "^2.1.0",
"rollup-plugin-visualizer": "^5.8.0",
"sass": "^1.54.5",
"sass": "^1.54.7",
"standard-version": "^9.5.0",
"typescript": "4.7.4",
"typescript": "4.8.2",
"unocss": "^0.45.13",
"unplugin-icons": "^0.14.8",
"unplugin-vue-components": "0.22.4",
"unplugin-vue-define-options": "^0.11.0",
"unplugin-vue-define-options": "^0.11.1",
"utility-types": "^3.10.0",
"vite": "^3.0.9",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-progress": "^0.0.3",
"vite-plugin-pwa": "^0.12.3",
"vite-plugin-pwa": "^0.12.4",
"vite-plugin-svg-icons": "^2.0.1",
"vue-tsc": "^0.40.4"
"vue-tsc": "^0.40.5"
},
"lint-staged": {
"*.{vue,js,jsx,ts,tsx,json}": "eslint --fix"
Expand Down
2 changes: 1 addition & 1 deletion src/composables/echarts.ts
Expand Up @@ -81,7 +81,7 @@ export function useEcharts(
) {
const theme = useThemeStore();

const domRef = ref<HTMLElement | null>(null);
const domRef = ref<HTMLElement>();

const initialSize = { width: 0, height: 0 };
const { width, height } = useElementSize(domRef, initialSize);
Expand Down
5 changes: 3 additions & 2 deletions src/views/dashboard/analysis/components/TopChart/index.vue
Expand Up @@ -32,6 +32,7 @@

<script setup lang="ts">
import { ref } from 'vue';
import type { Ref } from 'vue';
import { type ECOption, useEcharts } from '@/composables';
defineOptions({ name: 'DashboardAnalysisTopCard' });
Expand Down Expand Up @@ -129,7 +130,7 @@ const lineOptions = ref<ECOption>({
data: [2208, 2016, 2916, 4512, 8281, 2008, 1963, 2367, 2956, 678]
}
]
});
}) as Ref<ECOption>;
const { domRef: lineRef } = useEcharts(lineOptions);
const pieOptions = ref<ECOption>({
Expand Down Expand Up @@ -176,7 +177,7 @@ const pieOptions = ref<ECOption>({
]
}
]
});
}) as Ref<ECOption>;
const { domRef: pieRef } = useEcharts(pieOptions);
</script>

Expand Down
12 changes: 6 additions & 6 deletions src/views/plugin/charts/antv/index.vue
Expand Up @@ -26,12 +26,12 @@ import { onMounted, ref } from 'vue';
import DataSet from '@antv/data-set';
import { Chart } from '@antv/g2';
const pieRef = ref<HTMLElement | null>(null);
const lineRef = ref<HTMLElement | null>(null);
const barRef = ref<HTMLElement | null>(null);
const scatterRef = ref<HTMLElement | null>(null);
const areaRef = ref<HTMLElement | null>(null);
const radarRef = ref<HTMLElement | null>(null);
const pieRef = ref<HTMLElement>();
const lineRef = ref<HTMLElement>();
const barRef = ref<HTMLElement>();
const scatterRef = ref<HTMLElement>();
const areaRef = ref<HTMLElement>();
const radarRef = ref<HTMLElement>();
function renderPieChart() {
if (!pieRef.value) return;
Expand Down
15 changes: 8 additions & 7 deletions src/views/plugin/charts/echarts/index.vue
Expand Up @@ -26,6 +26,7 @@

<script setup lang="ts">
import { onUnmounted, ref } from 'vue';
import type { Ref } from 'vue';
import { graphic } from 'echarts';
import { type ECOption, useEcharts } from '@/composables';
Expand Down Expand Up @@ -62,7 +63,7 @@ const pieOptions = ref<ECOption>({
]
}
]
});
}) as Ref<ECOption>;
const { domRef: pieRef } = useEcharts(pieOptions);
const lineOptions = ref<ECOption>({
Expand Down Expand Up @@ -252,7 +253,7 @@ const lineOptions = ref<ECOption>({
data: [820, 932, 901, 934, 1290, 1330, 1320]
}
]
});
}) as Ref<ECOption>;
const { domRef: lineRef } = useEcharts(lineOptions);
const barOptions = ref<ECOption>({
Expand Down Expand Up @@ -287,10 +288,10 @@ const barOptions = ref<ECOption>({
}
}
]
});
}) as Ref<ECOption>;
const { domRef: barRef } = useEcharts(barOptions);
const pictorialBarOption = ref<ECOption>(getPictorialBarOption());
const pictorialBarOption = ref<ECOption>(getPictorialBarOption()) as Ref<ECOption>;
const { domRef: pictorialBarRef } = useEcharts(pictorialBarOption);
function getPictorialBarOption(): ECOption {
const category: string[] = [];
Expand Down Expand Up @@ -394,7 +395,7 @@ function getPictorialBarOption(): ECOption {
return options;
}
const scatterOptions = ref<ECOption>(getScatterOption());
const scatterOptions = ref<ECOption>(getScatterOption()) as Ref<ECOption>;
const { domRef: scatterRef } = useEcharts(scatterOptions);
function getScatterOption() {
Expand Down Expand Up @@ -545,7 +546,7 @@ const radarOptions = ref<ECOption>({
]
}
]
});
}) as Ref<ECOption>;
const { domRef: radarRef } = useEcharts(radarOptions);
const gaugeOptions = ref<ECOption>({
Expand Down Expand Up @@ -738,7 +739,7 @@ const gaugeOptions = ref<ECOption>({
]
}
]
});
}) as Ref<ECOption>;
let intervalId: NodeJS.Timer;
const { domRef: gaugeRef } = useEcharts(gaugeOptions, chart => {
Expand Down

0 comments on commit 73ce53a

Please sign in to comment.