Skip to content

Commit 7a7e178

Browse files
authored
chore: 发布版本 0.9.13
chore: 发布版本 0.9.13
2 parents 264cb0e + 6827b1e commit 7a7e178

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lin-ui",
3-
"version": "0.9.12",
3+
"version": "0.9.13",
44
"description": "A high quality UI components library with MiniProgram",
55
"main": "app.js",
66
"directories": {

src/badge/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Component({
1515
options: ['horn', 'circle']
1616
},
1717
value: {
18-
type: String,
18+
type: [String, null],
1919
value: '0'
2020
},
2121
mode: {

src/sticky-item/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import nodeUtil from '../core/utils/node-util';
2+
import pixelUtil from '../core/utils/pixel-util';
3+
24
Component({
35
externalClasses: ['l-class', 'l-header-wrapper-class', 'l-header-class', 'l-header-sticky-class', 'l-body-class'],
46
options: {
@@ -71,7 +73,8 @@ Component({
7173
updateStickyItemPosition(scrollTop) {
7274
const parent = this.getParentComponent();
7375
const {index, stickyItemTop, stickyItemHeight, top} = this.data;
74-
const isFixedTop = scrollTop > stickyItemTop - top && scrollTop < stickyItemHeight + stickyItemTop - top;
76+
const topPx = pixelUtil.rpx2px(top);
77+
const isFixedTop = scrollTop > stickyItemTop - topPx && scrollTop < stickyItemHeight + stickyItemTop - topPx;
7578

7679
// 避免频繁setData
7780
if (this.data.isFixedTop === isFixedTop) {

0 commit comments

Comments
 (0)