鍒濆鎻愪氦锛氱墰鍙暟鎹鐞嗙郴缁?- 鍖呭惈鍚庣Spring Boot鍜屽墠绔疺ue3椤圭洰

This commit is contained in:
shenquanyi
2025-11-28 17:19:49 +08:00
commit 4de35a7e5b
9890 changed files with 1020261 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import type { MaybeRef } from '@vueuse/core';
type DeprecationParam = {
from: string;
replacement: string;
scope: string;
version: string;
ref: string;
type?: 'API' | 'Attribute' | 'Event' | 'Slot';
};
export declare const useDeprecated: ({ from, replacement, scope, version, ref, type }: DeprecationParam, condition: MaybeRef<boolean>) => void;
export {};

View File

@@ -0,0 +1,17 @@
import { watch, unref } from 'vue';
import { debugWarn } from '../../utils/error.mjs';
const useDeprecated = ({ from, replacement, scope, version, ref, type = "API" }, condition) => {
watch(() => unref(condition), (val) => {
if (val) {
debugWarn(scope, `[${type}] ${from} is about to be deprecated in version ${version}, please use ${replacement} instead.
For more detail, please visit: ${ref}
`);
}
}, {
immediate: true
});
};
export { useDeprecated };
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-deprecated/index.ts"],"sourcesContent":["import { unref, watch } from 'vue'\nimport { debugWarn } from '@element-plus/utils'\n\nimport type { MaybeRef } from '@vueuse/core'\n\ntype DeprecationParam = {\n from: string\n replacement: string\n scope: string\n version: string\n ref: string\n type?: 'API' | 'Attribute' | 'Event' | 'Slot'\n}\n\nexport const useDeprecated = (\n { from, replacement, scope, version, ref, type = 'API' }: DeprecationParam,\n condition: MaybeRef<boolean>\n) => {\n watch(\n () => unref(condition),\n (val) => {\n if (val) {\n debugWarn(\n scope,\n `[${type}] ${from} is about to be deprecated in version ${version}, please use ${replacement} instead.\nFor more detail, please visit: ${ref}\n`\n )\n }\n },\n {\n immediate: true,\n }\n )\n}\n"],"names":[],"mappings":";;;AAEY,MAAC,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,GAAG,KAAK,EAAE,EAAE,SAAS,KAAK;AACtG,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,KAAK;AACzC,IAAI,IAAI,GAAG,EAAE;AACb,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,sCAAsC,EAAE,OAAO,CAAC,aAAa,EAAE,WAAW,CAAC;AACpH,+BAA+B,EAAE,GAAG,CAAC;AACrC,CAAC,CAAC,CAAC;AACH,KAAK;AACL,GAAG,EAAE;AACL,IAAI,SAAS,EAAE,IAAI;AACnB,GAAG,CAAC,CAAC;AACL;;;;"}