react-vant-nova 1.1.2-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 -3
- package/bundle/react-vant-nova.js +11 -3
- package/bundle/react-vant-nova.min.js +1 -1
- package/es/toast/Toast.js +3 -1
- package/es/toast/method.js +5 -1
- package/es/utils/dom/render.js +3 -1
- package/lib/toast/Toast.js +3 -1
- package/lib/toast/method.js +5 -1
- package/lib/utils/dom/render.js +3 -1
- 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,8 +2064,8 @@ 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
|
-
console.log("render");
|
|
2067
2069
|
fullClone.render(node, container);
|
|
2068
2070
|
} else {
|
|
2069
2071
|
if (createRoot) {
|
|
@@ -5604,6 +5606,8 @@ const Toast$1 = (p) => {
|
|
|
5604
5606
|
}
|
|
5605
5607
|
};
|
|
5606
5608
|
useEffect(() => {
|
|
5609
|
+
debugger;
|
|
5610
|
+
console.log("useEffect");
|
|
5607
5611
|
if (!props.visible) {
|
|
5608
5612
|
lockClick(false);
|
|
5609
5613
|
return;
|
|
@@ -5634,8 +5638,8 @@ const Toast$1 = (p) => {
|
|
|
5634
5638
|
return null;
|
|
5635
5639
|
};
|
|
5636
5640
|
const renderMessage = () => {
|
|
5637
|
-
const { message } = props;
|
|
5638
5641
|
console.log("useRffect \u7684 message");
|
|
5642
|
+
const { message } = props;
|
|
5639
5643
|
if (isDef(message) && message !== "") {
|
|
5640
5644
|
return /* @__PURE__ */ React.createElement("div", {
|
|
5641
5645
|
className: clsx(bem$10("info"))
|
|
@@ -5700,6 +5704,7 @@ const ToastObj = (p) => {
|
|
|
5700
5704
|
const bodyContainer = resolveContainer(teleport);
|
|
5701
5705
|
bodyContainer.appendChild(container);
|
|
5702
5706
|
const TempToast = () => {
|
|
5707
|
+
debugger;
|
|
5703
5708
|
const options = {
|
|
5704
5709
|
duration: 2e3,
|
|
5705
5710
|
...props
|
|
@@ -5719,6 +5724,7 @@ const ToastObj = (p) => {
|
|
|
5719
5724
|
}, +state.duration || +defaultOptions.duration);
|
|
5720
5725
|
}, [container]);
|
|
5721
5726
|
const destroy = useCallback(() => {
|
|
5727
|
+
debugger;
|
|
5722
5728
|
setVisible(false);
|
|
5723
5729
|
if (onClose)
|
|
5724
5730
|
onClose();
|
|
@@ -5733,6 +5739,8 @@ const ToastObj = (p) => {
|
|
|
5733
5739
|
[setState]
|
|
5734
5740
|
);
|
|
5735
5741
|
useIsomorphicLayoutEffect(() => {
|
|
5742
|
+
debugger;
|
|
5743
|
+
console.log("useIsomorphicLayoutEffect");
|
|
5736
5744
|
setVisible(true);
|
|
5737
5745
|
if (!allowMultiple)
|
|
5738
5746
|
syncClear();
|
|
@@ -5740,7 +5748,6 @@ const ToastObj = (p) => {
|
|
|
5740
5748
|
if (state.duration !== 0 && "duration" in state) {
|
|
5741
5749
|
timer = window.setTimeout(destroy, +state.duration);
|
|
5742
5750
|
}
|
|
5743
|
-
console.log("useIsomorphicLayoutEffect");
|
|
5744
5751
|
return () => {
|
|
5745
5752
|
if (timer !== 0) {
|
|
5746
5753
|
window.clearTimeout(timer);
|
|
@@ -5756,6 +5763,7 @@ const ToastObj = (p) => {
|
|
|
5756
5763
|
});
|
|
5757
5764
|
};
|
|
5758
5765
|
render(/* @__PURE__ */ React.createElement(TempToast, null), container);
|
|
5766
|
+
debugger;
|
|
5759
5767
|
return update;
|
|
5760
5768
|
};
|
|
5761
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,8 +2845,8 @@
|
|
|
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
|
-
console.log("render");
|
|
2848
2850
|
fullClone.render(node, container);
|
|
2849
2851
|
} else {
|
|
2850
2852
|
if (createRoot) {
|
|
@@ -12163,6 +12165,8 @@
|
|
|
12163
12165
|
}
|
|
12164
12166
|
};
|
|
12165
12167
|
React.useEffect(() => {
|
|
12168
|
+
debugger;
|
|
12169
|
+
console.log("useEffect");
|
|
12166
12170
|
if (!props.visible) {
|
|
12167
12171
|
lockClick(false);
|
|
12168
12172
|
return;
|
|
@@ -12193,8 +12197,8 @@
|
|
|
12193
12197
|
return null;
|
|
12194
12198
|
};
|
|
12195
12199
|
const renderMessage = () => {
|
|
12196
|
-
const { message } = props;
|
|
12197
12200
|
console.log("useRffect \u7684 message");
|
|
12201
|
+
const { message } = props;
|
|
12198
12202
|
if (isDef(message) && message !== "") {
|
|
12199
12203
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12200
12204
|
className: clsx(bem$10("info"))
|
|
@@ -12259,6 +12263,7 @@
|
|
|
12259
12263
|
const bodyContainer = resolveContainer(teleport);
|
|
12260
12264
|
bodyContainer.appendChild(container);
|
|
12261
12265
|
const TempToast = () => {
|
|
12266
|
+
debugger;
|
|
12262
12267
|
const options = {
|
|
12263
12268
|
duration: 2e3,
|
|
12264
12269
|
...props
|
|
@@ -12278,6 +12283,7 @@
|
|
|
12278
12283
|
}, +state.duration || +defaultOptions.duration);
|
|
12279
12284
|
}, [container]);
|
|
12280
12285
|
const destroy = React.useCallback(() => {
|
|
12286
|
+
debugger;
|
|
12281
12287
|
setVisible(false);
|
|
12282
12288
|
if (onClose)
|
|
12283
12289
|
onClose();
|
|
@@ -12292,6 +12298,8 @@
|
|
|
12292
12298
|
[setState]
|
|
12293
12299
|
);
|
|
12294
12300
|
useIsomorphicLayoutEffect$1(() => {
|
|
12301
|
+
debugger;
|
|
12302
|
+
console.log("useIsomorphicLayoutEffect");
|
|
12295
12303
|
setVisible(true);
|
|
12296
12304
|
if (!allowMultiple)
|
|
12297
12305
|
syncClear();
|
|
@@ -12299,7 +12307,6 @@
|
|
|
12299
12307
|
if (state.duration !== 0 && "duration" in state) {
|
|
12300
12308
|
timer = window.setTimeout(destroy, +state.duration);
|
|
12301
12309
|
}
|
|
12302
|
-
console.log("useIsomorphicLayoutEffect");
|
|
12303
12310
|
return () => {
|
|
12304
12311
|
if (timer !== 0) {
|
|
12305
12312
|
window.clearTimeout(timer);
|
|
@@ -12315,6 +12322,7 @@
|
|
|
12315
12322
|
});
|
|
12316
12323
|
};
|
|
12317
12324
|
render(/* @__PURE__ */ React__default["default"].createElement(TempToast, null), container);
|
|
12325
|
+
debugger;
|
|
12318
12326
|
return update2;
|
|
12319
12327
|
};
|
|
12320
12328
|
function parseOptions(message) {
|