Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
258 views
in Technique[技术] by (71.8m points)

javascript - VUEJS: Override function from node_modules component

I have installed the vue2-datepicker component with npm install vue2-datepicker (Reference: https://openbase.com/js/vue2-datepicker). All is good and the plugin is working nice. The problem I am facing is that the week number of a new year is considered to be the week where January 1st is. Currently that is not correct so I have tried to override the function that is calculating it.

I have tried several approaches:

  • export the function try to edit it and export the component again
  • Use extend and just create a function with the same name
  • import the component and access its methods and assign the old function to new function

None of the mentioned approaches worked.

My question is: Is there a way to override a function that exist in a imported component located in node_modules folder using VUEJS?

question from:https://stackoverflow.com/questions/65843702/vuejs-override-function-from-node-modules-component

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...