![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端
张小哇
Life begins at the end of your comfort zone
展开
-
【vue3】ref全家桶
ref接受一个内部值并返回一个响应式且可变的ref对象。ref对象仅有一个.valueproperty,指向该内部值。在vue3中,定义的常量不是响应式的,修改值的时候页面不会发生变化。如果参数是一个ref,则返回内部值,否则返回参数本身。这是的语法糖函数。toRef可以用来为源响应式对象上的某个property新创建一个ref。然后,ref可以被传递,他会保持对其源property的响应式连接。将对象某个属性变成可响应式的,并且是双向的。原创 2023-06-19 15:57:49 · 141 阅读 · 0 评论 -
Parsing error: Unexpected token错误解决方案
问题描述:import动态导入,将js文件单独打包时,webpack打包错误import('./test') .then((res) => { // 文件加载成功 console.log(res.mul(2, 5)); }) .catch(() => { console.log('文件加载失败'); });构建出错:ERROR in ./src/js/index.jsModule Error (from ../../node_modules/_原创 2021-10-18 16:41:37 · 33150 阅读 · 4 评论 -
img 标签显示不出https源的图片
问题描述web端(PC)端使用img标签。src为https域的源。发现403,图片请求失败。解决方案只针对web端。在head里添加代码<meta name="referrer" content="no-referrer">原创 2021-08-06 10:31:36 · 1008 阅读 · 1 评论