不同页面有不同的title,那么如何动态改变title的值呢?涉及到两个页面的修改,src/main.js文件和src/router/index.js文件1.在main.js文件中注册一个全局的前置守卫:router.beforeEach(function(to,from,next){if(to.meta.title){document.titl...
在Vue项目中,我们会发现,当我们在data中引入图片时,会发现图片在页面中并不能正常显示。图片路径错误:错误的引入方式:exportdefault{data(){return{logo:'@/assets/image/img/liruotong1.jpg'}}}有效的引入方法:1.import引入importlogo_urlfrom'@/ass...