赞
踩
如何让标题1和标题2不一样?
- <script>
- export default {
- onLaunch() {
- // 监听各种跳转----------------------------------------
- ['navigateTo', 'redirectTo', 'reLaunch', 'switchTab', 'navigateBack', ].forEach(v => {
- uni.addInterceptor(v, {
- success: e => this.watchRouter(e),
- })
- });
- this.watchRouter();//首次路由跳转
- },
- methods: {
- watchRouter(d) {
- this.$nextTick(() => {
- document.title = `修改小程序顶部标题`;//修改小程序顶部标题
- });
- },
- },
- }
- </script>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。