@nutui/nutui-react-taro 1.4.5-beta.0 → 1.4.6-beta.0
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/CHANGELOG.md +8 -8
- package/dist/esm/ActionSheet.js +6 -5
- package/dist/esm/Address.js +8 -8
- package/dist/esm/Audio.js +8 -8
- package/dist/esm/Avatar.js +3 -3
- package/dist/esm/BackTop.js +3 -3
- package/dist/esm/Badge.js +3 -3
- package/dist/esm/Barrage.js +2 -2
- package/dist/esm/Button.js +3 -3
- package/dist/esm/Calendar.js +8 -7
- package/dist/esm/CalendarItem.js +3 -3
- package/dist/esm/Card.js +4 -4
- package/dist/esm/Cascader.js +7 -6
- package/dist/esm/Cell.js +3 -3
- package/dist/esm/Checkbox.js +3 -3
- package/dist/esm/CheckboxGroup.js +3 -3
- package/dist/esm/CollapseItem.js +3 -3
- package/dist/esm/DatePicker.js +8 -7
- package/dist/esm/Dialog.js +4 -4
- package/dist/esm/Drag.js +2 -2
- package/dist/esm/Elevator.js +2 -2
- package/dist/esm/Ellipsis.js +3 -3
- package/dist/esm/FixedNav.js +5 -4
- package/dist/esm/Form.js +5 -5
- package/dist/esm/FormItem.js +4 -4
- package/dist/esm/GridItem.js +3 -3
- package/dist/esm/Icon.js +2 -2
- package/dist/esm/Image.js +3 -3
- package/dist/esm/ImagePreview.js +6 -5
- package/dist/esm/Infiniteloading.js +3 -3
- package/dist/esm/Input.js +3 -3
- package/dist/esm/InputNumber.js +3 -3
- package/dist/esm/Menu.js +3 -3
- package/dist/esm/MenuItem.js +5 -4
- package/dist/esm/NavBar.js +3 -3
- package/dist/esm/NoticeBar.js +4 -4
- package/dist/esm/NumberKeyboard.js +6 -5
- package/dist/esm/Overlay.js +3 -2
- package/dist/esm/Picker.js +7 -6
- package/dist/esm/Popover.js +6 -5
- package/dist/esm/Popup.js +5 -4
- package/dist/esm/Progress.js +3 -3
- package/dist/esm/PullToRefresh.js +3 -2
- package/dist/esm/Radio.js +2 -2
- package/dist/esm/RadioGroup.js +3 -3
- package/dist/esm/Range.js +5 -5
- package/dist/esm/Rate.js +3 -3
- package/dist/esm/SearchBar.js +3 -3
- package/dist/esm/ShortPassword.js +6 -5
- package/dist/esm/SideNavBar.js +6 -5
- package/dist/esm/Signature.js +4 -4
- package/dist/esm/Skeleton.js +4 -4
- package/dist/esm/Step.js +3 -3
- package/dist/esm/Sticky.js +5 -5
- package/dist/esm/Swipe.js +3 -3
- package/dist/esm/TabbarItem.js +3 -3
- package/dist/esm/Table.js +3 -3
- package/dist/esm/Tabs.js +3 -3
- package/dist/esm/Tag.js +3 -3
- package/dist/esm/TimeSelect.js +6 -5
- package/dist/esm/Toast.js +3 -3
- package/dist/esm/TrendArrow.js +3 -3
- package/dist/esm/Uploader.js +7 -7
- package/dist/esm/VirtualList.js +2 -2
- package/dist/esm/{actionsheet.taro-a58d3d12.js → actionsheet.taro-27121a38.js} +1 -1
- package/dist/esm/{address.taro-79cc7c96.js → address.taro-dd602937.js} +12 -12
- package/dist/esm/{audio.taro-4fadc583.js → audio.taro-cf530b91.js} +5 -5
- package/dist/esm/{avatar.taro-85ced995.js → avatar.taro-1d2bf09a.js} +1 -2
- package/dist/esm/{backtop.taro-99107c30.js → backtop.taro-e53236c7.js} +3 -3
- package/dist/esm/{badge.taro-fe9171ec.js → badge.taro-11e2ec95.js} +1 -1
- package/dist/esm/{barrage.taro-0e157b5e.js → barrage.taro-e4fe81ae.js} +2 -2
- package/dist/esm/{button.taro-4ce133b9.js → button.taro-b7c5f5a7.js} +1 -1
- package/dist/esm/{calendar.taro-4ed72058.js → calendar.taro-05c40d76.js} +2 -2
- package/dist/esm/{calendaritem.taro-1ebe428d.js → calendaritem.taro-3cfd4186.js} +1 -1
- package/dist/esm/{card.taro-39055e82.js → card.taro-7e85c3da.js} +1 -1
- package/dist/esm/{cascader.taro-d8cb1c3e.js → cascader.taro-66462c03.js} +3 -3
- package/dist/esm/{cell.taro-9a04a92e.js → cell.taro-e877cf12.js} +3 -3
- package/dist/esm/{checkbox.taro-0bda9796.js → checkbox.taro-04da7151.js} +1 -1
- package/dist/esm/{collapseitem-ce1849d2.js → collapseitem-2e864527.js} +1 -1
- package/dist/esm/{datepicker.taro-7220e495.js → datepicker.taro-8507d826.js} +1 -1
- package/dist/esm/{dialog.taro-1c03960e.js → dialog.taro-0f64e21a.js} +1 -1
- package/dist/esm/{drag.taro-82b6b27a.js → drag.taro-703560c4.js} +3 -3
- package/dist/esm/{elevator.taro-d7d65470.js → elevator.taro-68cfaaee.js} +4 -4
- package/dist/esm/{ellipsis.taro-49b6db0c.js → ellipsis.taro-71021671.js} +1 -1
- package/dist/esm/{fixednav.taro-5ad15202.js → fixednav.taro-84930e08.js} +2 -2
- package/dist/esm/{form.taro-71d32671.js → form.taro-ce791a58.js} +1 -1
- package/dist/esm/{formitem.taro-3089489b.js → formitem.taro-f2ed02d4.js} +1 -1
- package/dist/esm/get-scroll-parent-3dcd3f53.js +28 -0
- package/dist/esm/{griditem.taro-4cade72e.js → griditem.taro-5406bd2c.js} +1 -1
- package/dist/esm/{icon-8dc4de10.js → icon-2242973e.js} +13 -4
- package/dist/esm/{icon.taro-1d0d4fb7.js → icon.taro-c9254a81.js} +13 -4
- package/dist/esm/{image.taro-e6dc5867.js → image.taro-1d867416.js} +1 -1
- package/dist/esm/{imagepreview.taro-3400ea03.js → imagepreview.taro-83481e13.js} +1 -1
- package/dist/esm/{index.taro-a36f96fb.js → index.taro-cd52b23f.js} +1 -1
- package/dist/esm/{infiniteloading.taro-6c2a2e95.js → infiniteloading.taro-e5be6795.js} +1 -1
- package/dist/esm/{input.taro-fd566407.js → input.taro-991945d1.js} +1 -1
- package/dist/esm/{inputnumber.taro-dc39b853.js → inputnumber.taro-e909d932.js} +1 -1
- package/dist/esm/{menu.taro-4abed328.js → menu.taro-e5b84501.js} +1 -1
- package/dist/esm/{menuitem.taro-6e8b27c3.js → menuitem.taro-f2129be6.js} +2 -2
- package/dist/esm/{navbar.taro-c931c078.js → navbar.taro-70514adf.js} +1 -1
- package/dist/esm/{noticebar.taro-69ea7673.js → noticebar.taro-22486646.js} +2 -4
- package/dist/esm/{numberkeyboard.taro-194519e4.js → numberkeyboard.taro-d2ccbce5.js} +1 -1
- package/dist/esm/nutui-react.es.js +66 -65
- package/dist/esm/{overlay.taro-98367bc1.js → overlay.taro-1e74a71d.js} +5 -4
- package/dist/esm/{picker.taro-2a8ded7c.js → picker.taro-6128297f.js} +2 -2
- package/dist/esm/{popover.taro-46d813e8.js → popover.taro-fc7b9a73.js} +3 -3
- package/dist/esm/{popup.taro-cb777e09.js → popup.taro-89809b25.js} +6 -7
- package/dist/esm/{progress.taro-623bc807.js → progress.taro-18e015e4.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-cab7b51c.js → pulltorefresh.taro-2b50fdf3.js} +1 -27
- package/dist/esm/{range.taro-5d6ff217.js → range.taro-b628f1ed.js} +2 -2
- package/dist/esm/{rate.taro-10197384.js → rate.taro-17b84a51.js} +1 -1
- package/dist/esm/{searchbar.taro-839dd622.js → searchbar.taro-141827e2.js} +5 -5
- package/dist/esm/{shortpassword.taro-182d46f7.js → shortpassword.taro-e1f53ee7.js} +2 -2
- package/dist/esm/{sidenavbar.taro-006cf38b.js → sidenavbar.taro-f44d12ac.js} +1 -1
- package/dist/esm/{signature.taro-33632585.js → signature.taro-d3416fcd.js} +1 -1
- package/dist/esm/{skeleton.taro-853ce460.js → skeleton.taro-6821b2c6.js} +1 -1
- package/dist/esm/{step.taro-1c94e067.js → step.taro-891c020b.js} +1 -1
- package/dist/esm/sticky.taro-2d9b2804.js +133 -0
- package/dist/esm/{swipe.taro-83bc248f.js → swipe.taro-e6c2b808.js} +1 -1
- package/dist/esm/{tabbaritem.taro-8dfb8055.js → tabbaritem.taro-f4a91070.js} +1 -1
- package/dist/esm/{table.taro-cb4dd2c3.js → table.taro-d9b2794b.js} +1 -1
- package/dist/esm/{tabs.taro-e71875fa.js → tabs.taro-5030ce68.js} +1 -1
- package/dist/esm/{tag.taro-00fe554d.js → tag.taro-213ec444.js} +1 -1
- package/dist/esm/{timeselect.taro-3ecce65d.js → timeselect.taro-b04b1538.js} +1 -1
- package/dist/esm/{toast.taro-0804b6b4.js → toast.taro-0f972a92.js} +1 -1
- package/dist/esm/{trendarrow.taro-5a7153e4.js → trendarrow.taro-d79fc8e2.js} +1 -1
- package/dist/esm/types/src/packages/audio/audio.taro.d.ts +6 -6
- package/dist/esm/types/src/packages/image/image.d.ts +3 -0
- package/dist/esm/types/src/packages/overlay/overlay.taro.d.ts +3 -1
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/popup/popup.taro.d.ts +3 -3
- package/dist/esm/types/src/packages/sticky/sticky.taro.d.ts +11 -2
- package/dist/esm/types/src/packages/uploader/uploader.taro.d.ts +1 -1
- package/dist/esm/{uploader.taro-f80d76d9.js → uploader.taro-1d745f4a.js} +17 -17
- package/dist/esm/{useClientRect-bf69d7b3.js → useClientRect-4506e52f.js} +5 -2
- package/dist/esm/{virtuallist.taro-e3345ced.js → virtuallist.taro-1688484f.js} +7 -8
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +256 -111
- package/dist/nutui.react.umd.js +252 -107
- package/dist/packages/calendar/calendar.scss +19 -1
- package/dist/packages/image/image.scss +2 -0
- package/dist/packages/input/input.scss +3 -18
- package/dist/packages/notify/notify.scss +23 -19
- package/dist/packages/popup/popup.scss +130 -93
- package/dist/packages/searchbar/searchbar.scss +6 -20
- package/dist/packages/sticky/sticky.scss +3 -0
- package/dist/packages/tag/tag.scss +6 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/variables.scss +1 -3
- package/dist/types/index.d.ts +22 -15
- package/package.json +2 -2
- package/dist/esm/sticky.taro-d0553f48.js +0 -13
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
bottom 底部与视图窗口左上角的距离 number
|
|
9
9
|
*/
|
|
10
10
|
const getRectByTaro = async (element) => {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
if (element) {
|
|
12
|
+
const res = await element.getBoundingClientRect();
|
|
13
|
+
return res;
|
|
14
|
+
}
|
|
15
|
+
return Promise.resolve({});
|
|
13
16
|
};
|
|
14
17
|
|
|
15
18
|
export { getRectByTaro as g };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
2
|
import { ScrollView } from '@tarojs/components';
|
|
3
|
-
import
|
|
3
|
+
import { getSystemInfoSync } from '@tarojs/taro';
|
|
4
4
|
import { u as useConfig } from './configprovider.taro-26882dd2.js';
|
|
5
5
|
|
|
6
6
|
// 缓存列表初始化信息
|
|
@@ -89,8 +89,8 @@ const defaultProps = {
|
|
|
89
89
|
itemEqualSize: true,
|
|
90
90
|
overscan: 2,
|
|
91
91
|
};
|
|
92
|
-
const clientHeight =
|
|
93
|
-
|
|
92
|
+
const clientHeight = getSystemInfoSync().windowHeight - 5 || 667;
|
|
93
|
+
getSystemInfoSync().windowWidth || 375;
|
|
94
94
|
const VirtualList = (props) => {
|
|
95
95
|
const { sourceData = [], ItemRender, itemSize = 66, itemEqualSize = true, overscan = 2, key, onScroll, className, containerSize = clientHeight, ...rest } = props;
|
|
96
96
|
// const sizeKey = horizontal ? 'width' : 'height'
|
|
@@ -146,13 +146,12 @@ const VirtualList = (props) => {
|
|
|
146
146
|
}, [itemSize, sourceData]);
|
|
147
147
|
// 可视区域总高度
|
|
148
148
|
const getContainerHeight = () => {
|
|
149
|
-
|
|
149
|
+
// 初始首页列表高度
|
|
150
150
|
const initH = itemSize * sourceData.length;
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
// 未设置containerSize高度,判断首页高度小于设备高度时,滚动容器高度为首页数据高度,减5为分页触发的偏移量
|
|
152
|
+
return initH < clientHeight
|
|
153
153
|
? initH + overscan * itemSize - 5
|
|
154
|
-
: Math.min(containerSize, clientHeight);
|
|
155
|
-
return containerH; // Math.min(containerSize, clientHeight)
|
|
154
|
+
: Math.min(containerSize, clientHeight); // Math.min(containerSize, clientHeight)
|
|
156
155
|
};
|
|
157
156
|
// 可视区域条数
|
|
158
157
|
const visibleCount = () => {
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED