
- faq2021年5月13日 / 4分钟阅读
Vue watch和computed的区别
日常开发中,watch属性和computed属性,两者的功能基本都可以实现,但是watch属性的变化会触发computed属性的重新计算,而computed属性的变化不会触发watch属性的重新计算。 - faq2021年5月12日 / 1分钟阅读
vue Unknown custom element: <router-link>
vue Unknown custom element: <router-link> - did you register the component correctly? For recursive components, make sure to provide the "name" option. - faq2021年4月24日 / 2分钟阅读
vue跨域请求配置,跨域代理
vue-cli创建项目后,使用axios请求后端接口,需要请求后端接口时,报了跨域的问题,具体错误如下 Request header field access-control-allow-origin is not allowed - faq2021年4月23日 / 1分钟阅读
vue弹窗滚动穿透
最近在项目开发中遇到一个滚动穿透的问题,首页一个个人中心的弹框,打开弹窗时,在首页加了一个遮罩层,来阻止对其余内容的操作,但是在滚动滚轮时,首页内容还是会滚动,导致效果不好。 - faq2021年4月22日 / 1分钟阅读
vue Error compiling template
vue Error compiling template Component template should contain exactly one root element - faq2021年4月21日 / 1分钟阅读
vue导入组件使用 @ 是什么意思
vue中的import @代表什么意思呢?这是通过 Webpack 的 resolve.alias 配置选项完成的,并非特定于 Vue - faq2021年4月20日 / 2分钟阅读
如何配置tsconfig.json以及常用的配置项有哪些
最近项目引入了ts,那么如何配置ts编译选项成为了一个难题,本文介绍如何为项目配置ts的编译选项。 - faq2021年4月19日 / 2分钟阅读
typescript中any和unknown的区别
本文介绍typescript any和unknown的区别以及使用场景,任何类型都能分配给 unknown,但 unknown 不能分配给其他基本类型,而 any 都能分配和被分配。 - faq2021年4月13日 / 1分钟阅读
react function components cannot be given refs
在使用函数组件时,报错:`Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()`