@dcloudio/uni-quickapp-webview 3.0.0-3061720230112004 → 3.0.0-3070320230222001
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/uni.api.esm.js +8 -7
- package/dist/uni.compiler.js +8 -8
- package/dist/uni.mp.esm.js +9 -3
- package/package.json +7 -7
package/dist/uni.api.esm.js
CHANGED
|
@@ -227,20 +227,20 @@ const HOOK_FAIL = 'fail';
|
|
|
227
227
|
const HOOK_COMPLETE = 'complete';
|
|
228
228
|
const globalInterceptors = {};
|
|
229
229
|
const scopedInterceptors = {};
|
|
230
|
-
function wrapperHook(hook) {
|
|
230
|
+
function wrapperHook(hook, params) {
|
|
231
231
|
return function (data) {
|
|
232
|
-
return hook(data) || data;
|
|
232
|
+
return hook(data, params) || data;
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
function queue(hooks, data) {
|
|
235
|
+
function queue(hooks, data, params) {
|
|
236
236
|
let promise = false;
|
|
237
237
|
for (let i = 0; i < hooks.length; i++) {
|
|
238
238
|
const hook = hooks[i];
|
|
239
239
|
if (promise) {
|
|
240
|
-
promise = Promise.resolve(wrapperHook(hook));
|
|
240
|
+
promise = Promise.resolve(wrapperHook(hook, params));
|
|
241
241
|
}
|
|
242
242
|
else {
|
|
243
|
-
const res = hook(data);
|
|
243
|
+
const res = hook(data, params);
|
|
244
244
|
if (isPromise(res)) {
|
|
245
245
|
promise = Promise.resolve(res);
|
|
246
246
|
}
|
|
@@ -267,7 +267,7 @@ function wrapperOptions(interceptors, options = {}) {
|
|
|
267
267
|
}
|
|
268
268
|
const oldCallback = options[name];
|
|
269
269
|
options[name] = function callbackInterceptor(res) {
|
|
270
|
-
queue(hooks, res).then((res) => {
|
|
270
|
+
queue(hooks, res, options).then((res) => {
|
|
271
271
|
return (isFunction(oldCallback) && oldCallback(res)) || res;
|
|
272
272
|
});
|
|
273
273
|
};
|
|
@@ -311,7 +311,8 @@ function invokeApi(method, api, options, params) {
|
|
|
311
311
|
if (isArray(interceptor.invoke)) {
|
|
312
312
|
const res = queue(interceptor.invoke, options);
|
|
313
313
|
return res.then((options) => {
|
|
314
|
-
|
|
314
|
+
// 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
|
|
315
|
+
return api(wrapperOptions(getApiInterceptorHooks(method), options), ...params);
|
|
315
316
|
});
|
|
316
317
|
}
|
|
317
318
|
else {
|
package/dist/uni.compiler.js
CHANGED
|
@@ -5,10 +5,10 @@ var initMiniProgramPlugin = require('@dcloudio/uni-mp-vite');
|
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var shared = require('@vue/shared');
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
|
|
10
|
-
var initMiniProgramPlugin__default = /*#__PURE__*/
|
|
11
|
-
var path__default = /*#__PURE__*/
|
|
10
|
+
var initMiniProgramPlugin__default = /*#__PURE__*/_interopDefault(initMiniProgramPlugin);
|
|
11
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
12
12
|
|
|
13
13
|
var compilerOptions$1 = {
|
|
14
14
|
target: "es6",
|
|
@@ -31,9 +31,9 @@ function formatAppJson(_appJson, manifestJson, _pagesJson) {
|
|
|
31
31
|
});
|
|
32
32
|
if (!appJson.name) {
|
|
33
33
|
const inputDir = process.env.UNI_INPUT_DIR;
|
|
34
|
-
let projectname = path__default
|
|
34
|
+
let projectname = path__default.default.basename(inputDir);
|
|
35
35
|
if (projectname === 'src') {
|
|
36
|
-
projectname = path__default
|
|
36
|
+
projectname = path__default.default.basename(path__default.default.dirname(inputDir));
|
|
37
37
|
}
|
|
38
38
|
appJson.name = projectname;
|
|
39
39
|
}
|
|
@@ -73,10 +73,10 @@ const options = {
|
|
|
73
73
|
cdn: process.env.UNI_SUB_PLATFORM === 'quickapp-webview-huawei' ? 200 : 201,
|
|
74
74
|
vite: {
|
|
75
75
|
inject: {
|
|
76
|
-
uni: [path__default
|
|
76
|
+
uni: [path__default.default.resolve(__dirname, 'uni.api.esm.js'), 'default'],
|
|
77
77
|
},
|
|
78
78
|
alias: {
|
|
79
|
-
'uni-mp-runtime': path__default
|
|
79
|
+
'uni-mp-runtime': path__default.default.resolve(__dirname, 'uni.mp.esm.js'),
|
|
80
80
|
},
|
|
81
81
|
copyOptions: {},
|
|
82
82
|
},
|
|
@@ -125,6 +125,6 @@ const uniQuickappWebviewPlugin = {
|
|
|
125
125
|
};
|
|
126
126
|
},
|
|
127
127
|
};
|
|
128
|
-
var index = [uniQuickappWebviewPlugin, ...initMiniProgramPlugin__default
|
|
128
|
+
var index = [uniQuickappWebviewPlugin, ...initMiniProgramPlugin__default.default(options)];
|
|
129
129
|
|
|
130
130
|
module.exports = index;
|
package/dist/uni.mp.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, isUniLifecycleHook, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
|
|
2
2
|
import { isArray, hasOwn, isFunction, extend, isPlainObject, isObject } from '@vue/shared';
|
|
3
|
-
import { ref, nextTick, findComponentPropsData, toRaw, updateProps, hasQueueJob, invalidateJob,
|
|
3
|
+
import { ref, nextTick, findComponentPropsData, toRaw, updateProps, hasQueueJob, invalidateJob, devtoolsComponentAdded, getExposeProxy, pruneComponentPropsCache } from 'vue';
|
|
4
4
|
import { normalizeLocale, LOCALE_EN } from '@dcloudio/uni-i18n';
|
|
5
5
|
|
|
6
6
|
const MP_METHODS = [
|
|
@@ -616,6 +616,13 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
|
|
|
616
616
|
addGlobalClass: true,
|
|
617
617
|
pureDataPattern: /^uP$/,
|
|
618
618
|
};
|
|
619
|
+
if (isArray(vueOptions.mixins)) {
|
|
620
|
+
vueOptions.mixins.forEach((item) => {
|
|
621
|
+
if (isObject(item.options)) {
|
|
622
|
+
extend(options, item.options);
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
}
|
|
619
626
|
if (vueOptions.options) {
|
|
620
627
|
extend(options, vueOptions.options);
|
|
621
628
|
}
|
|
@@ -624,8 +631,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
|
|
|
624
631
|
lifetimes: initLifetimes({ mocks, isPage, initRelation, vueOptions }),
|
|
625
632
|
pageLifetimes: {
|
|
626
633
|
show() {
|
|
627
|
-
if (
|
|
628
|
-
devtoolsComponentRemoved(this.$vm.$);
|
|
634
|
+
if (__VUE_PROD_DEVTOOLS__) {
|
|
629
635
|
devtoolsComponentAdded(this.$vm.$);
|
|
630
636
|
}
|
|
631
637
|
this.$vm && this.$vm.$callHook('onPageShow');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-quickapp-webview",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-3070320230222001",
|
|
4
4
|
"description": "uni-app quickapp-webview",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
},
|
|
27
27
|
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@vue/compiler-core": "3.2.
|
|
29
|
+
"@vue/compiler-core": "3.2.47"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@dcloudio/uni-cli-shared": "3.0.0-
|
|
33
|
-
"@dcloudio/uni-mp-vite": "3.0.0-
|
|
34
|
-
"@dcloudio/uni-mp-vue": "3.0.0-
|
|
35
|
-
"@dcloudio/uni-shared": "3.0.0-
|
|
36
|
-
"@vue/shared": "3.2.
|
|
32
|
+
"@dcloudio/uni-cli-shared": "3.0.0-3070320230222001",
|
|
33
|
+
"@dcloudio/uni-mp-vite": "3.0.0-3070320230222001",
|
|
34
|
+
"@dcloudio/uni-mp-vue": "3.0.0-3070320230222001",
|
|
35
|
+
"@dcloudio/uni-shared": "3.0.0-3070320230222001",
|
|
36
|
+
"@vue/shared": "3.2.47"
|
|
37
37
|
}
|
|
38
38
|
}
|