gio-uniapp-sdk 0.0.0-stage → 1.0.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/LICENSE +176 -0
- package/README.md +201 -2
- package/THIRD_PARTY_LICENSES.txt +192 -0
- package/autotrack.d.ts +1 -0
- package/autotrack.js +3 -0
- package/index.d.ts +69 -0
- package/index.js +175 -0
- package/package.json +50 -4
- package/src/adapters/uniapp.d.ts +66 -0
- package/src/adapters/uniapp.js +408 -0
- package/src/compiler/vite.d.ts +39 -0
- package/src/constants/config.d.ts +69 -0
- package/src/constants/config.js +140 -0
- package/src/constants/miniprogram.d.ts +96 -0
- package/src/constants/miniprogram.js +19 -0
- package/src/constants/platform.d.ts +23 -0
- package/src/constants/platform.js +33 -0
- package/src/core/dataStore/app.d.ts +64 -0
- package/src/core/dataStore/app.js +124 -0
- package/src/core/dataStore/index.d.ts +85 -0
- package/src/core/dataStore/index.js +199 -0
- package/src/core/dataStore/page.d.ts +90 -0
- package/src/core/dataStore/page.js +194 -0
- package/src/core/dataStore/protocol.d.ts +27 -0
- package/src/core/dataStore/protocol.js +217 -0
- package/src/core/growingIO.d.ts +42 -0
- package/src/core/growingIO.js +37 -0
- package/src/core/lifecycle.d.ts +151 -0
- package/src/core/lifecycle.js +280 -0
- package/src/core/localRuntime.d.ts +139 -0
- package/src/core/localRuntime.js +759 -0
- package/src/core/queue.d.ts +107 -0
- package/src/core/queue.js +408 -0
- package/src/core/storage/encrypt.d.ts +6 -0
- package/src/core/storage/encrypt.js +140 -0
- package/src/core/storage/index.d.ts +107 -0
- package/src/core/storage/index.js +338 -0
- package/src/core/storage/legacyIdentity.d.ts +8 -0
- package/src/core/storage/legacyIdentity.js +28 -0
- package/src/core/uploader.d.ts +121 -0
- package/src/core/uploader.js +407 -0
- package/src/core/userStore.d.ts +84 -0
- package/src/core/userStore.js +239 -0
- package/src/platform/index.d.ts +19 -0
- package/src/platform/index.js +96 -0
- package/src/platform/miniprogram.d.ts +19 -0
- package/src/platform/miniprogram.js +58 -0
- package/src/platform/native-identifiers.d.ts +10 -0
- package/src/platform/native-identifiers.js +34 -0
- package/src/platform/network.d.ts +44 -0
- package/src/platform/network.js +138 -0
- package/src/platform/resolve.d.ts +9 -0
- package/src/platform/resolve.js +38 -0
- package/src/platform/system.d.ts +19 -0
- package/src/platform/system.js +153 -0
- package/src/platform/uni.d.ts +58 -0
- package/src/platform/uni.js +100 -0
- package/src/platform/unimp-native-module.d.ts +12 -0
- package/src/platform/unimp-native-module.js +42 -0
- package/src/platform/unimp.d.ts +3 -0
- package/src/platform/unimp.js +13 -0
- package/src/plugins/gioEventAutoTracking/contract.d.ts +42 -0
- package/src/plugins/gioEventAutoTracking/contract.js +7 -0
- package/src/plugins/gioEventAutoTracking/index.d.ts +29 -0
- package/src/plugins/gioEventAutoTracking/index.js +366 -0
- package/src/plugins/gioHybridAdapter/contract.d.ts +138 -0
- package/src/plugins/gioHybridAdapter/contract.js +150 -0
- package/src/plugins/gioHybridAdapter/info.d.ts +13 -0
- package/src/plugins/gioHybridAdapter/info.js +20 -0
- package/src/plugins/gioHybridAdapter/runtime.d.ts +133 -0
- package/src/plugins/gioHybridAdapter/runtime.js +736 -0
- package/src/plugins/gioNativeIdentifiers/index.d.ts +28 -0
- package/src/plugins/gioNativeIdentifiers/index.js +58 -0
- package/src/types/index.d.ts +111 -0
- package/src/types/index.js +1 -0
- package/src/utils/tools.d.ts +4 -0
- package/src/utils/tools.js +144 -0
- package/vite-runtime.js +69851 -0
- package/vite.d.ts +2 -0
- package/vite.js +4 -0
package/index.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { createAppTracker } from './src/platform/index.js';
|
|
2
|
+
import { SDK_VERSION, normalizeInitOptions } from './src/constants/config.js';
|
|
3
|
+
import { createMiniProgramTracker, matchesMiniProgramAppId } from './src/platform/miniprogram.js';
|
|
4
|
+
import { resolveRuntimeTarget } from './src/platform/resolve.js';
|
|
5
|
+
import { isBuiltinPlugin, snapshotBuiltinPlugin } from './src/core/lifecycle.js';
|
|
6
|
+
import { normalizeUniMPConfig } from './src/plugins/gioHybridAdapter/contract.js';
|
|
7
|
+
import { createUniMPTracker } from './src/platform/unimp.js';
|
|
8
|
+
import { installUniAppLifecycle } from './src/adapters/uniapp.js';
|
|
9
|
+
import { guid } from './src/utils/tools.js';
|
|
10
|
+
let singleton = null;
|
|
11
|
+
let gdpTracker = null;
|
|
12
|
+
let pendingGdpPlugins = [];
|
|
13
|
+
/** App SDK 只创建单例;重复请求返回首次运行时,避免重复安装生命周期、队列、存储命名空间和上传器。 */
|
|
14
|
+
function createGioTracker(host, options, target) {
|
|
15
|
+
if (singleton === null)
|
|
16
|
+
singleton = target === 'app' ? createAppTracker(host, options) : createMiniProgramTracker(host, target, options);
|
|
17
|
+
return singleton;
|
|
18
|
+
}
|
|
19
|
+
/** 将非数组对象视为参数记录,拒绝标量和空值。 */
|
|
20
|
+
function record(value) {
|
|
21
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
22
|
+
? value
|
|
23
|
+
: null;
|
|
24
|
+
}
|
|
25
|
+
/** 检查全局 uni 是否具备 App SDK 所需的宿主方法;缺失时拒绝初始化。 */
|
|
26
|
+
function runtimeHost() {
|
|
27
|
+
const candidate = record(typeof uni === 'undefined' ? globalThis.uni : uni);
|
|
28
|
+
const required = ['getStorageSync', 'setStorageSync', 'removeStorageSync', 'getNetworkType', 'request'];
|
|
29
|
+
if (candidate === null || !required.every(name => typeof candidate[name] === 'function'))
|
|
30
|
+
return null;
|
|
31
|
+
const target = resolveRuntimeTarget(candidate, typeof __GIO_UNI_PLATFORM__ === 'undefined' ? undefined : __GIO_UNI_PLATFORM__);
|
|
32
|
+
if (target === null || (target === 'app' && !['getDeviceInfo', 'getSystemInfoSync', 'getAppBaseInfo'].every(name => typeof candidate[name] === 'function')))
|
|
33
|
+
return null;
|
|
34
|
+
return { host: candidate, target };
|
|
35
|
+
}
|
|
36
|
+
/** 确认传入的是可安装全局 mixin 的 Vue 应用。 */
|
|
37
|
+
function isUniVueApp(value) {
|
|
38
|
+
const candidate = record(value);
|
|
39
|
+
return candidate !== null && typeof candidate.mixin === 'function';
|
|
40
|
+
}
|
|
41
|
+
/** 校验客户插件的名称和安装方法,不在此执行插件代码。 */
|
|
42
|
+
function isCustomerPlugin(value) {
|
|
43
|
+
const candidate = record(value);
|
|
44
|
+
return candidate !== null && typeof candidate.name === 'string' && candidate.name.trim() !== '' && typeof candidate.install === 'function';
|
|
45
|
+
}
|
|
46
|
+
/** 取得插件声明的名称,供注册去重使用。 */
|
|
47
|
+
function pluginName(plugin) {
|
|
48
|
+
return plugin.name;
|
|
49
|
+
}
|
|
50
|
+
/** 固定内置配置,同时保留兼具客户插件角色的安装方法和原对象上下文。 */
|
|
51
|
+
function snapshotGdpPlugin(plugin) {
|
|
52
|
+
if (!isBuiltinPlugin(plugin))
|
|
53
|
+
return plugin;
|
|
54
|
+
const builtin = snapshotBuiltinPlugin(plugin);
|
|
55
|
+
return isCustomerPlugin(plugin)
|
|
56
|
+
? Object.freeze({ ...builtin, install: plugin.install.bind(plugin) })
|
|
57
|
+
: builtin;
|
|
58
|
+
}
|
|
59
|
+
/** 在首次初始化前原子校验并暂存插件;重复名称或非法声明使整批失败。 */
|
|
60
|
+
function registerGdpPlugins(value) {
|
|
61
|
+
if (!Array.isArray(value) || gdpTracker !== null)
|
|
62
|
+
return false;
|
|
63
|
+
const plugins = value.filter((plugin) => isBuiltinPlugin(plugin) || isCustomerPlugin(plugin));
|
|
64
|
+
if (plugins.length !== value.length)
|
|
65
|
+
return false;
|
|
66
|
+
const names = new Set(pendingGdpPlugins.map(pluginName));
|
|
67
|
+
for (const plugin of plugins) {
|
|
68
|
+
const name = pluginName(plugin);
|
|
69
|
+
if (names.has(name))
|
|
70
|
+
return false;
|
|
71
|
+
names.add(name);
|
|
72
|
+
}
|
|
73
|
+
pendingGdpPlugins = [...pendingGdpPlugins, ...plugins.map(snapshotGdpPlugin)];
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 与独立小程序 SDK 对齐的命令入口。业务在 main.ts 注册插件,再将 Vue 应用作为 uniVue 传给 init。
|
|
78
|
+
* SDK 读取全局 uni 并自行转发生命周期,业务页面统一调用 gdp()。
|
|
79
|
+
*
|
|
80
|
+
* @returns 命令是否被本地接纳;事件命令成功不代表采集服务已接收。
|
|
81
|
+
*/
|
|
82
|
+
export const gdp = ((command, ...args) => {
|
|
83
|
+
if (command === 'registerPlugins')
|
|
84
|
+
return registerGdpPlugins(args[0]);
|
|
85
|
+
if (command === 'init') {
|
|
86
|
+
if (gdpTracker !== null && gdpTracker.canRetryInit()) {
|
|
87
|
+
// 上次初始化在异步恢复阶段失败:复用已安装的生命周期与插件,只重新校验配置并恢复状态。
|
|
88
|
+
if (typeof args[0] !== 'string' || typeof args[1] !== 'string')
|
|
89
|
+
return false;
|
|
90
|
+
const input = record(args[2]);
|
|
91
|
+
if (input === null || !isUniVueApp(input.uniVue) || input.runtime === 'unimp')
|
|
92
|
+
return false;
|
|
93
|
+
const { uniVue: _app, sdkVersion: _ignoredVersion, ...init } = input;
|
|
94
|
+
return gdpTracker.init({ ...init, accountId: args[0], dataSourceId: args[1] });
|
|
95
|
+
}
|
|
96
|
+
if (gdpTracker !== null) {
|
|
97
|
+
try {
|
|
98
|
+
globalThis.console?.warn('[GrowingIO]:SDK重复初始化,请检查是否重复加载SDK或接入其他平台SDK导致冲突!');
|
|
99
|
+
}
|
|
100
|
+
catch { /* 诊断输出异常不应打断后续业务调用。 */ }
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
if (typeof args[0] !== 'string' || typeof args[1] !== 'string')
|
|
104
|
+
return false;
|
|
105
|
+
const input = record(args[2]);
|
|
106
|
+
if (input === null || !isUniVueApp(input.uniVue))
|
|
107
|
+
return false;
|
|
108
|
+
const { uniVue, sdkVersion: _ignoredVersion, ...init } = input;
|
|
109
|
+
if (input.runtime === 'unimp') {
|
|
110
|
+
const value = { ...init, accountId: args[0], dataSourceId: args[1] };
|
|
111
|
+
if (normalizeUniMPConfig(value) === null || !pendingGdpPlugins.some(plugin => isBuiltinPlugin(plugin) && plugin.name === 'gioHybridAdapter')
|
|
112
|
+
|| pendingGdpPlugins.some(plugin => isBuiltinPlugin(plugin) && plugin.name === 'gioNativeIdentifiers'))
|
|
113
|
+
return false;
|
|
114
|
+
const host = record(typeof uni === 'undefined' ? globalThis.uni : uni) ?? {};
|
|
115
|
+
// 不要求本地 App 的存储 / 请求 / 系统 API;缺少 module 在首次前台握手时报告。
|
|
116
|
+
const tracker = createUniMPTracker(host);
|
|
117
|
+
if (!tracker.registerPlugins(...pendingGdpPlugins.filter(isBuiltinPlugin)) || !tracker.init(value))
|
|
118
|
+
return false;
|
|
119
|
+
singleton = tracker;
|
|
120
|
+
gdpTracker = tracker;
|
|
121
|
+
installUniAppLifecycle(uniVue, tracker, { host, unimp: true });
|
|
122
|
+
installCustomerPlugins(tracker);
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
const runtime = runtimeHost();
|
|
126
|
+
if (runtime === null || pendingGdpPlugins.some(plugin => isBuiltinPlugin(plugin) && plugin.name === 'gioHybridAdapter'))
|
|
127
|
+
return false;
|
|
128
|
+
const { host, target } = runtime;
|
|
129
|
+
if (target !== 'app' && pendingGdpPlugins.some(plugin => isBuiltinPlugin(plugin) && plugin.name === 'gioNativeIdentifiers'))
|
|
130
|
+
return false;
|
|
131
|
+
const config = normalizeInitOptions({ ...init, accountId: args[0], dataSourceId: args[1] }, target === 'app' ? undefined : target);
|
|
132
|
+
if (!config.ok || (config.config.miniprogram !== undefined && !matchesMiniProgramAppId(host, config.config.miniprogram.appId)))
|
|
133
|
+
return false;
|
|
134
|
+
const tracker = createGioTracker(host, {
|
|
135
|
+
sdkVersion: SDK_VERSION,
|
|
136
|
+
deviceIdFactory: guid,
|
|
137
|
+
sessionIdFactory: guid,
|
|
138
|
+
}, target);
|
|
139
|
+
const registered = new Set(tracker.registeredPluginNames());
|
|
140
|
+
const builtinPlugins = pendingGdpPlugins.filter(isBuiltinPlugin).filter((plugin) => !registered.has(plugin.name));
|
|
141
|
+
if (!tracker.registerPlugins(...builtinPlugins) || !tracker.init({ ...init, accountId: args[0], dataSourceId: args[1] }))
|
|
142
|
+
return false;
|
|
143
|
+
installUniAppLifecycle(uniVue, tracker, { host, miniprogram: target === 'app' ? undefined : target });
|
|
144
|
+
gdpTracker = tracker;
|
|
145
|
+
installCustomerPlugins(tracker);
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
if (gdpTracker === null)
|
|
149
|
+
return command === 'getGioInfo' ? null : false;
|
|
150
|
+
switch (command) {
|
|
151
|
+
case 'track': return gdpTracker.track(args[0], args[1]);
|
|
152
|
+
case 'setUserId': return gdpTracker.setUserId(args[0], args[1]);
|
|
153
|
+
case 'clearUserId': return gdpTracker.clearUserId();
|
|
154
|
+
case 'identify': return gdpTracker.identify(args[0]);
|
|
155
|
+
case 'getGioInfo': return gdpTracker.getGioInfo();
|
|
156
|
+
case 'setUserAttributes': return gdpTracker.setUserAttributes(args[0]);
|
|
157
|
+
case 'setOptions': return gdpTracker.setOptions(args[0]);
|
|
158
|
+
case 'setLocation': return gdpTracker.setLocation(args[0], args[1]);
|
|
159
|
+
case 'clearLocation': return gdpTracker.clearLocation();
|
|
160
|
+
default: return false;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
function installCustomerPlugins(tracker) {
|
|
164
|
+
for (const plugin of pendingGdpPlugins.filter(isCustomerPlugin)) {
|
|
165
|
+
try {
|
|
166
|
+
plugin.install(tracker);
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
globalThis.console?.warn(`[GrowingIO]: custom plugin install failed (${plugin.name})`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
;
|
|
174
|
+
globalThis.gdp = gdp;
|
|
175
|
+
export default gdp;
|
package/package.json
CHANGED
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gio-uniapp-sdk",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "GrowingIO 传统 uni-app Vue 3 数据采集 SDK,本期仅发布鸿蒙端",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/growingio/growingio-sdk-uniapp-autotracker.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"growingio",
|
|
14
|
+
"uni-app",
|
|
15
|
+
"uni_modules",
|
|
16
|
+
"analytics",
|
|
17
|
+
"tracking",
|
|
18
|
+
"埋点",
|
|
19
|
+
"统计"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20.19.0"
|
|
23
|
+
},
|
|
24
|
+
"main": "./index.js",
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./index.d.ts",
|
|
29
|
+
"import": "./index.js"
|
|
30
|
+
},
|
|
31
|
+
"./vite": {
|
|
32
|
+
"types": "./vite.d.ts",
|
|
33
|
+
"import": "./vite.js"
|
|
34
|
+
},
|
|
35
|
+
"./autotrack": {
|
|
36
|
+
"types": "./autotrack.d.ts",
|
|
37
|
+
"import": "./autotrack.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"*.js",
|
|
42
|
+
"*.d.ts",
|
|
43
|
+
"src",
|
|
44
|
+
"README.md",
|
|
45
|
+
"LICENSE",
|
|
46
|
+
"THIRD_PARTY_LICENSES.txt"
|
|
47
|
+
],
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"registry": "https://registry.npmjs.org/",
|
|
50
|
+
"access": "public"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { AppEntrySnapshot } from '../core/dataStore/app.js';
|
|
2
|
+
import type { PageLoadInput } from '../core/dataStore/page.js';
|
|
3
|
+
import type { AutoTrackCall } from '../plugins/gioEventAutoTracking/contract.js';
|
|
4
|
+
import type { MiniProgramTarget } from '../types/index.js';
|
|
5
|
+
type LifecycleTarget = AppLifecycleTarget & PageLifecycleTarget;
|
|
6
|
+
export type UniAppVueApp = Readonly<{
|
|
7
|
+
/** 将 SDK 生命周期转发器安装到全局 Vue mixin。 */
|
|
8
|
+
mixin: (options: Readonly<Record<string, unknown>>) => void;
|
|
9
|
+
}>;
|
|
10
|
+
/** 安装一个全局 Vue mixin,以 WeakMap 保存宿主页面与桥接器的对应关系;核心仅接收路由、query 和标题快照。 */
|
|
11
|
+
export declare function installUniAppLifecycle(app: UniAppVueApp, target: LifecycleTarget, options?: Readonly<{
|
|
12
|
+
host?: unknown;
|
|
13
|
+
miniprogram?: MiniProgramTarget;
|
|
14
|
+
unimp?: boolean;
|
|
15
|
+
}>): void;
|
|
16
|
+
export interface AppLifecycleTarget {
|
|
17
|
+
/** 接纳 App 启动入口快照,建立冷启动边界。 */
|
|
18
|
+
onAppLaunch(entry: AppEntrySnapshot): boolean;
|
|
19
|
+
/** 接纳前台入口快照,按会话规则决定是否生成 VISIT。 */
|
|
20
|
+
onAppShow(entry: AppEntrySnapshot): boolean;
|
|
21
|
+
/** 接纳后台观察,尽力生成关闭事件并刷新队列。 */
|
|
22
|
+
onAppHide(): boolean;
|
|
23
|
+
}
|
|
24
|
+
/** App 和 Page 桥接共用 query 序列化规则,避免保留原始宿主参数对象。 */
|
|
25
|
+
export declare function querySnapshot(value: unknown): string | null;
|
|
26
|
+
/** 将 App 生命周期参数裁剪为纯 JSON 入口,省略不支持的 query 值。 */
|
|
27
|
+
export declare function appEntrySnapshot(options: unknown, target?: MiniProgramTarget): AppEntrySnapshot;
|
|
28
|
+
/** 为 App 的三个生命周期钩子提供桥接,不将宿主或 Vue 对象传入核心。 */
|
|
29
|
+
export declare function createAppLifecycleBridge(target: AppLifecycleTarget): Readonly<{
|
|
30
|
+
/** 裁剪宿主启动参数后转发给运行时。 */
|
|
31
|
+
onLaunch: (options: unknown) => boolean;
|
|
32
|
+
/** 转发显示状态及当前入口或页面标题。 */
|
|
33
|
+
onShow: (options: unknown) => boolean;
|
|
34
|
+
/** 转发隐藏状态,由对应生命周期决定影响范围。 */
|
|
35
|
+
onHide: () => boolean;
|
|
36
|
+
}>;
|
|
37
|
+
export interface PageLifecycleTarget {
|
|
38
|
+
/** 登记由页面实例绑定的路由、query 和来源快照。 */
|
|
39
|
+
onPageLoad(input: PageLoadInput): boolean;
|
|
40
|
+
/** 更新该页面实例的显示时间与可选标题。 */
|
|
41
|
+
onPageShow(instanceId: string, title: string | null): boolean;
|
|
42
|
+
/** 清除该实例的当前页面关联。 */
|
|
43
|
+
onPageHide(instanceId: string): boolean;
|
|
44
|
+
/** 释放该页面实例的状态。 */
|
|
45
|
+
onPageUnload(instanceId: string): boolean;
|
|
46
|
+
/** 可选标题增强,只更新指定页面快照。 */
|
|
47
|
+
onPageTitleChanged?(instanceId: string, title: string): boolean;
|
|
48
|
+
/** 可选自动采集入口,由运行时继续执行全部门控。 */
|
|
49
|
+
autoTrack?(call: AutoTrackCall): boolean;
|
|
50
|
+
}
|
|
51
|
+
/** 将宿主页面实例绑定到稳定标识,调用方只提交快照,不传入 Vue 或 Page 对象。 */
|
|
52
|
+
export declare function createPageLifecycleBridge(target: PageLifecycleTarget, instanceId: string, miniprogram?: MiniProgramTarget): Readonly<{
|
|
53
|
+
/** 将宿主页面参数转换为纯数据后提交。 */
|
|
54
|
+
onLoad: (route: unknown, query: unknown, referralPage?: unknown) => boolean;
|
|
55
|
+
/** 转发显示状态及当前入口或页面标题。 */
|
|
56
|
+
onShow: (title?: unknown) => boolean;
|
|
57
|
+
/** 转发隐藏状态,由对应生命周期决定影响范围。 */
|
|
58
|
+
onHide: () => boolean;
|
|
59
|
+
/** 转发绑定实例的卸载通知。 */
|
|
60
|
+
onUnload: () => boolean;
|
|
61
|
+
/** 规范 tabBar 点击并提交版本化探针。 */
|
|
62
|
+
onTabItemTap: (options: unknown) => boolean;
|
|
63
|
+
/** 更新绑定页面的标题,不模拟导航。 */
|
|
64
|
+
onTitleChanged: (title: string) => boolean | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export {};
|