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.

Potentially problematic release.


This version of react-vant-nova might be problematic. Click here for more details.

package/es/toast/Toast.js CHANGED
@@ -23,6 +23,8 @@ const Toast = p => {
23
23
  }
24
24
  };
25
25
  useEffect(() => {
26
+ debugger;
27
+ console.log('useEffect');
26
28
  if (!props.visible) {
27
29
  lockClick(false);
28
30
  return;
@@ -59,6 +61,7 @@ const Toast = p => {
59
61
  return null;
60
62
  };
61
63
  const renderMessage = () => {
64
+ console.log('useRffect 的 message');
62
65
  const {
63
66
  message
64
67
  } = props;
@@ -50,6 +50,7 @@ const ToastObj = p => {
50
50
  const bodyContainer = resolveContainer(teleport);
51
51
  bodyContainer.appendChild(container);
52
52
  const TempToast = () => {
53
+ debugger;
53
54
  const options = Object.assign({
54
55
  duration: 2000
55
56
  }, props);
@@ -71,6 +72,7 @@ const ToastObj = p => {
71
72
  }, [container]);
72
73
  // close with animation
73
74
  const destroy = useCallback(() => {
75
+ debugger;
74
76
  setVisible(false);
75
77
  if (onClose) onClose();
76
78
  }, []);
@@ -79,6 +81,8 @@ const ToastObj = p => {
79
81
  setState(prev => typeof nextState === 'function' ? Object.assign(Object.assign({}, prev), nextState(prev)) : Object.assign(Object.assign({}, prev), nextState));
80
82
  }, [setState]);
81
83
  useIsomorphicLayoutEffect(() => {
84
+ debugger;
85
+ console.log('useIsomorphicLayoutEffect');
82
86
  setVisible(true);
83
87
  if (!allowMultiple) syncClear();
84
88
  toastArray.push(internalOnClosed);
@@ -92,14 +96,19 @@ const ToastObj = p => {
92
96
  };
93
97
  // eslint-disable-next-line react-hooks/exhaustive-deps
94
98
  }, []);
95
- return _jsx(BaseToast, Object.assign({}, state, {
96
- visible: visible,
97
- teleport: () => container,
98
- onClose: destroy,
99
- onClosed: internalOnClosed
100
- }));
99
+ return (
100
+ // @ts-ignore
101
+ _jsx(BaseToast, Object.assign({}, state, {
102
+ visible: visible,
103
+ teleport: () => container,
104
+ onClose: destroy,
105
+ onClosed: internalOnClosed
106
+ }))
107
+ );
101
108
  };
109
+ // @ts-ignore
102
110
  render(_jsx(TempToast, {}), container);
111
+ debugger;
103
112
  return update;
104
113
  };
105
114
  function parseOptions(message) {
@@ -8,8 +8,10 @@ const {
8
8
  let createRoot;
9
9
  // 确保在React 18+版本中获取createRoot
10
10
  if (fullClone.createRoot) {
11
+ console.log('render');
11
12
  createRoot = fullClone.createRoot;
12
13
  } else {
14
+ console.log('render');
13
15
  // 如果createRoot不可用,尝试从react-dom/client导入
14
16
  try {
15
17
  // eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -33,6 +35,7 @@ const MARK = '__react_vant_root__';
33
35
  * 如果ReactDOM.render不可用,将降级使用createRoot(如果可用)
34
36
  /******* 57770e2e-0e81-41a7-aee6-9175a4a59062 *******/
35
37
  function legacyRender(node, container) {
38
+ console.log('render-fullClone');
36
39
  // 使用ReactDOM.render的替代方案,仅用于旧版本React
37
40
  // @ts-ignore
38
41
  if (fullClone.render) {
@@ -55,6 +55,8 @@ const Toast = p => {
55
55
  }
56
56
  };
57
57
  (0, _react().useEffect)(() => {
58
+ debugger;
59
+ console.log('useEffect');
58
60
  if (!props.visible) {
59
61
  (0, _lockClick.lockClick)(false);
60
62
  return;
@@ -91,6 +93,7 @@ const Toast = p => {
91
93
  return null;
92
94
  };
93
95
  const renderMessage = () => {
96
+ console.log('useRffect 的 message');
94
97
  const {
95
98
  message
96
99
  } = props;
@@ -70,6 +70,7 @@ const ToastObj = p => {
70
70
  const bodyContainer = (0, _getContainer.resolveContainer)(teleport);
71
71
  bodyContainer.appendChild(container);
72
72
  const TempToast = () => {
73
+ debugger;
73
74
  const options = Object.assign({
74
75
  duration: 2000
75
76
  }, props);
@@ -91,6 +92,7 @@ const ToastObj = p => {
91
92
  }, [container]);
92
93
  // close with animation
93
94
  const destroy = (0, _react().useCallback)(() => {
95
+ debugger;
94
96
  setVisible(false);
95
97
  if (onClose) onClose();
96
98
  }, []);
@@ -99,6 +101,8 @@ const ToastObj = p => {
99
101
  setState(prev => typeof nextState === 'function' ? Object.assign(Object.assign({}, prev), nextState(prev)) : Object.assign(Object.assign({}, prev), nextState));
100
102
  }, [setState]);
101
103
  (0, _hooks.useIsomorphicLayoutEffect)(() => {
104
+ debugger;
105
+ console.log('useIsomorphicLayoutEffect');
102
106
  setVisible(true);
103
107
  if (!allowMultiple) syncClear();
104
108
  toastArray.push(internalOnClosed);
@@ -112,14 +116,19 @@ const ToastObj = p => {
112
116
  };
113
117
  // eslint-disable-next-line react-hooks/exhaustive-deps
114
118
  }, []);
115
- return (0, _jsxRuntime().jsx)(_Toast.default, Object.assign({}, state, {
116
- visible: visible,
117
- teleport: () => container,
118
- onClose: destroy,
119
- onClosed: internalOnClosed
120
- }));
119
+ return (
120
+ // @ts-ignore
121
+ (0, _jsxRuntime().jsx)(_Toast.default, Object.assign({}, state, {
122
+ visible: visible,
123
+ teleport: () => container,
124
+ onClose: destroy,
125
+ onClosed: internalOnClosed
126
+ }))
127
+ );
121
128
  };
129
+ // @ts-ignore
122
130
  (0, _render.render)((0, _jsxRuntime().jsx)(TempToast, {}), container);
131
+ debugger;
123
132
  return update;
124
133
  };
125
134
  function parseOptions(message) {
@@ -29,8 +29,10 @@ const {
29
29
  let createRoot;
30
30
  // 确保在React 18+版本中获取createRoot
31
31
  if (fullClone.createRoot) {
32
+ console.log('render');
32
33
  createRoot = fullClone.createRoot;
33
34
  } else {
35
+ console.log('render');
34
36
  // 如果createRoot不可用,尝试从react-dom/client导入
35
37
  try {
36
38
  // eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -54,6 +56,7 @@ const MARK = '__react_vant_root__';
54
56
  * 如果ReactDOM.render不可用,将降级使用createRoot(如果可用)
55
57
  /******* 57770e2e-0e81-41a7-aee6-9175a4a59062 *******/
56
58
  function legacyRender(node, container) {
59
+ console.log('render-fullClone');
57
60
  // 使用ReactDOM.render的替代方案,仅用于旧版本React
58
61
  // @ts-ignore
59
62
  if (fullClone.render) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-vant-nova",
3
- "version": "1.1.1-test",
3
+ "version": "1.1.3-test",
4
4
  "description": "React Mobile UI Components based on Vant UI (兼容 React 19+,新增轻量 Table 组件)",
5
5
  "keywords": [
6
6
  "ui",