Vue.js

How to make a Edit after making the Create

我们两清 提交于 2021-02-11 14:15:48
问题 Im doing a crud for my Vue/Laravel application, my add button is working fine but im having trouble making work my edit/update button. I dont get any erros from backend or frontend, just dont work This is my code: Frontend: async addDespesa() { let uri = "api/despesas"; const response = await axios.post(uri, this.despesa).then((response) => { this.despesas.push({ des: this.despesa.des, valr: this.despesa.valr, stt: this.despesa.stt, vencc: this.despesa.vencc, emiss: this.despesa.emiss, });

Why local storage is changing every entry in task list

余生颓废 提交于 2021-02-11 14:15:12
问题 The local storage should only hold state for the task where the completed button has been pressed. Currently when I refresh the page all the tasks are marked as completed. <template> <button type="button" v-bind:class="order_button_style" @click="on_order_button_click()"> {{ buttonText }} </button> </div> </template> <script> export default { props: 'itemId', required: true, data() { return { index: 'this.itemId', status: '' } }, methods: { on_order_button_click() { this.status = !this.status

How to activate / deactivate an Electron.js submenu from inside a Vue.js Component according to a specific Vuex state?

拥有回忆 提交于 2021-02-11 14:14:51
问题 I can't find the solution to this anywhere. I have this sample vue-vuex-electron app that I've created and I want to enable / disable some submenus of the app according to whether the vuex state 'isLogged' is true or false. I managed to apply that to the nav router-links (using v-if), but not yet to the menu items... 'cause I don't know how to access the actual Menu (already set and rendered at the main process). For example, at my Home.vue, I'd like to import the Electron.Menu of the app and

­ inserted into string in Vuetify crashing Chrome tab

放肆的年华 提交于 2021-02-11 14:03:47
问题 Context I have a Vue app, in which I want to display lengthy strings - e.g. contents of large jsons. When testing it with one of such files my Chrome tab started crashing. After further investigation I discovered: problem occurs only in Chrome - Firefox works fine problem occurs only when text is embedded within a Vuetify grid problem occurs only when a specific short string is part of the json Code Please have a look at https://codesandbox.io/s/damp-frog-70sxh. In this example app if you

Downloading byte array from Spring Boot to Vue frontend

家住魔仙堡 提交于 2021-02-11 14:02:31
问题 I have the following functions, I am trying to read a string from my MongoDB database which is an image decode it and send it to my Vue frontend to be downloaded. @GetMapping(path = "/signature/{signatureId}", produces = MediaType.IMAGE_PNG_VALUE) public byte[] downloadSignature(String signatureId) { Signature signature = routeRepository.findBySignature(signature); byte[] bytes = Base64.getDecoder().decode(signature.getSignature().getBytes(StandardCharsets.UTF_8)); // This try-catch just

Correct way to import a script / module / component into a page in Nuxt?

自闭症网瘾萝莉.ら 提交于 2021-02-11 13:59:51
问题 I'm new to js, vue & nuxt so quite confused about what is the correct and best way to import a script / module / component into an HTML page and run it. For example, I know that this works with an event listener in the js script: <template> <div> <button id="importJS">Go!</button> </div> <template> <script src="~/index.js"></script> But is something like this better?: @import "~/index.js" <template> <div> <button id="importJS">Go!</button> </div> <template> And / or should only the main

VueJS: Build process inserts junk characters

喜夏-厌秋 提交于 2021-02-11 13:56:31
问题 Problem During development ( yarn run dev ) everything looks and operates normally. When I yarn run build , the resulting dist includes a bunch of junk characters. For example, &copy becomes © and — becomes — . Context "vue": "2.3.2" "vue-meta": "^1.5.8" "vue-router": "^2.5.3" "vuex": "^2.3.1" 回答1: Ensure encoding is set to utf-8 in your index.html page. It should have a head entry of: <meta charset="utf-8"> 来源: https://stackoverflow.com/questions/54789038/vuejs-build-process-inserts-junk

How disable to select minutes in v-time-picker widget?

微笑、不失礼 提交于 2021-02-11 13:49:15
问题 In my Vue.js application, I use v-time-picker widget of the Vuetify framework. I want to disable to select minutes. If user select hour, automatically inserted 00 in minutes. How to make it correctly? Right now I set allowed-minutes props but in that case, user needs to select minutes anyway. <template> <v-time-picker full-width scrollable format="24hr" :disabled="timePickerDisabled" :allowed-minutes="allowedMinutes" v-model="selectedTimePickerItems"> </v-time-picker> </template> <script>

Rendering multiple components dynamically from an array

前提是你 提交于 2021-02-11 13:42:05
问题 I am trying to render components dynamically within my child component named ChildTabs. I would like to render the components based on the array that passed into the component from the parent view named Contatcs. So for example if I pass the the form_type from the contact_type named "Big" it would render on my tabs vue. However I have other data that contains more than one component I am trying to render, such as medium which contains multiple forms such as Red Green & Blue. I have an idea of

Rendering multiple components dynamically from an array

守給你的承諾、 提交于 2021-02-11 13:41:27
问题 I am trying to render components dynamically within my child component named ChildTabs. I would like to render the components based on the array that passed into the component from the parent view named Contatcs. So for example if I pass the the form_type from the contact_type named "Big" it would render on my tabs vue. However I have other data that contains more than one component I am trying to render, such as medium which contains multiple forms such as Red Green & Blue. I have an idea of