Update index.js (#3536)

This commit is contained in:
NineSu 2020-08-19 14:15:11 +08:00 committed by GitHub
parent 97228aa15f
commit 4a479f6234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ VantComponent({
this.setData({ this.setData({
hasPrice: typeof price === 'number', hasPrice: typeof price === 'number',
integerStr: priceStrArr && priceStrArr[0], integerStr: priceStrArr && priceStrArr[0],
decimalStr: decimalLength && priceStrArr ? `.${priceStrArr[1]}` : '', decimalStr: decimalLength && priceStrArr ? `.${priceStrArr[1] || 0}` : '',
}); });
}, },
updateTip() { updateTip() {