Component({ properties: { variant: { type: String, value: 'card' }, count: { type: Number, value: 1 }, active: { type: Boolean, value: true } }, data: { _minDisplayShown: false }, lifetimes: { attached() { // 200ms 最小显示,避免骨架闪一下 this._minTimer = setTimeout(() => { this.setData({ _minDisplayShown: true }) }, 200) }, detached() { if (this._minTimer) clearTimeout(this._minTimer) } } })