1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-06 03:57:59 +08:00

[improvement] List: unify text font-size ()

This commit is contained in:
neverland 2019-08-09 14:03:19 +08:00 committed by GitHub
parent 19cd2ed38e
commit 4cba618792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 52 additions and 50 deletions
src

@ -44,22 +44,18 @@ export default createComponent({
mounted() { mounted() {
if (this.immediateCheck) { if (this.immediateCheck) {
this.$nextTick(this.check); this.check();
} }
}, },
watch: { watch: {
loading() { loading: 'check',
this.$nextTick(this.check); finished: 'check'
},
finished() {
this.$nextTick(this.check);
}
}, },
methods: { methods: {
check() { check() {
this.$nextTick(() => {
if (this.loading || this.finished || this.error) { if (this.loading || this.finished || this.error) {
return; return;
} }
@ -96,11 +92,12 @@ export default createComponent({
this.$emit('input', true); this.$emit('input', true);
this.$emit('load'); this.$emit('load');
} }
});
}, },
clickErrorText() { clickErrorText() {
this.$emit('update:error', false); this.$emit('update:error', false);
this.$nextTick(this.check); this.check();
} }
}, },

@ -327,7 +327,7 @@
// List // List
@list-icon-margin-right: 5px; @list-icon-margin-right: 5px;
@list-text-color: @gray-dark; @list-text-color: @gray-dark;
@list-text-font-size: @font-size-sm; @list-text-font-size: @font-size-md;
@list-text-line-height: 50px; @list-text-line-height: 50px;
// Loading // Loading

@ -148,7 +148,12 @@ export default createComponent({
this.$nextTick(() => { this.$nextTick(() => {
const { titles } = this.$refs; const { titles } = this.$refs;
if (!titles || !titles[this.currentIndex] || this.type !== 'line' || isHidden(this.$el)) { if (
!titles ||
!titles[this.currentIndex] ||
this.type !== 'line' ||
isHidden(this.$el)
) {
return; return;
} }