@tarojs/taro 3.3.15 → 3.4.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/taro",
3
- "version": "3.3.15",
3
+ "version": "3.4.0-beta.0",
4
4
  "description": "Taro framework",
5
5
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
6
6
  "main": "index.js",
@@ -26,9 +26,9 @@
26
26
  "author": "O2Team",
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@tarojs/api": "3.3.15",
30
- "@tarojs/runtime": "3.3.15",
31
- "@tarojs/taro-h5": "3.3.15"
29
+ "@tarojs/api": "3.4.0-beta.0",
30
+ "@tarojs/runtime": "3.4.0-beta.0",
31
+ "@tarojs/taro-h5": "3.4.0-beta.0"
32
32
  },
33
- "gitHead": "4a11ab9a8950f6a580e1278c160f6b4aaa8ac4f2"
33
+ "gitHead": "107670bc2360ee9136a0e558e6d5fad1db640fba"
34
34
  }
@@ -42,6 +42,10 @@ declare module './index' {
42
42
  rnNavigationRef?: React.RefObject<any>
43
43
  }
44
44
 
45
+ interface SetGlobalDataPlugin {
46
+ install (app: any, data: any): void
47
+ }
48
+
45
49
  interface TaroStatic {
46
50
  // eventCenter
47
51
  eventCenter: TaroGeneral.Events
@@ -70,5 +74,20 @@ declare module './index' {
70
74
  Current: Current
71
75
 
72
76
  getCurrentInstance(): Current
77
+
78
+ /**
79
+ * @desc Vue3 插件,用于设置 `getApp()` 中的全局变量
80
+ * @example
81
+ * ```js
82
+ * // 使用插件
83
+ * const App = createApp(...)
84
+ * App.use(setGlobalDataPlugin, {
85
+ * xxx: 999
86
+ * })
87
+ * // 获取全局变量
88
+ * Taro.getApp().xxx
89
+ * ```
90
+ */
91
+ setGlobalDataPlugin: SetGlobalDataPlugin
73
92
  }
74
93
  }