vue-circle-progress
vue-circle-progress copied to clipboard
Watch `progress` and `fill` to fit Vue style.
Thanks for this JQuery plugin wrapper.
I found the default behavior of this component is a little confusing for developer, that developer must call method in this component via $refs to update the progress, that's quite strange for a Vue plugin. So I add a watch for progress and user should need not to call updateProgress() manually anymore in most scenarios, and this behavior should be more like a Vue plugin which is reactive to the changes of data model.
I didn't build dist in this PR because I encountered the error of "You are using the runtime-only build of Vue..." (so you may need to check the issue #15 first for the dist...)
At last I import VueCircle from 'vue2-circle-progress/src/index.vue' directly and it works great.
@kuanyui Thanks for your efforts. I'll review and publish this soon.
👏
Idk if this'll help anyone seeing the repo has been inactive for a while, but I made a fork and integrated these changes so fill, emptyFill, and progress are all reactive. Started updating the docs too to reflect all of the possible props you can use:
https://github.com/chriscourses/vue-circle-progress