react-vant-nova 1.1.1-test → 1.1.3-test
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/bundle/react-vant-nova.es.js +11 -0
- package/bundle/react-vant-nova.js +11 -0
- package/bundle/react-vant-nova.min.js +1 -1
- package/es/toast/Toast.js +3 -0
- package/es/toast/method.js +15 -6
- package/es/utils/dom/render.js +3 -0
- package/lib/toast/Toast.js +3 -0
- package/lib/toast/method.js +15 -6
- package/lib/utils/dom/render.js +3 -0
- package/package.json +1 -1
|
@@ -2047,8 +2047,10 @@ const fullClone = {
|
|
|
2047
2047
|
const { unmountComponentAtNode } = fullClone;
|
|
2048
2048
|
let createRoot;
|
|
2049
2049
|
if (fullClone.createRoot) {
|
|
2050
|
+
console.log("render");
|
|
2050
2051
|
createRoot = fullClone.createRoot;
|
|
2051
2052
|
} else {
|
|
2053
|
+
console.log("render");
|
|
2052
2054
|
try {
|
|
2053
2055
|
createRoot = require("react-dom/client").createRoot;
|
|
2054
2056
|
} catch (e) {
|
|
@@ -2062,6 +2064,7 @@ function toggleWarning(skip) {
|
|
|
2062
2064
|
}
|
|
2063
2065
|
const MARK = "__react_vant_root__";
|
|
2064
2066
|
function legacyRender(node, container) {
|
|
2067
|
+
console.log("render-fullClone");
|
|
2065
2068
|
if (fullClone.render) {
|
|
2066
2069
|
fullClone.render(node, container);
|
|
2067
2070
|
} else {
|
|
@@ -5603,6 +5606,8 @@ const Toast$1 = (p) => {
|
|
|
5603
5606
|
}
|
|
5604
5607
|
};
|
|
5605
5608
|
useEffect(() => {
|
|
5609
|
+
debugger;
|
|
5610
|
+
console.log("useEffect");
|
|
5606
5611
|
if (!props.visible) {
|
|
5607
5612
|
lockClick(false);
|
|
5608
5613
|
return;
|
|
@@ -5633,6 +5638,7 @@ const Toast$1 = (p) => {
|
|
|
5633
5638
|
return null;
|
|
5634
5639
|
};
|
|
5635
5640
|
const renderMessage = () => {
|
|
5641
|
+
console.log("useRffect \u7684 message");
|
|
5636
5642
|
const { message } = props;
|
|
5637
5643
|
if (isDef(message) && message !== "") {
|
|
5638
5644
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -5698,6 +5704,7 @@ const ToastObj = (p) => {
|
|
|
5698
5704
|
const bodyContainer = resolveContainer(teleport);
|
|
5699
5705
|
bodyContainer.appendChild(container);
|
|
5700
5706
|
const TempToast = () => {
|
|
5707
|
+
debugger;
|
|
5701
5708
|
const options = {
|
|
5702
5709
|
duration: 2e3,
|
|
5703
5710
|
...props
|
|
@@ -5717,6 +5724,7 @@ const ToastObj = (p) => {
|
|
|
5717
5724
|
}, +state.duration || +defaultOptions.duration);
|
|
5718
5725
|
}, [container]);
|
|
5719
5726
|
const destroy = useCallback(() => {
|
|
5727
|
+
debugger;
|
|
5720
5728
|
setVisible(false);
|
|
5721
5729
|
if (onClose)
|
|
5722
5730
|
onClose();
|
|
@@ -5731,6 +5739,8 @@ const ToastObj = (p) => {
|
|
|
5731
5739
|
[setState]
|
|
5732
5740
|
);
|
|
5733
5741
|
useIsomorphicLayoutEffect(() => {
|
|
5742
|
+
debugger;
|
|
5743
|
+
console.log("useIsomorphicLayoutEffect");
|
|
5734
5744
|
setVisible(true);
|
|
5735
5745
|
if (!allowMultiple)
|
|
5736
5746
|
syncClear();
|
|
@@ -5753,6 +5763,7 @@ const ToastObj = (p) => {
|
|
|
5753
5763
|
});
|
|
5754
5764
|
};
|
|
5755
5765
|
render(/* @__PURE__ */ React.createElement(TempToast, null), container);
|
|
5766
|
+
debugger;
|
|
5756
5767
|
return update;
|
|
5757
5768
|
};
|
|
5758
5769
|
function parseOptions(message) {
|
|
@@ -2828,8 +2828,10 @@
|
|
|
2828
2828
|
const { unmountComponentAtNode } = fullClone;
|
|
2829
2829
|
let createRoot;
|
|
2830
2830
|
if (fullClone.createRoot) {
|
|
2831
|
+
console.log("render");
|
|
2831
2832
|
createRoot = fullClone.createRoot;
|
|
2832
2833
|
} else {
|
|
2834
|
+
console.log("render");
|
|
2833
2835
|
try {
|
|
2834
2836
|
createRoot = require("react-dom/client").createRoot;
|
|
2835
2837
|
} catch (e2) {
|
|
@@ -2843,6 +2845,7 @@
|
|
|
2843
2845
|
}
|
|
2844
2846
|
const MARK = "__react_vant_root__";
|
|
2845
2847
|
function legacyRender(node, container) {
|
|
2848
|
+
console.log("render-fullClone");
|
|
2846
2849
|
if (fullClone.render) {
|
|
2847
2850
|
fullClone.render(node, container);
|
|
2848
2851
|
} else {
|
|
@@ -12162,6 +12165,8 @@
|
|
|
12162
12165
|
}
|
|
12163
12166
|
};
|
|
12164
12167
|
React.useEffect(() => {
|
|
12168
|
+
debugger;
|
|
12169
|
+
console.log("useEffect");
|
|
12165
12170
|
if (!props.visible) {
|
|
12166
12171
|
lockClick(false);
|
|
12167
12172
|
return;
|
|
@@ -12192,6 +12197,7 @@
|
|
|
12192
12197
|
return null;
|
|
12193
12198
|
};
|
|
12194
12199
|
const renderMessage = () => {
|
|
12200
|
+
console.log("useRffect \u7684 message");
|
|
12195
12201
|
const { message } = props;
|
|
12196
12202
|
if (isDef(message) && message !== "") {
|
|
12197
12203
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -12257,6 +12263,7 @@
|
|
|
12257
12263
|
const bodyContainer = resolveContainer(teleport);
|
|
12258
12264
|
bodyContainer.appendChild(container);
|
|
12259
12265
|
const TempToast = () => {
|
|
12266
|
+
debugger;
|
|
12260
12267
|
const options = {
|
|
12261
12268
|
duration: 2e3,
|
|
12262
12269
|
...props
|
|
@@ -12276,6 +12283,7 @@
|
|
|
12276
12283
|
}, +state.duration || +defaultOptions.duration);
|
|
12277
12284
|
}, [container]);
|
|
12278
12285
|
const destroy = React.useCallback(() => {
|
|
12286
|
+
debugger;
|
|
12279
12287
|
setVisible(false);
|
|
12280
12288
|
if (onClose)
|
|
12281
12289
|
onClose();
|
|
@@ -12290,6 +12298,8 @@
|
|
|
12290
12298
|
[setState]
|
|
12291
12299
|
);
|
|
12292
12300
|
useIsomorphicLayoutEffect$1(() => {
|
|
12301
|
+
debugger;
|
|
12302
|
+
console.log("useIsomorphicLayoutEffect");
|
|
12293
12303
|
setVisible(true);
|
|
12294
12304
|
if (!allowMultiple)
|
|
12295
12305
|
syncClear();
|
|
@@ -12312,6 +12322,7 @@
|
|
|
12312
12322
|
});
|
|
12313
12323
|
};
|
|
12314
12324
|
render(/* @__PURE__ */ React__default["default"].createElement(TempToast, null), container);
|
|
12325
|
+
debugger;
|
|
12315
12326
|
return update2;
|
|
12316
12327
|
};
|
|
12317
12328
|
function parseOptions(message) {
|