Comments (4)
可以尝试 NavBar title 属性绑定路由的 meta.title 值
from vue3-h5-template.
<template #title>
11 {{ router.currentRoute.name }}
</template>
很奇怪 router.currentRoute 能出现一大串,加上 name 就无了。。。可是明明有值
from vue3-h5-template.
const title = computed(() => {
const route = router.currentRoute.value;
return route.meta.title;
});
<template #title> {{ title }} </template>
from vue3-h5-template.
原来是个 ref...
感谢大佬!
from vue3-h5-template.
Related Issues (20)
- delCachedView什么时候时候使用? HOT 1
- 点击跳转路由,经常有路径变了,页面原地站岗不动的情况。 HOT 1
- 真是个宝藏项目,希望能有js的选择,目前只有ts的,新手不知道怎么搞可以配置成js的 HOT 5
- 路由模式配置 HOT 1
- 页面跳转后,不要显示TabBar HOT 3
- How does Tailwindcss switch to Unocss HOT 1
- js-version有后续计划吗 HOT 3
- 能不能出个js版本,理由进来看 HOT 4
- Taliwind CSS 和 Vant使用情况下的适配问题 HOT 8
- index.html静态资源链接中的//cdn.jsdelivr.net/npm/eruda建议改为本地化。 HOT 1
- Vant4没有DatetimePicker,只有DatePicker,所以按需引入组件需要改为引入DatePicker
- 很是纳闷在外层容器 #app加max width 怎么不管用啊? HOT 1
- 引入Ref 怎么会报错 HOT 2
- 前端菜鸡请教,在router.beforeEach跳转OAuth连接并回调实现自动登录合适吗? HOT 1
- 升级到最新版vue有一个警告提示信息如何解决? HOT 11
- NProgress configure导致使用Http请求时自动滚动到顶部问题 HOT 1
- 项目clone后未改动,prettier异常,保存时也不自动格式化代码,且import ** from **均标红 HOT 7
- pnpm安装且编译成功,但运行时报错,识别不到@vitejs/plugin-vue HOT 1
- showNotify不能显示vant官方的样式 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue3-h5-template.