nuxt

Nuxt application returns 404 when dynamic routes are refreshed (Tomcat Server)

风格不统一 提交于 2020-05-27 05:55:44
问题 I'm doing the following: - Production Build: npm run generate - I copy the dist folder into the Tomcat Webapps, and it works fine - Whenever I refresh a dynamic route, it shows 404 URLs that work: https://ip:port/entryPath/dashboard/user URLs that don't work: https://ip:port/entryPath/dashboard/user/123 https://ip:port/entryPath/dashboard/user/123/settings https://ip:port/entryPath/dashboard/user/123/privacy I want to be able to share an URL such as: https://ip:port/entryPath/dashboard/user

Nuxt Apollo Shopify Graphql

依然范特西╮ 提交于 2020-04-17 20:37:11
问题 So I am using the https://github.com/nuxt-community/apollo-module I am trying to set this up to connect to my shopify graphql API On nuxt.config.js: apollo: { clientConfigs: { default: { httpEndpoint: 'https://my-store.myshopify.com/admin/api/2020-01/graphql.json', getAuth: () => 'Bearer 26cfd63bbba75243b55fad2c8de0a12f' }, } }, on index.vue, i have the following: <script> import gql from 'graphql-tag' export default { apollo: { data: { query: gql` query { shop { name } } `, } } } </script>

VueJS render property inside html string using v-html

China☆狼群 提交于 2020-03-16 07:12:48
问题 I have a string of html where I get from Editor and stored in the database. <h3><a href="#" rel="noopener noreferrer nofollow"><em><strong>Profile Of User:</strong></em></a></h3><p></p><p>{{user}}</p> I want to retrieve it from the database and render it as HTML. when I use v-html, it will be rendered as: <v-card-text v-html="content"></v-card-text> Profile Of User: {{user}} How to render {{hello}} from data property if I have data property like this: data() { return { user: "Lim Socheat",

VueJS render property inside html string using v-html

梦想的初衷 提交于 2020-03-16 07:11:09
问题 I have a string of html where I get from Editor and stored in the database. <h3><a href="#" rel="noopener noreferrer nofollow"><em><strong>Profile Of User:</strong></em></a></h3><p></p><p>{{user}}</p> I want to retrieve it from the database and render it as HTML. when I use v-html, it will be rendered as: <v-card-text v-html="content"></v-card-text> Profile Of User: {{user}} How to render {{hello}} from data property if I have data property like this: data() { return { user: "Lim Socheat",

VueJS render property inside html string using v-html

南楼画角 提交于 2020-03-16 07:10:43
问题 I have a string of html where I get from Editor and stored in the database. <h3><a href="#" rel="noopener noreferrer nofollow"><em><strong>Profile Of User:</strong></em></a></h3><p></p><p>{{user}}</p> I want to retrieve it from the database and render it as HTML. when I use v-html, it will be rendered as: <v-card-text v-html="content"></v-card-text> Profile Of User: {{user}} How to render {{hello}} from data property if I have data property like this: data() { return { user: "Lim Socheat",

How to create a wrapper class for node.js plugin

﹥>﹥吖頭↗ 提交于 2020-03-05 03:13:11
问题 So I'm new to JavaScript, and have a project where I'm using the Node.js cookies module found here. I've been able to create cookies & set them correctly like so: this.Vue.$cookies.set('cookieName', cookieValue, { sameSite: 'lax', secure: true }); However, I want to create a wrapper function/class so I can set the sameSite: 'lax' and secure: true options as defaults, and not have to pass them in every time I call the set function from that module. Obviously, I also want to be able to

how to remove /?fbclid=… in nuxt url

半世苍凉 提交于 2020-03-05 00:23:55
问题 hello there i like to remove the facebook analytic forced url parameter /?fbclid= https://www.example.com/?fbclid=... , from my host url, when redirected from facebook by clicking the url, the problem is the nuxt-link-exact-active class is not applied if redirected with this parameter. Thanks 回答1: In simple cases like https://www.example.com/?fbclid=... where fbclid is the only parameter, it should be a trivial Javascript like that: <script> // ideally this is on top of page; works on bottom

How to check my create-nuxt-app version and upgrade it?

£可爱£侵袭症+ 提交于 2020-02-25 06:08:40
问题 Background: Previously, running yarn create nuxt-app myApp installs Nuxt v2.4.0 but today for example I noticed you downgraded to Nuxt v2.0.0. I did not change the development environment so I can not understand this behavior. I did some search and complained elsewhere when I landed on this: So the OP was asked to upgrade his create-nuxt-app version. Question : But how to do that ? How to check which create-nuxt-app I do have ? Bonus: I read why does Create-Nuxt-App installs nuxt version 1.4

How to check my create-nuxt-app version and upgrade it?

百般思念 提交于 2020-02-25 06:06:20
问题 Background: Previously, running yarn create nuxt-app myApp installs Nuxt v2.4.0 but today for example I noticed you downgraded to Nuxt v2.0.0. I did not change the development environment so I can not understand this behavior. I did some search and complained elsewhere when I landed on this: So the OP was asked to upgrade his create-nuxt-app version. Question : But how to do that ? How to check which create-nuxt-app I do have ? Bonus: I read why does Create-Nuxt-App installs nuxt version 1.4

Nuxt: How to add content/scripts to the head dynamically on server side

大憨熊 提交于 2020-01-24 14:35:56
问题 How can I add dynamically content to the head in Nuxt on server side? I was trying to rewrite this module here which supports only static id's: https://github.com/nuxt-community/modules/blob/master/packages/google-tag-manager/index.js (My id is coming from the store (The store is fetching the id from a rest call)) This is the function which is adding the content to the head: export default function addheadcode(head, id) { const options = { id: id, layer: 'dataLayer', pageTracking: true,