vue-component

I'm upgrading the Vuetify version from 1.5 to 2.0, but the previously installed plugin is no longer visible in the project

China☆狼群 提交于 2021-01-29 17:15:41
问题 old vuetify plugins not showing, but new vuetify plugins appear.v-checkbox as an example. can you help me v-checkbox is not visible **Vuetify JS After 2.0 update** // v2.0 // src/plugins/vuetify.js // follow official document import Vue from 'vue'; import Vuetify from 'vuetify/lib'; Vue.use(Vuetify); export default new Vuetify({ dark: true, // it's decide your project themes: { light: { prime: '#df8421' }, dark: { prime: '#333' } }, icons: { iconfont: 'mdi', }, }); After 2.0 update main js Is

How to dynamically mount vue component with props

有些话、适合烂在心里 提交于 2021-01-29 09:55:24
问题 Scenario / context I have an overview component which contains a table and an add button. The add button opens a modal component. When i fill in some text fields in the modal and click the save button, a callback (given as prop) is called so the parent component (the overview) is updated. The save button also triggers the model toggle function so the model closes. So far works everything like expected but when i want to add a second entry, the modal is "pre-filled" with the data of the

How do I include image in BootstrapVue carousel?

不想你离开。 提交于 2021-01-29 09:30:28
问题 I am trying to add an image to the img-src="" attribute of b-carousel in BoostrapVue. The image is currently saved in the asset folder. <b-carousel-slide img-src="../assets/life.jpg"> <h1>Hello world!</h1> </b-carousel-slide> I have added Find below images of the result: I am certain the images are correctly saved in the right location: 回答1: If using a loader with webpack (i.e. vue-loader, url-loader, etc), you need to ensure that the loader knows that img-src accepts a URL. See the docs on

Add var into css class

允我心安 提交于 2021-01-29 08:34:24
问题 I'm currently writing a component that is making an animation in a loop, the animation time is a props passed to the component. My problem is the following: The animation is made in CSS: animate:{ -webkit-transition: 10.0s !important; -moz-transition: 10.0s !important; -o-transition: 10.0s !important; transition: 10.0s !important; } I would want to pass the duration inside this class declaration but it seems impossible and I'm using these CSS tricks to restart the animation: https://css

Specify Vuex Store To Use In Component

巧了我就是萌 提交于 2021-01-29 07:26:28
问题 I have modularized my Vuex store and need child-components to be able to access data/use the same stores as their parent component. Here's what I've tried: <!-- ParentOne.vue --> <template> <div> <child-component vuex-store="services/opportunities" /> </div> </template> <script> import ChildComponent from '@/components/services/child-components/ChildComponent'; import { mapActions, mapState, mapGetters } from 'vuex'; export default { components: { 'child-component': ChildComponent, },

Vue - Calling store getter after dispatch completes?

烂漫一生 提交于 2021-01-29 06:57:47
问题 I'm using Laravel 5.7 + Vue2 + Vuex I am having some difficulty getting Vue to return a store value after my dispatch call completes. My application flow looks like this: I click a submit button which calls validate() on the component. Validate() dispatches to my "addLease" action which calls the store api in a Laravel controller. Laravel validates the data and returns a response with errors, or a success message. A commit is then performed to update the leaseStore state with the appropriate

passing data to route's component beforeEnter

最后都变了- 提交于 2021-01-29 05:44:39
问题 I have the following VueRouter route { path: '/playlists/:id', name: 'videos', component: Video, props: { videos: [] }, beforeEnter (to, from, next) { Vue.axios.get('/playlistitems?playlistId='.concat(to.params.id)) .then((response) => { to.params.videos = response.data next((vm) => { console.log(vm) vm.videos = response.data }) }) .catch((err) => console.log('error', err)) } } When the route is entered into everything executes as expected but I'm not sure how to pass the response.data to the

How to drop down programmatically a select menu by clicking on image Vuetify?

妖精的绣舞 提交于 2021-01-29 05:02:08
问题 I have my image property and select in template: <v-img src='/logos/some.jpg' @click='click_select'/> <v-select :items="currencySelect" ref='select'/> and in methods, I have method: click_select(){ this.$refs.select.onClick; } Clicking on image doesn't do anything and no errors logs 回答1: Just add a callback handler for that event like : this.$refs.select.onClick((e) => { }); Full example var app = new Vue({ el: '#app', vuetify: new Vuetify(), data: { currencySelect: ['a', 'b', 'c'] }, methods

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('

How can I use transition on individual list elements in Vue.js?

烂漫一生 提交于 2021-01-28 14:45:21
问题 My understanding of transitions in vue.js is that you use <transition> to animate between individual elements and <transition-group> to animate a whole list. It seems as though if you wanted to animate a transition within a list item you'd use <transition> within the list. e.g. something like this: <span v-for="item in items"> <transition> <div> Transition from this... </div> <div> ...to this. </div> </transition> </span> Yet, when I make that change the animation doesn't work. Is this an