Skip to content

Commit

Permalink
fix(react): 修复小程序插件不能触发事件的问题,fix #11241
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangshuangquan authored Feb 15, 2022
1 parent b922302 commit 9663988
Show file tree
Hide file tree
Showing 21 changed files with 149 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ require(\\"./taro\\");
var ReactDOM$1;
var pageKeyId = Object(taro_runtime[\\"incrementId\\"])();
var hooks$1 = taro_runtime[\\"container\\"].get(taro_runtime[\\"SERVICE_IDENTIFIER\\"].Hooks);
function setReconciler() {
function setReconciler(ReactDOM) {
var _a;
hooks$1.getLifecycle = function(instance, lifecycle) {
lifecycle = lifecycle.replace(/^on(Show|Hide)$/, \\"componentDid$1\\");
Expand All @@ -682,7 +682,7 @@ require(\\"./taro\\");
event.type = event.type.replace(/-/g, \\"\\");
}));
hooks$1.batchedEventUpdates = function(cb) {
ReactDOM$1.unstable_batchedUpdates(cb);
ReactDOM.unstable_batchedUpdates(cb);
};
hooks$1.mergePageInstance = function(prev, next) {
if (!prev || !next) return;
Expand Down Expand Up @@ -762,7 +762,7 @@ require(\\"./taro\\");
var appInstanceRef = react.createRef();
var isReactComponent = isClassComponent(R$1, App);
var appWrapper;
setReconciler();
setReconciler(ReactDOM$1);
function getAppInstance() {
return appInstanceRef.current;
}
Expand Down Expand Up @@ -1091,15 +1091,15 @@ require(\\"./taro\\");
} ]);
return Entry;
}(R.Component);
setReconciler();
setReconciler(ReactDOM);
var app = taro_runtime[\\"document\\"].getElementById(\\"app\\");
ReactDOM.render(h(Entry, {}), app);
}
function createNativeComponentConfig(Component, react, reactdom, componentConfig) {
runtime_R = react;
h = react.createElement;
runtime_ReactDOM = reactdom;
setReconciler();
setReconciler(runtime_ReactDOM);
var componentObj = {
options: componentConfig,
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ require(\\"./taro\\");
var ReactDOM$1;
var pageKeyId = Object(taro_runtime[\\"incrementId\\"])();
var hooks$1 = taro_runtime[\\"container\\"].get(taro_runtime[\\"SERVICE_IDENTIFIER\\"].Hooks);
function setReconciler() {
function setReconciler(ReactDOM) {
var _a;
hooks$1.getLifecycle = function(instance, lifecycle) {
lifecycle = lifecycle.replace(/^on(Show|Hide)$/, \\"componentDid$1\\");
Expand All @@ -475,7 +475,7 @@ require(\\"./taro\\");
event.type = event.type.replace(/-/g, \\"\\");
}));
hooks$1.batchedEventUpdates = function(cb) {
ReactDOM$1.unstable_batchedUpdates(cb);
ReactDOM.unstable_batchedUpdates(cb);
};
hooks$1.mergePageInstance = function(prev, next) {
if (!prev || !next) return;
Expand Down Expand Up @@ -555,7 +555,7 @@ require(\\"./taro\\");
var appInstanceRef = react.createRef();
var isReactComponent = isClassComponent(R$1, App);
var appWrapper;
setReconciler();
setReconciler(ReactDOM$1);
function getAppInstance() {
return appInstanceRef.current;
}
Expand Down Expand Up @@ -884,15 +884,15 @@ require(\\"./taro\\");
} ]);
return Entry;
}(R.Component);
setReconciler();
setReconciler(ReactDOM);
var app = taro_runtime[\\"document\\"].getElementById(\\"app\\");
ReactDOM.render(h(Entry, {}), app);
}
function createNativeComponentConfig(Component, react, reactdom, componentConfig) {
runtime_R = react;
h = react.createElement;
runtime_ReactDOM = reactdom;
setReconciler();
setReconciler(runtime_ReactDOM);
var componentObj = {
options: componentConfig,
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ require(\\"./taro\\");
var ReactDOM$1;
var pageKeyId = Object(taro_runtime[\\"incrementId\\"])();
var hooks$1 = taro_runtime[\\"container\\"].get(taro_runtime[\\"SERVICE_IDENTIFIER\\"].Hooks);
function setReconciler() {
function setReconciler(ReactDOM) {
var _a;
hooks$1.getLifecycle = function(instance, lifecycle) {
lifecycle = lifecycle.replace(/^on(Show|Hide)$/, \\"componentDid$1\\");
Expand All @@ -194,7 +194,7 @@ require(\\"./taro\\");
event.type = event.type.replace(/-/g, \\"\\");
}));
hooks$1.batchedEventUpdates = function(cb) {
ReactDOM$1.unstable_batchedUpdates(cb);
ReactDOM.unstable_batchedUpdates(cb);
};
hooks$1.mergePageInstance = function(prev, next) {
if (!prev || !next) return;
Expand Down Expand Up @@ -274,7 +274,7 @@ require(\\"./taro\\");
var appInstanceRef = react.createRef();
var isReactComponent = isClassComponent(R$1, App);
var appWrapper;
setReconciler();
setReconciler(ReactDOM$1);
function getAppInstance() {
return appInstanceRef.current;
}
Expand Down Expand Up @@ -603,15 +603,15 @@ require(\\"./taro\\");
} ]);
return Entry;
}(R.Component);
setReconciler();
setReconciler(ReactDOM);
var app = taro_runtime[\\"document\\"].getElementById(\\"app\\");
ReactDOM.render(h(Entry, {}), app);
}
function createNativeComponentConfig(Component, react, reactdom, componentConfig) {
runtime_R = react;
h = react.createElement;
runtime_ReactDOM = reactdom;
setReconciler();
setReconciler(runtime_ReactDOM);
var componentObj = {
options: componentConfig,
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ require(\\"./taro\\");
var ReactDOM$1;
var pageKeyId = Object(taro_runtime[\\"incrementId\\"])();
var hooks$1 = taro_runtime[\\"container\\"].get(taro_runtime[\\"SERVICE_IDENTIFIER\\"].Hooks);
function setReconciler() {
function setReconciler(ReactDOM) {
var _a;
hooks$1.getLifecycle = function(instance, lifecycle) {
lifecycle = lifecycle.replace(/^on(Show|Hide)$/, \\"componentDid$1\\");
Expand All @@ -475,7 +475,7 @@ require(\\"./taro\\");
event.type = event.type.replace(/-/g, \\"\\");
}));
hooks$1.batchedEventUpdates = function(cb) {
ReactDOM$1.unstable_batchedUpdates(cb);
ReactDOM.unstable_batchedUpdates(cb);
};
hooks$1.mergePageInstance = function(prev, next) {
if (!prev || !next) return;
Expand Down Expand Up @@ -555,7 +555,7 @@ require(\\"./taro\\");
var appInstanceRef = react.createRef();
var isReactComponent = isClassComponent(R$1, App);
var appWrapper;
setReconciler();
setReconciler(ReactDOM$1);
function getAppInstance() {
return appInstanceRef.current;
}
Expand Down Expand Up @@ -884,15 +884,15 @@ require(\\"./taro\\");
} ]);
return Entry;
}(R.Component);
setReconciler();
setReconciler(ReactDOM);
var app = taro_runtime[\\"document\\"].getElementById(\\"app\\");
ReactDOM.render(h(Entry, {}), app);
}
function createNativeComponentConfig(Component, react, reactdom, componentConfig) {
runtime_R = react;
h = react.createElement;
runtime_ReactDOM = reactdom;
setReconciler();
setReconciler(runtime_ReactDOM);
var componentObj = {
options: componentConfig,
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ require(\\"./taro\\");
var ReactDOM$1;
var pageKeyId = Object(taro_runtime[\\"incrementId\\"])();
var hooks$1 = taro_runtime[\\"container\\"].get(taro_runtime[\\"SERVICE_IDENTIFIER\\"].Hooks);
function setReconciler() {
function setReconciler(ReactDOM) {
var _a;
hooks$1.getLifecycle = function(instance, lifecycle) {
lifecycle = lifecycle.replace(/^on(Show|Hide)$/, \\"componentDid$1\\");
Expand All @@ -475,7 +475,7 @@ require(\\"./taro\\");
event.type = event.type.replace(/-/g, \\"\\");
}));
hooks$1.batchedEventUpdates = function(cb) {
ReactDOM$1.unstable_batchedUpdates(cb);
ReactDOM.unstable_batchedUpdates(cb);
};
hooks$1.mergePageInstance = function(prev, next) {
if (!prev || !next) return;
Expand Down Expand Up @@ -555,7 +555,7 @@ require(\\"./taro\\");
var appInstanceRef = react.createRef();
var isReactComponent = isClassComponent(R$1, App);
var appWrapper;
setReconciler();
setReconciler(ReactDOM$1);
function getAppInstance() {
return appInstanceRef.current;
}
Expand Down Expand Up @@ -884,15 +884,15 @@ require(\\"./taro\\");
} ]);
return Entry;
}(R.Component);
setReconciler();
setReconciler(ReactDOM);
var app = taro_runtime[\\"document\\"].getElementById(\\"app\\");
ReactDOM.render(h(Entry, {}), app);
}
function createNativeComponentConfig(Component, react, reactdom, componentConfig) {
runtime_R = react;
h = react.createElement;
runtime_ReactDOM = reactdom;
setReconciler();
setReconciler(runtime_ReactDOM);
var componentObj = {
options: componentConfig,
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ require(\\"./taro\\");
var ReactDOM$1;
var pageKeyId = Object(taro_runtime[\\"incrementId\\"])();
var hooks$1 = taro_runtime[\\"container\\"].get(taro_runtime[\\"SERVICE_IDENTIFIER\\"].Hooks);
function setReconciler() {
function setReconciler(ReactDOM) {
var _a;
hooks$1.getLifecycle = function(instance, lifecycle) {
lifecycle = lifecycle.replace(/^on(Show|Hide)$/, \\"componentDid$1\\");
Expand All @@ -475,7 +475,7 @@ require(\\"./taro\\");
event.type = event.type.replace(/-/g, \\"\\");
}));
hooks$1.batchedEventUpdates = function(cb) {
ReactDOM$1.unstable_batchedUpdates(cb);
ReactDOM.unstable_batchedUpdates(cb);
};
hooks$1.mergePageInstance = function(prev, next) {
if (!prev || !next) return;
Expand Down Expand Up @@ -555,7 +555,7 @@ require(\\"./taro\\");
var appInstanceRef = react.createRef();
var isReactComponent = isClassComponent(R$1, App);
var appWrapper;
setReconciler();
setReconciler(ReactDOM$1);
function getAppInstance() {
return appInstanceRef.current;
}
Expand Down Expand Up @@ -884,15 +884,15 @@ require(\\"./taro\\");
} ]);
return Entry;
}(R.Component);
setReconciler();
setReconciler(ReactDOM);
var app = taro_runtime[\\"document\\"].getElementById(\\"app\\");
ReactDOM.render(h(Entry, {}), app);
}
function createNativeComponentConfig(Component, react, reactdom, componentConfig) {
runtime_R = react;
h = react.createElement;
runtime_ReactDOM = reactdom;
setReconciler();
setReconciler(runtime_ReactDOM);
var componentObj = {
options: componentConfig,
properties: {
Expand Down Expand Up @@ -2753,7 +2753,7 @@ require(\\"./taro\\");
var ReactDOM$1;
var pageKeyId = Object(taro_runtime[\\"incrementId\\"])();
var hooks$1 = taro_runtime[\\"container\\"].get(taro_runtime[\\"SERVICE_IDENTIFIER\\"].Hooks);
function setReconciler() {
function setReconciler(ReactDOM) {
var _a;
hooks$1.getLifecycle = function(instance, lifecycle) {
lifecycle = lifecycle.replace(/^on(Show|Hide)$/, \\"componentDid$1\\");
Expand All @@ -2763,7 +2763,7 @@ require(\\"./taro\\");
event.type = event.type.replace(/-/g, \\"\\");
}));
hooks$1.batchedEventUpdates = function(cb) {
ReactDOM$1.unstable_batchedUpdates(cb);
ReactDOM.unstable_batchedUpdates(cb);
};
hooks$1.mergePageInstance = function(prev, next) {
if (!prev || !next) return;
Expand Down Expand Up @@ -2843,7 +2843,7 @@ require(\\"./taro\\");
var appInstanceRef = react.createRef();
var isReactComponent = isClassComponent(R$1, App);
var appWrapper;
setReconciler();
setReconciler(ReactDOM$1);
function getAppInstance() {
return appInstanceRef.current;
}
Expand Down Expand Up @@ -3172,15 +3172,15 @@ require(\\"./taro\\");
} ]);
return Entry;
}(R.Component);
setReconciler();
setReconciler(ReactDOM);
var app = taro_runtime[\\"document\\"].getElementById(\\"app\\");
ReactDOM.render(h(Entry, {}), app);
}
function createNativeComponentConfig(Component, react, reactdom, componentConfig) {
runtime_R = react;
h = react.createElement;
runtime_ReactDOM = reactdom;
setReconciler();
setReconciler(runtime_ReactDOM);
var componentObj = {
options: componentConfig,
properties: {
Expand Down Expand Up @@ -4979,7 +4979,7 @@ require(\\"./taro\\");
var ReactDOM$1;
var pageKeyId = Object(taro_runtime[\\"incrementId\\"])();
var hooks$1 = taro_runtime[\\"container\\"].get(taro_runtime[\\"SERVICE_IDENTIFIER\\"].Hooks);
function setReconciler() {
function setReconciler(ReactDOM) {
var _a;
hooks$1.getLifecycle = function(instance, lifecycle) {
lifecycle = lifecycle.replace(/^on(Show|Hide)$/, \\"componentDid$1\\");
Expand All @@ -4989,7 +4989,7 @@ require(\\"./taro\\");
event.type = event.type.replace(/-/g, \\"\\");
}));
hooks$1.batchedEventUpdates = function(cb) {
ReactDOM$1.unstable_batchedUpdates(cb);
ReactDOM.unstable_batchedUpdates(cb);
};
hooks$1.mergePageInstance = function(prev, next) {
if (!prev || !next) return;
Expand Down Expand Up @@ -5069,7 +5069,7 @@ require(\\"./taro\\");
var appInstanceRef = react.createRef();
var isReactComponent = isClassComponent(R$1, App);
var appWrapper;
setReconciler();
setReconciler(ReactDOM$1);
function getAppInstance() {
return appInstanceRef.current;
}
Expand Down Expand Up @@ -5398,15 +5398,15 @@ require(\\"./taro\\");
} ]);
return Entry;
}(R.Component);
setReconciler();
setReconciler(ReactDOM);
var app = taro_runtime[\\"document\\"].getElementById(\\"app\\");
ReactDOM.render(h(Entry, {}), app);
}
function createNativeComponentConfig(Component, react, reactdom, componentConfig) {
runtime_R = react;
h = react.createElement;
runtime_ReactDOM = reactdom;
setReconciler();
setReconciler(runtime_ReactDOM);
var componentObj = {
options: componentConfig,
properties: {
Expand Down
Loading

0 comments on commit 9663988

Please sign in to comment.