vuejs2

Vuetify list : open group according to active route

ぃ、小莉子 提交于 2021-02-11 12:37:57
问题 Let's suppose I have a Vuetify list with 2 v-list-group, each one containing a v-list-tile. Here is a simplified pseudo-code: - Group1 - Item 1 :to='/item1' - Group2 - Item 2 :to='/item2' My list works fine : if I click on "Item1", vue-router goes to "/item1". Conversely, when I go to some route '/item1' (by typing the URL for example) and Group1 is closed in the list, is it possible to make Group1 to automatically open in the list? Do I have to watch route and use v-list-group.value to set

Access data from another Component

谁说我不能喝 提交于 2021-02-11 08:27:49
问题 now i have 2 Components 1 - is just a drop down list v-select <v-row align="center" > <v-col class="d-flex" cols="12" sm="6" v-if="Compounds" > <v-select :items="Compounds" v-model="selectedItems" label="Select" item-value="id" item-text="name" v-on:change="selectedCompound"> </v-select> {{ selectedItems }} </v-col> </v-row> with method methods: { selectedCompound(h2o) { console.log(h2o); console.log("This is from Selected Compound"); }, and i call it in another page <div> <SelectCompound><

How to customize controls and indicators in BootstrapVue's Carousel component?

不问归期 提交于 2021-02-11 06:55:30
问题 The code looks as following: <template> <div> <b-carousel id="carousel-upper" v-model="slide" :interval="3000" fade controls indicators @sliding-start="onSlideStart" @sliding-end="onSlideEnd" > <b-carousel-slide img-src="https://licota.ru/system/sliders/attachments/55ba/10cf/7372/763c/8600/0002/full/banner-2.jpg?1438257358" ></b-carousel-slide> <b-carousel-slide img-src="https://licota.ru/system/sliders/attachments/55ba/10cf/7372/763c/8600/0003/full/banner-3.jpg?1438257359" ></b-carousel

How to close outer v-tooltip on inner v-tooltip hover

非 Y 不嫁゛ 提交于 2021-02-11 06:46:14
问题 I have two tooltips, one is on an outer element, the other on the inner element like this: How do I remove the outer tooltip when the inner tooltip is showing? Here's a Fiddle The code is pretty standard, but keep in mind, sometimes v-tooltip places tooltips like a modal - on the body level, so the tooltips might not actually be nested. <div id="app"> <div v-tooltip="'Outer Tooltip'"> Outer Area <div v-tooltip="'Inner Tooltip'"> okokok </div> </div> </div> Here's what I've tried: On the Outer

Retrieve data from an API and pass them in a Vuetify table

自闭症网瘾萝莉.ら 提交于 2021-02-11 06:11:32
问题 I was assigned to do this project as part of my application for a Junior Developer position. I have never worked on Vue.js and they assigned me with this project asking to retrieve JSON data from an endpoint and projecting them in a vuetify table. My main issue is with the vuetify table i can not understand the difference with the normal html table. Moreover i can not understand whether i have to do a small app using html and js files or to use node.js also and work on it. However i did find

How to expose Vue as global object

 ̄綄美尐妖づ 提交于 2021-02-10 23:23:19
问题 I am integrating legacy code with newer one, built with Webpack. In legacy code, plain js accessed Vue simply with: new Vue(...) , from global scope. In Webpack, Vue will get sucked into vendor bundle and I would like to expose Vue back, so my legacy code would still see it as window.Vue What I have done so far (webpack 3.x): { test: require.resolve('vue/dist/vue.esm.js'), use: [{loader: 'expose-loader', options: 'Vue' }] } I get close with this, but I end up with window.Vue.default having

How to expose Vue as global object

不想你离开。 提交于 2021-02-10 23:23:17
问题 I am integrating legacy code with newer one, built with Webpack. In legacy code, plain js accessed Vue simply with: new Vue(...) , from global scope. In Webpack, Vue will get sucked into vendor bundle and I would like to expose Vue back, so my legacy code would still see it as window.Vue What I have done so far (webpack 3.x): { test: require.resolve('vue/dist/vue.esm.js'), use: [{loader: 'expose-loader', options: 'Vue' }] } I get close with this, but I end up with window.Vue.default having

Convert Vue.JS project to Nuxt.JS project

泪湿孤枕 提交于 2021-02-10 20:26:59
问题 I want to create Nuxt.JS project from Vue.JS project. Vue.js Project You can see the full Vue.JS project here. This project uses npm package vue-conversational-form which can help turn web forms into conversations using Vue.js. Project has 3 files: index.html index.js myForm.js Code of: index.html <style> html, body { height: 90%; width: 96%; background: #eee; margin: 10px auto; } </style> <div id="app"></div> Code of: index.js import Vue from 'vue' import myForm from './myForm'; new Vue({ el

TypeError: Cannot read property '$http' of undefined

人盡茶涼 提交于 2021-02-10 18:48:42
问题 Trying to use vue-resource but i am etting the error described in the title. The code below is in utils section called network.js : import VueResource from 'vue-resource' const getConfig = () =>{ console.log('its working'); // GET /someUrl this.$http.get('https://fdsdfsdf-685a-45ed-8665-9847e0dbce0d.mock.pstmn.io/getConfig') .then(response => { // get body data this.config = response.body; }, response => { // error callback }); }; //Export login so other classes can use it export{ getConfig }

How to improve performance while using dynamic components in vue?

时光怂恿深爱的人放手 提交于 2021-02-10 16:14:41
问题 Context: Currently, I am working on a complex editor application which uses vuex state, vuetify's expansion panel and vue's dynamic component. Each dynamic component uses data which is accepted as props and has its own nested components. Problem: The issue with this approach is as the app deals with the large, nested state, the add operation in the UI slows down and makes the UI unusable. Note: In the example, I have added 1000 objects just to replicate the issue. Unfortunately cannot use