推荐 最新
七安前

Nuxt3 能不能怎么样可以在根目录 id="__nuxt" 上加一个class?

Nuxt3 能不能怎么样可以在根目录 "id="__nuxt"" 上加一个"class"? 比如下面这样 ... 比如在"body"上加"class" 可以配置 bodyAttrs: { class: 'page-content' } "id="__nuxt"" 上有没有配置

15
1
0
浏览量393
小飞侠007

Nuxt3 用 i18n 控制台提示这个是什么意思?

[intlify] the message that is resolve with key 'menu') is not supported for jit compilation [intlify] the message that is resolve with key 'toggleNavigation') is not supported for jit compilation [intlify] the message that is resolve with key 'blogMenu') is not supported for jit compilation [intlify] the message that is resolve with key 'search') is not supported for jit compilation [intlify] the message that is resolve with key 'aboutMe') is not supported for jit compilation [intlify] the message that is resolve with key 'menu') is not supported for jit compilation [intlify] the message that is resolve with key 'toggleNavigation') is not supported for jit compilation [intlify] the message that is resolve with key 'blogMenu') is not supported for jit compilation [intlify] the message that is resolve with key 'search') is not supported for jit compilation [intlify] the message that is resolve with key 'aboutMe') is not supported for jit compilation [intlify] the message that is resolve with key 'home') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'home') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'readMore') is not supported for jit compilation [intlify] the message that is resolve with key 'search') is not supported for jit compilation [intlify] the message that is resolve with key 'categories') is not supported for jit compilation [intlify] the message that is resolve with key 'recentPosts') is not supported for jit compilation [intlify] the message that is resolve with key 'subscribe') is not supported for jit compilation [intlify] the message that is resolve with key 'followOurLatestNews') is not supported for jit compilation [intlify] the message that is resolve with key 'enterYourEmailAddress') is not supported for jit compilation [intlify] the message that is resolve with key 'other') is not supported for jit compilation [intlify] the message that is resolve with key 'login') is not supported for jit compilation [intlify] the message that is resolve with key 'register') is not supported for jit compilation

13
1
0
浏览量324
努力的大名

Nuxt3 用 useFetch 同一个链接不同请求参数为什么返回的数据是同一个?

