Vue.js

Vue.js: Cannot retrieve data from cloud firestore

非 Y 不嫁゛ 提交于 2021-01-29 06:32:41
问题 I created the database on cloud firestore, and the collection name is products. Now I want to retrieve all the resources in my collection. I have already created 12 products in my database. But in my vue-devtool, I cannot see any array. How can I retrieve the data from cloud firestore? Here is my vue.js code. <template> <h3 class="d-inline-block">Products list</h3> <div class="product-test"> <div class="form-group"> <input type="text" placeholder="Product name" v-model="product.name" class=

Serve simple vuejs page with flask (1 server)

天大地大妈咪最大 提交于 2021-01-29 06:25:01
问题 Internet is full of examples of applications served with Flask (api) and Vue.js (client), but since Vue is a SPA it make sense to serve it with flask as well. I didn't find any help, especially where the App is stored in an external js. With Firefox I get error for a disallowed type: Loading module from “http://localhost:5000/static/App” was blocked because of a disallowed MIME type (“text/html”). On Chrome I just get file not found since it tries to get the App file instead of App.vue. Here

Vue.js: Cannot retrieve data from cloud firestore

吃可爱长大的小学妹 提交于 2021-01-29 06:21:38
问题 I created the database on cloud firestore, and the collection name is products. Now I want to retrieve all the resources in my collection. I have already created 12 products in my database. But in my vue-devtool, I cannot see any array. How can I retrieve the data from cloud firestore? Here is my vue.js code. <template> <h3 class="d-inline-block">Products list</h3> <div class="product-test"> <div class="form-group"> <input type="text" placeholder="Product name" v-model="product.name" class=

How to change a property of an object in Vue?

半城伤御伤魂 提交于 2021-01-29 06:20:21
问题 I try to modify data in Vue for chartjs. The basic datas are purchase orders with supplier_id and supplier_name I like to know, how many orders each supplier has: methods: { render() { let suppliers = [] _.each(this.orders, function (value, key) { if(!_.find(suppliers, {name: value.supplier_name})) { suppliers.push({ name: value.supplier_name, num: 1 }); } else { let supplier = _.find(suppliers, {name: value.supplier_name}) let data = { name: value.supplier_name, num: supplier.num + 1 } Vue

vue filtering values from JSON with computed-function

谁说胖子不能爱 提交于 2021-01-29 06:16:34
问题 How can I filter my array of JSON-data: This is my markup: <div v-if="vacciCounter"> <b-card no-body class="mb-2" v-for="(stateObject, state) in filteredList" v-bind:key="state"> <div style="margin:10px 10px 10px 10px;"> <h5>{{ state }}</h5> This is my function: computed: { filteredList() { if (this.vacciResults.length > 0) { return this.vacciResults.filter(entry => { return entry.state.toLowerCase().includes(this.searchstring.toLowerCase()) }); } }, getStates() { return this.vacciResults; //

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 get data from firebase when page loading using vuejs?

 ̄綄美尐妖づ 提交于 2021-01-29 05:38:28
问题 I have been trying to get current user data from firebase to display details in profile page. Here i am trying get data from firestore, when page loading. My table structure : users => Current user UID => email, firstname, lastname, businessname, etc. I have added functionality to get data from firebase when profile page loading but does not work. error showing in console product.data().firstname is not function. And also i did not get any console output firebase data retrieved or not? here

Why am I getting the error Maximum call stack size exceeded in Vue Router?

天涯浪子 提交于 2021-01-29 05:30:13
问题 I've eliminated all the ways of 'next' being called twice to prevent loops. Everything seems to work except what's going on inside the if (authenticated) block. The goal is to keep the user stuck at the RegisterFlow page until they've verified & provided a display name. Where am I going wrong? Error: Uncaught (in promise) RangeError: Maximum call stack size exceeded Code: const authPages = ["LoginPage", "Register", "ForgotPass"]; const publicPages = ["PrivacyPolicy", "Terms"]; router

Is possible to integrate Auth0 to Firebase like this way?

匆匆过客 提交于 2021-01-29 05:27:54
问题 I am building an app in VueJs and I am looking for the best way to do the authentication part, there is an API in progress as well that will need token verification for protected end points. I would like to know if is possible to integrate Auth0 to Firebase in a way that Firebase is the main center of communication between the VueJs app and Auth0 (the same thing with the API -> Firebase -> Auth0). I am asking this because I would like to know exactly if I can save some lines of code and

Vue.js: How to open/handle existing project by SourceMap or bundled files

五迷三道 提交于 2021-01-29 05:21:13
问题 Sorry for my stupid question. I am new in vue.js. I have vue.js project without source codes. I have to read Vue components and improve it. But some friends told me that it is imposimble to convert it back. Is it really imposible? Project file structure: /js -app.js -app.js.map -manifest.js -manifest.js.map -vendor.js -vendor.js.map 回答1: On vue >=2 that's basically impossible. Take a look here: https://forum.vuejs.org/t/any-method-or-workaround-to-decompile-dynamically-compiled-components