BUG解决
文章平均质量分 61
若年封尘
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
TS报错解决:不能将类型“string | null”分配给类型“string | undefined”
在Vue3项目开发中遇到一个基础的TS报错,在此稍作整理复习:不能将类型“string | null”分配给类型“string | undefined”。finalImage 的类型是 string | null,即它可能是字符串,也可能是 null。在模板中使用 :href=“finalImage” 时,TypeScript 会认为 finalImage 可能为 null,而 href 属性不接受 null 值。原创 2025-01-22 10:20:09 · 1188 阅读 · 0 评论 -
SSH远程登录 提示access denied
当用MobaXterm远程连接服务器时出现上面的错误,可能是因为服务器配置的问题(网上有很多方法),也可能是用户名错误这样的低级问题。改为root后输入密码即可成功连接。原创 2023-05-05 14:58:09 · 4543 阅读 · 2 评论 -
成功解决TypeError: ‘float‘ object cannot be interpreted as an integer
究其原因,无非是你range里使用了小数,所以解决方法很简单,无非就是两种:要么就把range里的参数变为整数,要不就换一种支持小数的写法。原创 2022-05-15 15:03:03 · 77146 阅读 · 3 评论 -
Vue报错解决[Vue warn]: Error in render: “TypeError: Cannot read property ‘state‘ of undefined“
这个错误提示通常出现在 Vue 组件中,它尝试读取 Vuex store 的 state 对象,但是该对象没有被定义。这假设 store.js 文件位于 src/store 目录中。如果store.js 文件位于其他目录中,请相应地更改导入路径。如果 Vuex store 中没有定义尝试使用的状态,则会出现这个错误。反复确认代码后,发现并没有上述问题。这里的 myState 是Vuex store 中定义的状态名称。如果组件中使用其他名称,请相应地更改代码。3.Vuex store 中没有定义所需的状态。原创 2023-04-24 19:31:12 · 4230 阅读 · 0 评论
分享