uni-oaview 1.4.3 → 1.5.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/dist/index.d.ts +6 -1
- package/dist/index.esm.js +10 -1
- package/package.json +1 -1
- package/src/index.ts +12 -2
package/dist/index.d.ts
CHANGED
|
@@ -319,6 +319,11 @@ declare function useCookieTempFileUrl(url: string): {
|
|
|
319
319
|
tempUrl: _mp_rt1_vue___Ref<string>;
|
|
320
320
|
};
|
|
321
321
|
|
|
322
|
+
/** 插件配置选项 */
|
|
323
|
+
interface PluginOptions {
|
|
324
|
+
/** 是否启用启动参数日志上报,默认 true */
|
|
325
|
+
enableLaunchLog?: boolean;
|
|
326
|
+
}
|
|
322
327
|
declare const plugin: Plugin;
|
|
323
328
|
/**
|
|
324
329
|
* 向客户端获取数据
|
|
@@ -329,4 +334,4 @@ declare const plugin: Plugin;
|
|
|
329
334
|
*/
|
|
330
335
|
declare function getDataByApp(eventName: string, params: Record<string, any>, immediate?: boolean): Promise<any>;
|
|
331
336
|
|
|
332
|
-
export { CreateModalReturn, Message, MessageBox, ModalBaseEvents, ModalCloseReason, ModalHeaderEvents, ModalHeaderOptions, ModalOptions, RouteMethodName, VersionCheckRuntimeOptions, VersionCheckRuntimeState, VersionCheckSource, VersionCheckTriggerContext, closeAllModals, compareVersions, createDebounceFn, createModal, createVersionCheckRuntime, plugin as default, getAppVersion, getDataByApp, getTempFilePathForCookie, isCurrentVersionHigher, sendLaunchAppParamsLog, useCookieTempFileUrl, versionCheckRuntime };
|
|
337
|
+
export { CreateModalReturn, Message, MessageBox, ModalBaseEvents, ModalCloseReason, ModalHeaderEvents, ModalHeaderOptions, ModalOptions, PluginOptions, RouteMethodName, VersionCheckRuntimeOptions, VersionCheckRuntimeState, VersionCheckSource, VersionCheckTriggerContext, closeAllModals, compareVersions, createDebounceFn, createModal, createVersionCheckRuntime, plugin as default, getAppVersion, getDataByApp, getTempFilePathForCookie, isCurrentVersionHigher, sendLaunchAppParamsLog, useCookieTempFileUrl, versionCheckRuntime };
|
package/dist/index.esm.js
CHANGED
|
@@ -3909,9 +3909,18 @@ function useCookieTempFileUrl(url) {
|
|
|
3909
3909
|
}
|
|
3910
3910
|
|
|
3911
3911
|
var install = function install(app) {
|
|
3912
|
+
for (var _len = arguments.length, options = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3913
|
+
options[_key - 1] = arguments[_key];
|
|
3914
|
+
}
|
|
3915
|
+
var _options$ = options[0],
|
|
3916
|
+
_options$2 = _options$ === void 0 ? {} : _options$,
|
|
3917
|
+
_options$2$enableLaun = _options$2.enableLaunchLog,
|
|
3918
|
+
enableLaunchLog = _options$2$enableLaun === void 0 ? true : _options$2$enableLaun;
|
|
3912
3919
|
app.mixin({
|
|
3913
3920
|
onLaunch: function onLaunch(params) {
|
|
3914
|
-
|
|
3921
|
+
if (enableLaunchLog) {
|
|
3922
|
+
sendLaunchAppParamsLog(params);
|
|
3923
|
+
}
|
|
3915
3924
|
}
|
|
3916
3925
|
});
|
|
3917
3926
|
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,10 +4,20 @@ import { sendLaunchAppParamsLog } from './utils';
|
|
|
4
4
|
export * from './utils';
|
|
5
5
|
export * from './composables';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/** 插件配置选项 */
|
|
8
|
+
export interface PluginOptions {
|
|
9
|
+
/** 是否启用启动参数日志上报,默认 true */
|
|
10
|
+
enableLaunchLog?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const install = (app: App, ...options: any[]) => {
|
|
14
|
+
const [{ enableLaunchLog = true } = {}] = options;
|
|
15
|
+
|
|
8
16
|
app.mixin({
|
|
9
17
|
onLaunch(params: any) {
|
|
10
|
-
|
|
18
|
+
if (enableLaunchLog) {
|
|
19
|
+
sendLaunchAppParamsLog(params);
|
|
20
|
+
}
|
|
11
21
|
},
|
|
12
22
|
});
|
|
13
23
|
};
|