mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-16 04:31:22 +08:00
chore: update deps and fix ts error
This commit is contained in:
22
package.json
22
package.json
@ -26,35 +26,35 @@
|
|||||||
"vue-demi": "^0.13.11"
|
"vue-demi": "^0.13.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.23.2",
|
"@babel/core": "^7.24.4",
|
||||||
"@highlightjs/vue-plugin": "^2.1.0",
|
"@highlightjs/vue-plugin": "^2.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@rollup/plugin-replace": "^5.0.5",
|
"@rollup/plugin-replace": "^5.0.5",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||||
"@typescript-eslint/parser": "^4.33.0",
|
"@typescript-eslint/parser": "^4.33.0",
|
||||||
"@vercel/analytics": "^1.1.1",
|
"@vercel/analytics": "^1.2.2",
|
||||||
"@vue/cli-plugin-babel": "^5.0.8",
|
"@vue/cli-plugin-babel": "^5.0.8",
|
||||||
"@vue/cli-plugin-eslint": "^5.0.8",
|
"@vue/cli-plugin-eslint": "^5.0.8",
|
||||||
"@vue/cli-plugin-typescript": "^5.0.8",
|
"@vue/cli-plugin-typescript": "^5.0.8",
|
||||||
"@vue/cli-service": "^5.0.8",
|
"@vue/cli-service": "^5.0.8",
|
||||||
"@vue/compiler-sfc": "^3.3.7",
|
"@vue/compiler-sfc": "^3.4.23",
|
||||||
"@vue/composition-api": "^1.7.2",
|
"@vue/composition-api": "^1.7.2",
|
||||||
"@vue/eslint-config-prettier": "^6.0.0",
|
"@vue/eslint-config-prettier": "^6.0.0",
|
||||||
"@vue/eslint-config-typescript": "^10.0.0",
|
"@vue/eslint-config-typescript": "^10.0.0",
|
||||||
"@vueuse/core": "^10.5.0",
|
"@vueuse/core": "^10.9.0",
|
||||||
"comment-mark": "^1.1.1",
|
"comment-mark": "^1.1.1",
|
||||||
"core-js": "^3.33.2",
|
"core-js": "^3.37.0",
|
||||||
"echarts": "^5.4.3",
|
"echarts": "^5.5.0",
|
||||||
"echarts-gl": "^2.0.9",
|
"echarts-gl": "^2.0.9",
|
||||||
"echarts-liquidfill": "^3.1.0",
|
"echarts-liquidfill": "^3.1.0",
|
||||||
"esbuild-wasm": "^0.19.2",
|
"esbuild-wasm": "^0.19.12",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-plugin-prettier": "^3.4.1",
|
"eslint-plugin-prettier": "^3.4.1",
|
||||||
"eslint-plugin-vue": "^8.7.1",
|
"eslint-plugin-vue": "^8.7.1",
|
||||||
"highlight.js": "^11.9.0",
|
"highlight.js": "^11.9.0",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.38",
|
||||||
"postcss-loader": "^5.3.0",
|
"postcss-loader": "^5.3.0",
|
||||||
"postcss-nested": "^5.0.6",
|
"postcss-nested": "^5.0.6",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
@ -67,9 +67,9 @@
|
|||||||
"rollup-plugin-ts": "^2.0.7",
|
"rollup-plugin-ts": "^2.0.7",
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
"typescript": "4.6.4",
|
"typescript": "4.6.4",
|
||||||
"vue": "^3.3.7",
|
"vue": "^3.4.23",
|
||||||
"vue2": "npm:vue@^2.7.15",
|
"vue2": "npm:vue@^2.7.16",
|
||||||
"webpack": "^5.89.0"
|
"webpack": "^5.91.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@vue/composition-api": "^1.0.5",
|
"@vue/composition-api": "^1.0.5",
|
||||||
|
11128
pnpm-lock.yaml
generated
11128
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
import { unref } from "vue-demi";
|
import { unref, isRef } from "vue-demi";
|
||||||
import type { Injection } from "./types";
|
import type { Injection } from "./types";
|
||||||
|
|
||||||
type Attrs = {
|
type Attrs = {
|
||||||
@ -26,7 +26,7 @@ export function unwrapInjected<T, V>(
|
|||||||
injection: Injection<T>,
|
injection: Injection<T>,
|
||||||
defaultValue: V
|
defaultValue: V
|
||||||
): T | V {
|
): T | V {
|
||||||
const value = unref(injection);
|
const value = isRef(injection) ? unref(injection) : injection;
|
||||||
|
|
||||||
if (value && typeof value === "object" && "value" in value) {
|
if (value && typeof value === "object" && "value" in value) {
|
||||||
return value.value || defaultValue;
|
return value.value || defaultValue;
|
||||||
|
Reference in New Issue
Block a user