V3: Vue 3 SFC/composition api support
palerdot opened this issue · comments
Arun Kumar commented
v3
version of vue-speedometer
is released. It is a complete rewrite with composition api and SFC (single file component).
Ref: https://stackblitz.com/edit/vitejs-vite-zvyaxz?file=package.json
Important Changes
Vue 3 support:
- Composition api and SFC support. Please note while v2 technically supports Vue 3 versions, underneath it used options api. V3 is a complete rewrite with composition api and SFC. This is the recommended version for Vue 3 composition api users.
Slim Build (Experimental)
There is a Slim
build available without bundling d3
. This project uses d3
micro bundles. If your project also uses d3
microbundles, you can opt for slim build. Necessary d3
dependencies required for slim build to work are - d3-array
, d3-color
, d3-ease
, d3-format
, d3-interpolate
, d3-scale
, d3-selection
, d3-shape
, d3-transition
.
// sample slim build usage
import VueSpeedometer from "vue-speedometer/slim"
// and use it
<VueSpeedometer />
Other changes
segmentValueFormatter
prop which accepts a function to format values- switching to
d3 micro modules
Arun Kumar commented
v3.0.1
is published and v3
is generally available.