Vue.js

Vue.js - change undefined img source that I have created dynamically

徘徊边缘 提交于 2021-01-27 06:00:40
问题 I am playing around with vue js and with a 3rd party API. I have succeeded in fetching the json data and presenting it in my html but I am struggling with the images. Some images are missing from the json file so i have stored them locally in my laptop. I have tried to set empty images source using v-if in my html without luck. (see the comments in my html file) Also I have tried to assign a class for every img and then I tried to set an img source using jquery $("#zTTWa2").attr("src",

Vue.js bind to DOM custom event with dots in name (like bootstrap events)

我是研究僧i 提交于 2021-01-27 05:33:18
问题 Using Vue 2.1.10 I can bind to DOM events with v-on directive. For example: v-on:click To bind to DOM click. But I can't figure how to bind to an event that has dots in the name. such as "show.bs.modal" from bootstrap. Currently, I use a workaround binding in the created hook with Regular DOM Methods, but I really would like to use the declarative syntax for that. How can this be achieved? thanks EDIT: The question is about allowed syntax: how can I do something like: Vue.component('comp',{

Activate method on router link click in Vue

余生长醉 提交于 2021-01-27 05:33:15
问题 I am working on account removal on a Chrome extension and I have the following button: <button @click="remove" id="button_remove" class="btn btn-default" style="float: right;">Remove Account</button> JS methods:{ remove(event){ app.removeAccountData(url,apikey); } }, I also have this router-link : <router-link :to="{ name: 'RemovedWId', params: { accountid: chosenAccount.apikey}}" text="delete_account"><span class="glyphicon glyphicon-trash" aria-hidden="true" style="margin-top: 2px; cursor:

nuxtjs cannot display dynamic url on production

假如想象 提交于 2021-01-27 05:30:23
问题 I'm using nuxjs to build my project and I create a page which displays place information dynamically. when I run npm run dev and test on http://localhost:3000/place/66bb50b7a5 is work well. but after I run npm run generate , I get the dist folder, I put in on MAMAP and try to run http://mysite:7074/place/66bb50b7a5, it shows 404 page not found. My dist folder is like this please tell me what wrong on my code and what I should do. Thank you. 回答1: You have to config your web server to response

nuxtjs cannot display dynamic url on production

淺唱寂寞╮ 提交于 2021-01-27 05:27:40
问题 I'm using nuxjs to build my project and I create a page which displays place information dynamically. when I run npm run dev and test on http://localhost:3000/place/66bb50b7a5 is work well. but after I run npm run generate , I get the dist folder, I put in on MAMAP and try to run http://mysite:7074/place/66bb50b7a5, it shows 404 page not found. My dist folder is like this please tell me what wrong on my code and what I should do. Thank you. 回答1: You have to config your web server to response

Vuetifyjs error Unknown custom element: did you register the component correctly

给你一囗甜甜゛ 提交于 2021-01-27 05:25:46
问题 Am using vuetify to build a template but am getting an error unknown custom element dashboard did you register the component correctly? This is my code: In the main.js import Vue from 'vue' import App from './App.vue' import Vuetify from 'vuetify' import VueRouter from 'vue-router'; import {routes} from './routes'; Vue.use(VueRouter); Vue.use(Vuetify) new Vue({ el: '#app', render: h => h(App) }) In my App.vue <template> <dashboard></dashboard> </template> <script> import Dashbaord from '.

How to enhance an existing Laravel project with VueJS?

泪湿孤枕 提交于 2021-01-27 05:21:53
问题 I just finished my project using only the Laravel framework. Now I want to add vue.js into my project to render the views without loading them. I went through some tutorials and found that I need to convert my blade files into Vue components to achieve this. But as I know it's a big process as some of the functions won't work in VueJS. And I don't know how to do it. Please, someone, guide me here on how to do that. Thanks in advance. 回答1: Rebuild your basic structure into a Vue template: //

How to enhance an existing Laravel project with VueJS?

大憨熊 提交于 2021-01-27 05:19:08
问题 I just finished my project using only the Laravel framework. Now I want to add vue.js into my project to render the views without loading them. I went through some tutorials and found that I need to convert my blade files into Vue components to achieve this. But as I know it's a big process as some of the functions won't work in VueJS. And I don't know how to do it. Please, someone, guide me here on how to do that. Thanks in advance. 回答1: Rebuild your basic structure into a Vue template: //

How to change style of background color using Vue.js only

放肆的年华 提交于 2021-01-27 04:46:29
问题 import Vue from 'vue' import App from './App' import BootstrapVue from 'bootstrap-vue' import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap-vue/dist/bootstrap-vue.css' Vue.config.productionTip = false Vue.use(BootstrapVue); /* eslint-disable no-new */ new Vue({ el: '#app', components: { App }, template: '<App/>' }) <template> <div id="app"> <webpage></webpage> </div> </template> <script> import webpage from "./components/webpage" export default { name: 'app', components : { webpage } }

How to change style of background color using Vue.js only

浪子不回头ぞ 提交于 2021-01-27 04:45:12
问题 import Vue from 'vue' import App from './App' import BootstrapVue from 'bootstrap-vue' import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap-vue/dist/bootstrap-vue.css' Vue.config.productionTip = false Vue.use(BootstrapVue); /* eslint-disable no-new */ new Vue({ el: '#app', components: { App }, template: '<App/>' }) <template> <div id="app"> <webpage></webpage> </div> </template> <script> import webpage from "./components/webpage" export default { name: 'app', components : { webpage } }