测试
This commit is contained in:
2
frontend/node_modules/element-plus/es/hooks/use-prop/index.d.ts
generated
vendored
Normal file
2
frontend/node_modules/element-plus/es/hooks/use-prop/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { ComputedRef } from 'vue';
|
||||
export declare const useProp: <T>(name: string) => ComputedRef<T | undefined>;
|
||||
12
frontend/node_modules/element-plus/es/hooks/use-prop/index.mjs
generated
vendored
Normal file
12
frontend/node_modules/element-plus/es/hooks/use-prop/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { getCurrentInstance, computed } from 'vue';
|
||||
|
||||
const useProp = (name) => {
|
||||
const vm = getCurrentInstance();
|
||||
return computed(() => {
|
||||
var _a, _b;
|
||||
return (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[name];
|
||||
});
|
||||
};
|
||||
|
||||
export { useProp };
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/hooks/use-prop/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/hooks/use-prop/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-prop/index.ts"],"sourcesContent":["import { computed, getCurrentInstance } from 'vue'\n\nimport type { ComputedRef } from 'vue'\n\nexport const useProp = <T>(name: string): ComputedRef<T | undefined> => {\n const vm = getCurrentInstance()\n return computed(() => (vm?.proxy?.$props as any)?.[name])\n}\n"],"names":[],"mappings":";;AACY,MAAC,OAAO,GAAG,CAAC,IAAI,KAAK;AACjC,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAC;AAClC,EAAE,OAAO,QAAQ,CAAC,MAAM;AACxB,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;AACf,IAAI,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AACjH,GAAG,CAAC,CAAC;AACL;;;;"}
|
||||
Reference in New Issue
Block a user