Skip to content

Commit

Permalink
chore: 发布版本 0.9.13
Browse files Browse the repository at this point in the history
chore: 发布版本 0.9.13
  • Loading branch information
smileShirmy authored Jan 16, 2023
2 parents 264cb0e + 6827b1e commit 7a7e178
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lin-ui",
"version": "0.9.12",
"version": "0.9.13",
"description": "A high quality UI components library with MiniProgram",
"main": "app.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion src/badge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Component({
options: ['horn', 'circle']
},
value: {
type: String,
type: [String, null],
value: '0'
},
mode: {
Expand Down
5 changes: 4 additions & 1 deletion src/sticky-item/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import nodeUtil from '../core/utils/node-util';
import pixelUtil from '../core/utils/pixel-util';

Component({
externalClasses: ['l-class', 'l-header-wrapper-class', 'l-header-class', 'l-header-sticky-class', 'l-body-class'],
options: {
Expand Down Expand Up @@ -71,7 +73,8 @@ Component({
updateStickyItemPosition(scrollTop) {
const parent = this.getParentComponent();
const {index, stickyItemTop, stickyItemHeight, top} = this.data;
const isFixedTop = scrollTop > stickyItemTop - top && scrollTop < stickyItemHeight + stickyItemTop - top;
const topPx = pixelUtil.rpx2px(top);
const isFixedTop = scrollTop > stickyItemTop - topPx && scrollTop < stickyItemHeight + stickyItemTop - topPx;

// 避免频繁setData
if (this.data.isFixedTop === isFixedTop) {
Expand Down

0 comments on commit 7a7e178

Please sign in to comment.