diff --git a/CHANGELOG.md b/CHANGELOG.md
index fbec5541..1fe6dd78 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,18 @@
-# [](https://github.com/AntmJS/vantui/compare/v3.1.3...v) (2023-07-25)
+# [](https://github.com/AntmJS/vantui/compare/v3.1.4...v) (2023-08-14)
+
+
+### Bug Fixes
+
+* 文档复制功能 ([1bdd88f](https://github.com/AntmJS/vantui/commit/1bdd88feb8be1aa185944a51b73f64a957f809b9))
+
+
+### Features
+
+* sku组件支持初始化是否选择商品 ([f5a2699](https://github.com/AntmJS/vantui/commit/f5a269937001d27ff3c254fae4a7f6636bf7427c))
+
+
+
+## [3.1.4](https://github.com/AntmJS/vantui/compare/v3.1.3...v3.1.4) (2023-07-25)
### Bug Fixes
diff --git a/lerna.json b/lerna.json
index d3c747f7..953408dc 100644
--- a/lerna.json
+++ b/lerna.json
@@ -16,5 +16,5 @@
"**/*.md",
"**/__test__/**"
],
- "version": "3.1.4"
+ "version": "3.1.5"
}
diff --git a/packages/vantui-cli/package.json b/packages/vantui-cli/package.json
index 4c7fe24a..326d7132 100644
--- a/packages/vantui-cli/package.json
+++ b/packages/vantui-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@antmjs/vantui-cli",
- "version": "3.1.4",
+ "version": "3.1.5",
"type": "module",
"main": "dest/cli.js",
"bin": {
diff --git a/packages/vantui-demo/package.json b/packages/vantui-demo/package.json
index 04690391..e891e648 100644
--- a/packages/vantui-demo/package.json
+++ b/packages/vantui-demo/package.json
@@ -1,6 +1,6 @@
{
"name": "vantui-demo",
- "version": "3.1.4",
+ "version": "3.1.5",
"private": true,
"description": "Taro应用模版",
"templateInfo": {
@@ -82,7 +82,7 @@
"author": "",
"dependencies": {
"@antmjs/mini-fix": "^2.3.3",
- "@antmjs/vantui": "3.1.4",
+ "@antmjs/vantui": "3.1.5",
"@babel/runtime": "^7.7.7",
"@tarojs/components": "3.5.7",
"@tarojs/helper": "3.5.7",
diff --git a/packages/vantui/package.json b/packages/vantui/package.json
index 96ef88eb..3c04c0bc 100644
--- a/packages/vantui/package.json
+++ b/packages/vantui/package.json
@@ -1,6 +1,6 @@
{
"name": "@antmjs/vantui",
- "version": "3.1.4",
+ "version": "3.1.5",
"main": "lib/index.js",
"module": "es/index.esm.js",
"style": "lib/index.css",
@@ -68,9 +68,9 @@
"ast-to-markdown": "^1.0.0",
"glob": "^10.1.0",
"markdown-to-ast": "^6.0.3",
+ "ora": "^5.4.1",
"prettier": "^2.8.7",
"style-resources-loader": "^1.5.0",
- "swc-loader": "^0.2.3",
- "ora": "^5.4.1"
+ "swc-loader": "^0.2.3"
}
-}
\ No newline at end of file
+}
diff --git a/packages/vantui/src/infinite-scroll/demo/demo2.tsx b/packages/vantui/src/infinite-scroll/demo/demo2.tsx
index 0a242273..206dda42 100644
--- a/packages/vantui/src/infinite-scroll/demo/demo2.tsx
+++ b/packages/vantui/src/infinite-scroll/demo/demo2.tsx
@@ -52,14 +52,14 @@ export default function Demo() {
ref={InfiniteScrollInstance}
/>
}
- ItemRender={({ index, item, className, ...props }) => {
+ ItemRender={react.memo(({ item }) => {
return (
-
+
{item.title}
{item.isCutPrice && (
最近大降价
@@ -68,7 +68,7 @@ export default function Demo() {
)
- }}
+ })}
/>
)
diff --git a/packages/vantui/src/virtual-list/virtual-half-list.tsx b/packages/vantui/src/virtual-list/virtual-half-list.tsx
index 9839adfc..368f8b0f 100644
--- a/packages/vantui/src/virtual-list/virtual-half-list.tsx
+++ b/packages/vantui/src/virtual-list/virtual-half-list.tsx
@@ -99,16 +99,18 @@ function VirtualList_(
(e: BaseEventOrig) => {
const scrollTop = Math.floor(e.detail.scrollTop)
updateRects()
- if (Object.keys(rects).length) {
- const startIndex = getClosestIndex(rects, scrollTop)
- setShowConfig({
- head: startIndex,
- tail: startIndex + showCount,
- nextHead: startIndex + showCount,
- NextTail: startIndex + showCount * 2,
- transformY: `translateY(${rects[`${startIndex}`].top}px)`,
- })
- }
+ requestIdleCallback(() => {
+ if (Object.keys(rects).length) {
+ const startIndex = getClosestIndex(rects, scrollTop)
+ setShowConfig({
+ head: startIndex,
+ tail: startIndex + showCount,
+ nextHead: startIndex + showCount,
+ NextTail: startIndex + showCount * 2,
+ transformY: `translateY(${rects[`${startIndex}`].top}px)`,
+ })
+ }
+ })
},
[showCount, rects, updateRects],
)