Compare commits

...

2 Commits

Author SHA1 Message Date
neverland
22ee50576c
fix(DatetimePicker): error in some edge cases (#10186) 2022-01-14 16:09:57 +08:00
neverland
edaf7ec45b
fix(Tabbar): get correct height in mobile safari (#10185) 2022-01-14 15:51:08 +08:00
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,10 @@
import { isNaN } from '../utils/validate/number';
export function times(n: number, iteratee: (index: number) => any[]) {
if (n < 0) {
return [];
}
let index = -1;
const result = Array(n);

View File

@ -56,7 +56,13 @@ export default createComponent({
mounted() {
if (this.placeholder && this.fixed) {
this.height = this.$refs.tabbar.getBoundingClientRect().height;
const setHeight = () => {
this.height = this.$refs.tabbar.getBoundingClientRect().height;
};
setHeight();
// https://github.com/youzan/vant/issues/10131
setTimeout(setHeight, 100);
}
},