|
@@ -0,0 +1,16 @@
|
|
|
|
|
+import { provide,inject } from "vue"
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const customKey = 'hetong';
|
|
|
|
|
+
|
|
|
|
|
+export function useHetong() {
|
|
|
|
|
+
|
|
|
|
|
+ const injectHetong = (defaultValue) => inject(customKey,defaultValue)
|
|
|
|
|
+
|
|
|
|
|
+ const provideHetong = (data) => provide(customKey, data)
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ injectHetong,
|
|
|
|
|
+ provideHetong
|
|
|
|
|
+ }
|
|
|
|
|
+}
|