nuxt.js

Reusable component for vue-tags-input

前提是你 提交于 2021-01-29 12:31:19
问题 I'm currently using this UI component from http://www.vue-tags-input.com I'm planning to create a reusable component for vue-tags-input, here's my current code: components/UI/BaseInputTag.vue <template> <b-form-group :label="label"> <no-ssr> <vue-tags-input :value="tags" @tags-changed="updateValue"/> </no-ssr> </b-form-group> </template> <script> export default { name: 'BaseInputTag', props: { label: { type: String, required: true }, value: { type: [String, Number, Array] }, tags: { type:

Vue Warn the client side rendered virtual DOM tree is not matching server-rendered content

北城余情 提交于 2021-01-29 12:00:44
问题 I'm trying to loop a tr within a table with Vue.js and Nuxt. But when I load the page I get the following error vue.runtime.esm.js?2b0e:619 [Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside , or missing . Bailing hydration and performing full client-side render. When I remove the table from the following block of code from my HTML the error disappears.

how to get access to vuex inside other js files like plugins in nuxt

a 夏天 提交于 2021-01-29 10:44:04
问题 i have a problem. i wanna get access to one of my getters inside my vee-validate.js file. how can i do that? in my pages and components, (in <script>...</script> part, outside export default{...} ) i used this function: component.vue <script> let lang; function getLang({store}) { lang = store.state.lang } export default{ ... } but it is not working! i'm trying to access my custom lang file (for translation purpose) that is stored in lang state in my vuex, and use it in vee-validate.js file

Vuex LocaleStorage plugin for nuxt.js

↘锁芯ラ 提交于 2021-01-29 10:17:09
问题 In my project, I faced with a problem the cookie technology and I can't use it because my client gets problems with it because cookies should have some button for notification, and the user might not approve it. My question is: Are there any solutions (modules possible) to solve such problems? If yes - what can you recommend first of all? In my project, I need to get data in middleware(in SSR mode) from VUEX and I need to save it after refresh pages. If it possible - need to save session data

Why is this lifecycle hook code working twice?

∥☆過路亽.° 提交于 2021-01-29 09:31:36
问题 There is such a code: <template> <div class="wrapper"> </div> </template> <script> import axios from 'axios'; export default{ created () { console.log('222'); this.getTrackerIdData(); this.getTrackerData(); }, methods: { getTrackerIdData () { return axios.get("https://seo-gmbh.eu/couriertracker/json/couriertracker_api.php?action=tracking_new.create" , { }) .then(response => { this.$store.commit('tracker/setTrackingKeyId', response.data.data.tracking_new_key_id); this.$store.commit('tracker

Laravel (Echo, Sanctum, websockets) + Pusher + Nuxtjs SPA

你说的曾经没有我的故事 提交于 2021-01-29 07:33:37
问题 I'm trying to send events to private channel, but I can't receive them. Otherwise it works fine for public channels. Here's my code : Plugin : Echo.js window.Echo = new Echo({ broadcaster: 'pusher', key: process.env.MIX_PUSHER_PUBLIC_KEY, wsHost: process.env.VUE_APP_WEBSOCKETS_SERVER , //window.location.hostname,// cluster: process.env.MIX_PUSHER_APP_CLUSTER, wsPort: 6001, forceTLS: false, /* key: process.env.MIX_ABLY_PUBLIC_KEY, wsHost: 'realtime-pusher.ably.io', wsPort: 443, */ disableStats

Can not send file to the .net core API from Axios (vue-nuxt)

社会主义新天地 提交于 2021-01-29 05:44:34
问题 I get back 500 errors if i try to send a file from Vue to my API endpoint in .net Core I followed tutorials who do this, but they do not seem to work for this setup. .net core API: [Route("api/[controller]")] [ApiController] public class FileUploadController : ControllerBase { [HttpPost("[Action]")] public string sendFiles([FromBody]FileUploadAPI file) { return "Yes!"; } public class FileUploadAPI { public IFormFile File { get; set; } } } Vue: this.$axios.post( 'https://localhost:44352/api

Bundling a plugin with Rollup but having duplicate Vue.js package imported in the client app's bundle (Nuxt)

…衆ロ難τιáo~ 提交于 2021-01-28 17:49:26
问题 Dear Stack Overflow / Vue.js / Rollup community This could be a noob question for the master plugin developers working with Vue and Rollup. I will write the question very explicitly hoping that it could help other noobs like me in the future. I have simple plugin that helps with form validation. One of the components in this plugin imports Vue in order to programatically create a component and append to DOM on mount like below: import Vue from 'vue' import Notification from './Notification

Using NUXT with SEO compatibility for thousands of products

半腔热情 提交于 2021-01-28 12:36:20
问题 When I build the app, it only creates routes for products already in the database. When I add new products those links aren't automatically added to the routes, and aren't SEO compatible. I have to rebuild the app to "pick up" the new products. Is there a better way of doing this? 回答1: There's really only 3 options here. Option 1: Rebuild the app This is what you're already doing, so I won't touch base on it more, other than point out this only works for static generations. However, SEO