Questions tagged [vuejs2]

Use this tag for questions specific to version 2 of Vue.js, an open-source, progressive JavaScript framework for building user interfaces. Consider also using the main [vue.js] tag in addition to this one.

This tag is for questions specific to version 2 of Vue.js, which was released on 1st of October 2016, and has an API similar to version 1.

This tag should be used with the main tag for maximum visibility.


What is Vue.js?

Vue.js is a popular open-source JavaScript framework. It is maintained on Github and created by Evan You, a former Google engineer.

From the introduction in the official Vue.js Guide:

Vue (pronounced /vjuː/, like view) is a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.

A more in-depth overview of and introduction to Vue's functionality can be found in the Vue.js guide. The API documentation is available here.

Vue.js documentation also includes a comparison page with other frameworks and popular libraries, such as React or Angular.js, if you're looking for how Vue.js compares to other popular JavaScript frameworks.

For further information and resources, see the main tag wiki.


Related Tags


Official Logo:

26324 questions
215
votes
21 answers

How to change port number in vue-cli project

How to change Port number in Vue-cli project so that it run's on another port instead of 8080.
salman
  • 2,287
  • 3
  • 11
  • 11
215
votes
3 answers

Vuex - passing multiple parameters to mutation

I am trying to authenticate a user using vuejs and laravel's passport.I am not able to figure out how to send multiple parameters to the vuex mutation via an action. - store - export default new Vuex.Store({ state: { isAuth:…
Schwesi
  • 4,753
  • 8
  • 37
  • 62
189
votes
5 answers

What is nextTick and what does it do in Vue.js?

I read the docs, but I still can't understand it. I know what data, computed, watch, methods do, but what is nextTick() used for in Vue.js?
hidar
  • 5,449
  • 15
  • 46
  • 70
183
votes
28 answers

[Vue warn]: Property or method is not defined on the instance but referenced during render

The following code has been written to handle an event after a button click var MainTable = Vue.extend({ template: "
181
votes
5 answers

Vuex - Computed property "name" was assigned to but it has no setter

I have a component with some form validation. It is a multi step checkout form. The code below is for the first step. I'd like to validate that the user entered some text, store their name in the global state and then send then to the next step. I…
Connor Leech
  • 18,052
  • 30
  • 105
  • 150
180
votes
5 answers

How do I call a getter from another getter in Vuex?

Consider a simple Vue blog: I'm using Vuex as my datastore and I need to set up two getters: a getPost getter for retrieving a post by ID, as well as a listFeaturedPosts that returns the first few characters of each featured post. The datastore…
User not found
  • 2,129
  • 2
  • 15
  • 20
178
votes
25 answers

How to solve 'Redirect has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header'?

I am working on an app using Vue js. According to my setting I need to pass to a variable to my URL when setting change. $.get('http://172.16.1.157:8002/firstcolumn/' + c1v + '/' + c1b, function (data) { //…
Parkar
  • 2,800
  • 3
  • 15
  • 24
177
votes
8 answers

Vuex state on page refresh

My app uses the Firebase API for User Authentication, saving the Login status as a boolean value in a Vuex State. When the user logs in I set the login status and conditionally display the Login/Logout button accordingly. But when the​ page is…
boomboxboy
  • 2,384
  • 5
  • 21
  • 33
176
votes
6 answers

Passing props dynamically to dynamic component in VueJS

I've a dynamic view:
with an associated Vue instance: new Vue ({ data: function () { return { currentComponent: 'myComponent', } }, }).$mount('#myview'); This allows…
Titouan56
  • 6,932
  • 11
  • 37
  • 61
174
votes
15 answers

Only show slot if it has content

Is there a way to only display a slot if it has any content? For example, I'm building a simple Card.vue component, and I only want the footer displayed if the footer slot has content: Template