Vue.js

How to render header and sidebar after login using Vue

二次信任 提交于 2021-01-29 03:38:22
问题 I have a Vue.js application, currently I render it using different pages. I have run into an issue where when I login the first time it will only render the single main component that is the page according to vue router. I am looking for a way to have my login function run then go to /dashboard but I'd like it to rerender my App.vue file or find some way to reload my header and sidebar in the below code as sign now the header and sidebar don't display when I am on /login so the router.push('

Hide-on-leave transition to fire only once

我只是一个虾纸丫 提交于 2021-01-28 22:14:32
问题 Is it possible to set hide-on-leave transition to be used only once after certain condition is met? <v-slide-x-transition hide-on-leave> <span v-if="isAdded(this.idUn)"> Added <v-icon> mdi-check </v-icon> </span> </v-slide-x-transition> Lets say if the condition is fulfilled this transition would not be called anymore. In the example below you can see that even though condition is met you can still see transition of the button being applied to the disabled button when switching from enabled

Laravel Passport suddenly returning 401 on Vue/Axios API calls

南楼画角 提交于 2021-01-28 21:55:37
问题 My application has an API that I consume from my JavaScript/Vue front end. Recently, I (unrelated) tried to unsecure Valet in order to share the site to perform webhook tests. I received a Brew 'Unable to determine linked PHP' error. Long story short I restored the symlink, updated composer dependencies and resecured Valet to ensure nothing was broken. Upon loading my application, all calls to my Laravel Passport secured API are returning 401. My unit tests are all passing, so the non

Vue.js pass $store data from different modules

不羁的心 提交于 2021-01-28 21:31:37
问题 Hi I need to understand how to "pass" some $store values from settings module to header module, being the $store updated by settings module I have this app.vue module: <template> <v-app> <router-view name="sidebar" /> <router-view name="header" :handleSettingsDrawer="handleSettingsDrawer" /> <v-main class="vue-content"> <v-fade-transition> <router-view name="settings" /> </v-fade-transition> </v-main> <router-view name="footer" /> <app-settings-drawer :handleDrawer="handleSettingsDrawer"

Search a non visible field in Vuetify-js Datatable

只愿长相守 提交于 2021-01-28 20:48:37
问题 I'm creating an expandable datatable in Vuetify . Only 5 columns are displayed in the table headers. When you expand each line, you get the detailed information, using the item.data-table-expand slot, which shows more columns available in the data array. Now I want to be able to apply a search filter on the table. My problem is that the search directive only searchs in the fields declared in the headers (the 5 columns), and I need to search in the other fields. I tried adding a searchable

pass value from React Native picker component back to VueJS caller

情到浓时终转凉″ 提交于 2021-01-28 19:02:27
问题 I have the following React Native picker component that works - file name: dynamic-picker.js import React, { Component } from "react"; import { Container, Content, Picker } from "native-base"; export default class DynamicPicker extends Component { constructor(props) { super(props); this.state = { selected: this.props.selected } } onValueChange(value) { this.setState({ selected: value }); } itemsList = () => { return (this.props.items.map( (item, index) => { return (<Picker.Item label={item}

Bundling a plugin with Rollup but having duplicate Vue.js package imported in the client app's bundle (Nuxt)

…衆ロ難τιáo~ 提交于 2021-01-28 17:49:26
问题 Dear Stack Overflow / Vue.js / Rollup community This could be a noob question for the master plugin developers working with Vue and Rollup. I will write the question very explicitly hoping that it could help other noobs like me in the future. I have simple plugin that helps with form validation. One of the components in this plugin imports Vue in order to programatically create a component and append to DOM on mount like below: import Vue from 'vue' import Notification from './Notification

“fs is not defined” How can I use fs within a VueJS file

感情迁移 提交于 2021-01-28 17:48:03
问题 I have been researching online and many others have ran in to similar problems that were left unresolved. Why is that I can't use fs in VueJS file, I have read that it cannot be called on the client side however it is used within the docs so what am I doing wrong? https://socket.io/docs/client-api/#With-a-self-signed-certificate socket.js file: const fs = require('fs'); var https = require('https').createServer(app, { key: fs.readFileSync('server-key.pem'), cert: fs.readFileSync('server-cert

How do I call Axios on prop change in Vue?

一个人想着一个人 提交于 2021-01-28 15:30:34
问题 On the change of the value id , I would like to make a JSON call via Axios and update necessary parts of the page. How do I do that? Currently, I have mounted and activated and they do not seem to be working... Code: const Home = { template: ` <div class="user"> <h2>user {{ id }}</h2> <h2>{{ info }}</h2> bet </div> `, props: { id: { type: String, default: 'N/A' } }, data () { return { info: null } }, activated () { axios .get('https://api.coindesk.com/v1/bpi/currentprice.json', { params: { id