@dcloudio/uni-quickapp-webview 2.0.2-alpha-3080420230602001 → 2.0.2-alpha-3080520230615001
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.js +17 -20
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -687,8 +687,6 @@ class EventChannel {
|
|
|
687
687
|
|
|
688
688
|
const eventChannels = {};
|
|
689
689
|
|
|
690
|
-
const eventChannelStack = [];
|
|
691
|
-
|
|
692
690
|
let id = 0;
|
|
693
691
|
|
|
694
692
|
function initEventChannel (events, cache = true) {
|
|
@@ -696,31 +694,30 @@ function initEventChannel (events, cache = true) {
|
|
|
696
694
|
const eventChannel = new EventChannel(id, events);
|
|
697
695
|
if (cache) {
|
|
698
696
|
eventChannels[id] = eventChannel;
|
|
699
|
-
eventChannelStack.push(eventChannel);
|
|
700
697
|
}
|
|
701
698
|
return eventChannel
|
|
702
699
|
}
|
|
703
700
|
|
|
704
701
|
function getEventChannel (id) {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
return eventChannel
|
|
709
|
-
}
|
|
710
|
-
return eventChannelStack.shift()
|
|
702
|
+
const eventChannel = eventChannels[id];
|
|
703
|
+
delete eventChannels[id];
|
|
704
|
+
return eventChannel
|
|
711
705
|
}
|
|
712
706
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
707
|
+
function navigateTo () {
|
|
708
|
+
let eventChannel;
|
|
709
|
+
return {
|
|
710
|
+
args (fromArgs, toArgs) {
|
|
711
|
+
eventChannel = initEventChannel(fromArgs.events);
|
|
712
|
+
if (fromArgs.url) {
|
|
713
|
+
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + eventChannel.id;
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
returnValue (fromRes, toRes) {
|
|
717
|
+
fromRes.eventChannel = eventChannel;
|
|
718
718
|
}
|
|
719
|
-
},
|
|
720
|
-
returnValue (fromRes, toRes) {
|
|
721
|
-
fromRes.eventChannel = getEventChannel();
|
|
722
719
|
}
|
|
723
|
-
}
|
|
720
|
+
}
|
|
724
721
|
|
|
725
722
|
function findExistsPageIndex (url) {
|
|
726
723
|
const pages = getCurrentPages();
|
|
@@ -944,7 +941,7 @@ var getSystemInfo = {
|
|
|
944
941
|
};
|
|
945
942
|
|
|
946
943
|
const protocols = {
|
|
947
|
-
navigateTo,
|
|
944
|
+
navigateTo: navigateTo(),
|
|
948
945
|
redirectTo,
|
|
949
946
|
previewImage,
|
|
950
947
|
getSystemInfo,
|
|
@@ -2593,7 +2590,7 @@ if (typeof Proxy !== 'undefined' && "quickapp-webview" !== 'app-plus') {
|
|
|
2593
2590
|
uni[name] = promisify(name, todoApis[name]);
|
|
2594
2591
|
});
|
|
2595
2592
|
Object.keys(extraApi).forEach(name => {
|
|
2596
|
-
uni[name] = promisify(name,
|
|
2593
|
+
uni[name] = promisify(name, extraApi[name]);
|
|
2597
2594
|
});
|
|
2598
2595
|
}
|
|
2599
2596
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-quickapp-webview",
|
|
3
|
-
"version": "2.0.2-alpha-
|
|
3
|
+
"version": "2.0.2-alpha-3080520230615001",
|
|
4
4
|
"description": "uni-app quickapp-webview",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"name": "quickapp-webview",
|
|
18
18
|
"title": "快应用(Webview)版"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "c9d18e44da2ea83e0ca9ed05048bfbad49f0de29"
|
|
21
21
|
}
|