Skip to content

Commit

Permalink
修复import化带来的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
jry committed Apr 18, 2024
1 parent 2bdb34a commit 212a96f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,16 @@
// 更新各列的值,进行补0、格式化等操作
updateColumnValue(value) {
this.innerValue = value
this.updateColumns()
// 延迟执行,等待u-picker组件列数据更新完后再设置选中值索引
setTimeout(() => {
this.updateIndexs(value)
}, 0);
this.updateColumns()
// 延迟执行,等待u-picker组件列数据更新完后再设置选中值索引
setTimeout(() => {
this.updateIndexs(value)
}, 0);
},
// 更新索引
updateIndexs(value) {
let values = []
const formatter = this.formatter || this.innerFormatter
const padZero = padZero
if (this.mode === 'time') {
// 将time模式的时间用:分隔成数组
const timeArr = value.split(':')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,17 @@
const {
height
} = size
const sys = sys()
const windowHeight = sys.windowHeight
const sysData = sys()
const windowHeight = sysData.windowHeight
let customNavHeight = 0
// 消除各端导航栏非原生和原生导致的差异,让索引列表字母对屏幕垂直居中
if (this.customNavHeight == 0) {
// #ifdef H5
customNavHeight = sys.windowTop
customNavHeight = sysData.windowTop
// #endif
// #ifndef H5
// 在非H5中,为原生导航栏,其高度不算在windowHeight内,这里设置为负值,后面相加时变成减去其高度的一半
customNavHeight = -(sys.statusBarHeight + 44)
customNavHeight = -(sysData.statusBarHeight + 44)
// #endif
} else {
customNavHeight = getPx(this.customNavHeight)
Expand Down

0 comments on commit 212a96f

Please sign in to comment.