Vue.js answers

  • 0answers
    What if there is no authorization token?
    To render the component, you need to get data from the server. And he gives them only by the authorization token. And at the time of rendering the data, there is no token yet. Data retrieval is tied to the component mount hook. The token will be requested and installed after this component is ...
    Vue.js Rose Santiago, Oct 7, 2020

  • 0answers
    Dynamic attribute: src - no image appears. What's wrong?
    Could this Vue CLI work? For if I install the path directly, then additional numbers appear in the name in the devtools: /img/model_1.c5430f1b.jpg the image appears. But the image is not displayed dynamically, although the path is being written. Doesn't work: <img v-if="currentModel" ...
    Vue.js Gabriella Francis, Jul 7, 2019

  • 0answers
    Why is nothing being rendered to the page when building my Vue.js project with Gulp and Browserify?
    I'm trying to build a Vue.js project using Gulp and Browserify, but nothing gets rendered to the page. What could be the reason? Task in gulpfile.js: gulp.task('js', function() { return browserify({ entries: './src/main.js'}) .transform(babelify, { presets: ['es2015'] }) ...
    Vue.js Anonymous, Jul 28, 2020

  • 0answers
    How to make the script tag execute from the API in VUE?
    I have a component that receives content from an API. The content can include a layout and a script with a map from the Yandex constructor. For example: <script type="text/javascript" charset="utf-8" ...
    Vue.js Anonymous, Aug 6, 2020

  • 0answers
    Larvel + vue chat (laravel-echo-server [socket.io])?
    Kind. I want to write a chat using laravel-echo-server (socket.io) In vue via axios, I send a message to the controller in the controller I call ChatEvent :: dispatch ($ request- & gt; input ('message')) in event I write to a variable and call Chanel ('chat') in vue I listen ...
    Vue.js Aurora Marquez, Feb 22, 2020

  • 0answers
    How do I set up WebSocket in Express.js?
    On the topic about sockets, I'm damp, so from the first gestures I fell into cors. Here is the app.js code // .Env variablesrequire("dotenv").config();const express = require("express");const mongoose = require("mongoose");const path = require("path");const methodOverride = ...
    Vue.js Isla Rivera, Mar 7, 2019

  • 0answers
    How to bind a product model and its colors in Vue?
    Just started learning Vue.js. I connected Vuetify. There is an array of objects with product parameters: btnModelInfo: [ {id: '1', name: 'model_1' , colors: ['white', 'blue', 'red']}, {id: '2', name: 'model_2' , colors: ['red', 'green', 'blue']}, ],allColors: { white: ...
    Vue.js Mason Ramirez, Mar 18, 2019

  • 0answers
    Vue js how to write directive to track screen sizes?
    We need a vue js directive to help track the screen size. What is it for: on the desktop, the leftbar should always be present, while on the tablet it should be initially hidden (when you press the button, it will smoothly slide out) There are no problems with smooth emergence, but there is a ...
    Vue.js Anonymous, Jul 24, 2019

  • 0answers
    How do I dynamically import a library inside a method in vue?
    At the front, you want to load the PDF generation library only by pressing the "generate PDF" button - load lib and start generation. Dynamic imports of components, but not libraries are googled. Is it possible to do something like this inside a vue method: methods: { generatePDF() { ...
    Vue.js Lila Mills, Mar 26, 2019

  • 0answers
    Error in vuejs with scss styles, how to fix?
    Hello, an error occurred while starting the server.
    Vue.js Anonymous, Oct 5, 2019

  • 0answers
    Vue redirect not working?
    These lines break the redirect and return back to the page from which the redirect went. beforeRouteEnter(to,from,next) { let settingsLocalStorage = localStorage.getItem('settings') if(settingsLocalStorage) { $store.commit('budget/SET_SETTINGS', JSON.parse(settingsLocalStorage)) } else ...
    Vue.js Caleb Bullock, Apr 27, 2020

  • 0answers
    How can I delete an element of an array without knowing its index?
    Hello. There is an example: <div id="app"> <button v-for="button in arr" @click="active = button">{{button}}</button> <button @click="remove()">Remove active button</button></div> new Vue({ el: "#app", data: { active: null, arr: ['a', 'b', 'c'] ...
    Vue.js Rose Ballard, Jul 11, 2020

  • 0answers
    Connecting styles globally in vue?
    I created a styles directive in assets with the main.styl file, into which I import global style files (fonts, grid, variables, mixins, resets). But files only work in component styles (scoped), not globally. I connect main.styl automatically in vue.config.js: const path = require('path') ...
    Vue.js Arya Bass, Jan 7, 2019

  • 0answers
    How to make a contact list?
    Hello, how to make a simple contact list in vuejs?
    Vue.js Vivienne Watkins, Apr 1, 2020

  • 0answers
    How to set up Vuex.store variable tracking in Vue?
    There are two components - A and B. I need that when component A makes a change in the store, component B will know about it and perform some function. I tried to fit watch for this in B, but did not figure out how to do it. You can, of course, periodically poll store from B. Maybe there is ...
    Vue.js Atticus Miranda, Jul 31, 2020

  • 0answers
    How to get data from an undefined number of inputs?
    If there is HTML like <div id = "container"><input id = "form-input" name = "k1" type = "hidden"><input id = "form-input" name = "k1" type = "hidden"><input id = "form-input" name = "k1" type = "hidden">...<input id = "form-input" name = "k1" type = "hidden">... ...
    Vue.js Cora Taylor, Jan 6, 2020

  • 0answers
    How to start an already created vue.js server?
    I already created it earlier, but then I closed the npm console, and I don’t know the command to run the already created one.
    Vue.js Anonymous, Apr 12, 2019

  • 0answers
    How do I create a new board and give it a name, Todo list in Vue.js?
    Good afternoon, guys, please help, the problem is most likely petty, but the second day I sit - a new board is not created with the entered name in the creation form, I do it by analogy with examples from Google, but the board name is not pushed and, accordingly, the board is not created, there is ...
    Vue.js Anonymous, Dec 17, 2020

  • 0answers
    Why isn't a custom font handled in Vue with Sass?
    Vue JS application available Using the sass preprocessor I want to use a custom font via font-face. There are no errors anywhere, but the font is not being applied. What could be the problem? maybe I connected the font somehow wrong? vue.config.js: module.exports = { devServer: { ...
    Vue.js Iris Simon, Aug 13, 2019

  • 0answers
    How do I make an error message clickable?
    Kind time of the day, please tell me if there is an opportunity to make it so that when you click on an error message, a method works. There is a form, when entering incorrect data, the validation is processed (the message "The entered data is not correct" appears), you can make this message ...
    Vue.js Arianna Bolton, Feb 10, 2020