vue-countup-v2 icon indicating copy to clipboard operation
vue-countup-v2 copied to clipboard

🚑 add a prop 'decimalPlaces' for more flexible use

Open qinhua opened this issue 3 years ago • 2 comments

@xlsdg Add a prop 'decimalPlaces' for more flexible use.

Just fixed the issue #28 'Decimal places property missing'.

Decimal places property missing #28 What happened to the decimals property? In a much earlier version there was a property that allowed for setting the decimal places. Now it's being ignored and I see no reference to it in the docs.

Cause I encountered this scene, too. But the original property must place in the config, a little bit inflexible when configurate more than one instance.

The modifications are as follows: decimalPlaces: { type: Number, required: ##false, default: 0, }

const config = that.decimalPlaces ? Object.assign({}, that.options, { decimalPlaces: that.decimalPlaces, }) : that.options;

const instance = new CountUp( dom, that.endVal, config );

qinhua avatar May 23 '21 15:05 qinhua

Is this going to be merged in soon I need to use decimals?

steveDL avatar Nov 04 '21 11:11 steveDL

@xlsdg Please check this code

qinhua avatar Nov 04 '21 12:11 qinhua