From 7cb9a4979dffc926e240bce5033e2f99c0296c9f Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 29 Oct 2019 20:00:53 +0800 Subject: [PATCH] feat(Loading): optimize styles (#2216) --- packages/loading/index.less | 5 +++++ packages/loading/index.ts | 14 +++----------- packages/loading/index.wxml | 7 ++----- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/packages/loading/index.less b/packages/loading/index.less index c134d490..49b185fc 100644 --- a/packages/loading/index.less +++ b/packages/loading/index.less @@ -1,5 +1,10 @@ @import '../common/style/var.less'; +:host { + font-size: 0; + line-height: 1; +} + .van-loading { display: inline-flex; align-items: center; diff --git a/packages/loading/index.ts b/packages/loading/index.ts index 5a28dd99..07664d97 100644 --- a/packages/loading/index.ts +++ b/packages/loading/index.ts @@ -3,18 +3,15 @@ import { addUnit } from '../common/utils'; VantComponent({ props: { + color: String, vertical: Boolean, - size: { - type: String, - observer: 'setSizeWithUnit' - }, type: { type: String, value: 'circular' }, - color: { + size: { type: String, - value: '#c9c9c9' + observer: 'setSizeWithUnit' }, textSize: { type: String, @@ -22,11 +19,6 @@ VantComponent({ } }, - data: { - sizeWithUnit: '30px', - textSizeWithUnit: '14px' - }, - methods: { setSizeWithUnit(size: string | number): void { this.setData({ diff --git a/packages/loading/index.wxml b/packages/loading/index.wxml index 2d738bc6..5229d043 100644 --- a/packages/loading/index.wxml +++ b/packages/loading/index.wxml @@ -1,4 +1,4 @@ - + - +