@canlooks/can-ui 0.0.124 → 0.0.125
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/dist/cjs/utils/hooks.js
CHANGED
|
@@ -137,7 +137,10 @@ function useContainer(container, effectContainer, defaultContainer) {
|
|
|
137
137
|
return prev || null;
|
|
138
138
|
}, [container]);
|
|
139
139
|
(0, react_1.useEffect)(() => {
|
|
140
|
-
|
|
140
|
+
let _container = effectContainer || defaultContainer;
|
|
141
|
+
if (typeof _container === 'undefined') {
|
|
142
|
+
_container = document.body;
|
|
143
|
+
}
|
|
141
144
|
if (_container) {
|
|
142
145
|
const el = typeof _container === 'function' ? _container() : _container;
|
|
143
146
|
setContainerEl(el);
|
package/dist/cjs/utils/style.js
CHANGED
|
@@ -210,7 +210,6 @@ function useResponsiveValue(prop, disabled = false) {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
console.log(234, responsiveObj, maxBreakpoint, responsiveObj[maxBreakpoint]);
|
|
214
213
|
return responsiveObj[maxBreakpoint];
|
|
215
214
|
};
|
|
216
215
|
const [value, setValue] = (0, hooks_1.useDerivedState)(fn, [breakpoints]);
|
package/dist/esm/utils/hooks.js
CHANGED
|
@@ -122,7 +122,10 @@ export function useContainer(container, effectContainer, defaultContainer) {
|
|
|
122
122
|
return prev || null;
|
|
123
123
|
}, [container]);
|
|
124
124
|
useEffect(() => {
|
|
125
|
-
|
|
125
|
+
let _container = effectContainer || defaultContainer;
|
|
126
|
+
if (typeof _container === 'undefined') {
|
|
127
|
+
_container = document.body;
|
|
128
|
+
}
|
|
126
129
|
if (_container) {
|
|
127
130
|
const el = typeof _container === 'function' ? _container() : _container;
|
|
128
131
|
setContainerEl(el);
|
package/dist/esm/utils/style.js
CHANGED
|
@@ -194,7 +194,6 @@ export function useResponsiveValue(prop, disabled = false) {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
console.log(234, responsiveObj, maxBreakpoint, responsiveObj[maxBreakpoint]);
|
|
198
197
|
return responsiveObj[maxBreakpoint];
|
|
199
198
|
};
|
|
200
199
|
const [value, setValue] = useDerivedState(fn, [breakpoints]);
|