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