- 博客(3)
- 收藏
- 关注
原创 lodash不生效
在vue2中lodash的防抖不生效以下代码无法执行recordTopHandler() { return _.debounce( () => { this.$route.meta.top = window.scrollY }, 100, { trailing: true } ) },需要定义为属性,才能执行methods: { recordTopHandler:
2022-03-27 22:58:03 622
原创 vue项目打包后本地无法查看
vue项目打包后本地无法查看浏览器显示空白,报错显示:vue.config.js中配置publicPath: ‘./’,依旧无效publicPath: './',推测可能是vue脚手架版本太高,不兼容vue2的项目解决方案安装http-server,在项目根目录运行http-server文件管理器中打开项目目录,在地址栏输入cmd可快速打开cmd并定位到当前目录npm i http-server -g...
2022-03-24 19:14:16 1554
原创 Vue学习笔记_Unknown custom element: <Count>
Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the “name” option.在注册全局组件的时候发现的错误,原因是顺序不正确,应在实例vue之前注册全局组件错误示范//错误示范new Vue({ render: h => h(App),}).$mount('#app')Vue.component
2022-03-13 22:24:14 980
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人