写一个接口文件 "list.js" export const listApi = (data) => { return new Promise(function (resolve) { useFetch('http://127.0.0.1:8081/api/list', { method: "post", body: data }).then(res => { // console.log(res.data.value.data.list[0].title) resolve(res); }) }); } 然后再 "app.vue" 里面发两个请求,后台给的数据不同,但是打印的数据确实同一个 import {listApi} from "~/api/list"; listApi({page: 1, page_size: 5}).then(res => { console.log(res.data.value.data.list[0].title) }); listApi({page: 2, page_size: 5}).then(res => { console.log(res.data.value.data.list[0].title) }); ... 如果直接在"app.vue"里面这样写,就正常,放回不同数据 useFetch('http://127.0.0.1:8081/api/list', { method: "post", body: {page: 1, page_size: 5} }).then(res => { console.log(res.data.value.data.list[0].title) }) useFetch('http://127.0.0.1:8081/api/list', { method: "post", body: {page: 2, page_size: 5} }).then(res => { console.log(res.data.value.data.list[0].title) }) ... 这是为什么,应该怎么写?

9
1
0
浏览量266
无敌英俊大师兄

react单页应用可以分页面接入服务端渲染吗?

"react"单页项目,最近要做性能优化,可以分页面接入服务端渲染吗?比如我有查询页、列表页、填写页,我现在只要在查询页接入服务端渲染?有类似的案例么

0
1
0
浏览量205
刘传疯子

如何在Nuxt3项目中成功引入Swiper插件?

怎么在Nuxt3项目中引入swiper插件? 在网上找到的教程几乎都是vue项目或nuxt2,多次在Nuxt3项目中尝试引入swiper一直失败,我的vue版本是3.4

0
1
0
浏览量192
脑洞大咖

nuxt3项目每个页面都有重复的资源请求是怎么回事?

nuxt3项目,打开网页后,通过F12查看网络,发现打开每一页,在网络的"其它"请求项中,都有大量重复的请求 比如打开A页面,有a、b、c的图片,d、e、f的js文件,打开B页面,也是有a、b、c的图片,d、e、f的js文件,C页面也是如此,但是A、B、C页面并没有使用到这些资源,求解

0
1
0
浏览量209
北北che

docker容器日志能否设置存储到别的路径?

使用docker运行了php容器, nginx容器 通常查看日志都是使用docker logs php或nginx 发现默认的这些日志是存储在容器目录中的 如 "/var/lib/docker/containors/php/php.json" "/var/lib/docker/containors/nginx/nginx.json" 有什么办法能让日志统一存储在别的位置, 如"/home/logs" 目录下?

0
1
0
浏览量184
你好我叫张倩话

nuxt3 axios 请求出来的数据在源代码中没有这也没有办法 SEO 呀?

nuxt.config.ts 中的 ssr 也是 true 自己写的后台接口 页面显是正常的,但是右键, 查看源代码后里面没有请求回来的数据呀! 这能 SEO ? 是哪里还需要配置下吗? nuxt.config.ts代码: export default defineNuxtConfig({ app: { head: { charset: 'utf-8', viewport: 'width=device-width, initial-scale=1', } }, devtools: {enabled: false}, //关闭遥测数据 telemetry: false, modules: ['@pinia/nuxt'], css: [ "@/assets/style/style.css" //配置使用的样式 ], ssr:true, }) 页面代码: 0"> {{row.title}} {{dateDisplay(row.created_at)}} 默认分类 {{row.views}} 阅读 评论 标签: {{tag}} 没有了 没有了 import {onMounted,ref} from "vue"; import {getArticleDetail} from "~/api/article"; import type {ApiResponse,ArticleItem} from "~/types/intreface"; import {dateDisplay} from "~/utils/date"; import {_length} from "~/utils"; import { useRoute } from '#app'; const route = useRoute(); const params = route.params; const id = ref(params.id); const loading = ref(false); const row = ref(); onMounted(async()=>{ await fetchData(); }) const fetchData = async()=>{ try { loading.value = true; const data:ApiResponse = await getArticleDetail({id:id.value}); if(data.code!==0){ return Promise.reject(data.message); } row.value = data.data as ArticleItem; if(_length(row.value.url)===0){ row.value.url = '/archives/'+row.value.slug; } useHead({ title: row.value.title, meta: [ { name: 'description', content: '我的神奇网站。' } ], bodyAttrs: { class: 'test' }, script: [ { innerHTML: 'console.log(\'Hello world\')' } ] }) }catch (e) { loading.value = false; } }

0
1
0
浏览量200
刘一抗二二

前后端分离项目,前端中一般以内网还是外网的形式调用接口?

如题,我的项目部署在阿里云服务器,前端(nuxt3 ssr)在A上,后端(api服务)在B上,A和B处于同一VPC内,且相同安全组,在前端项目中调用接口是写B的内网IP还是通过域名呢? 如果写B的内网IP,还需要其它什么配置?

0
1
0
浏览量199
我买了30万的鞋子

Nuxt3中如何将小图片转换为Base64格式?

请问nuxt3怎么把小图片转base64?都是1k左右的小图片 vite配了assetsInlineLimit:8192也不管用 vite版本: 4.5.0 vite配置: vite: { base: '/dist/', build: { assetsInlineLimit: 8192, //8kb minify: 'terser', terserOptions: { compress: { drop_console: true, drop_debugger: true, } }, }, plugins: [ prismjsPlugin({ languages: 'all', plugins: ['toolbar', 'copy-to-clipboard', 'line-numbers'], theme: 'tomorrow', css: true }), ] }

0
1
0
浏览量170