当前位置:网站首页>Error in render: "typeerror: cannot read properties of undefined (reading 'length')" --- error when calling interface
Error in render: "typeerror: cannot read properties of undefined (reading 'length')" --- error when calling interface
2022-07-26 10:01:00 【Coexistence source of beauty and strength】
Question why
The level is too deep
<view class="input head-img">
<text> Head portrait </text>
<image :src="person.headerImg" />
</view>
messageRequest() {
message().then(res => {
console.log(res.data);
// ( Step on the pit )Error in render: “TypeError: Cannot read properties of undefined (reading ‘length‘)“
// If the level is too deep, an error will be reported -- Pay attention to template The layer should not be too deep --- You can define multiple layers here
this.person = res.data.userInfo;
console.log(this.person);
});
}
resolvent
// ( Step on the pit )Error in render: “TypeError: Cannot read properties of undefined (reading ‘length‘)“
// If the level is too deep, an error will be reported – Pay attention to template The layer should not be too deep —
You can define multiple layers here
边栏推荐
- Principle analysis and source code interpretation of service discovery
- Flask框架初学-03-模板
- IE7 set overflow attribute failure solution
- Logical architecture of MySQL
- B站这个视频我是跪着看完的
- Customize permission validation in blazor
- Double authentication of server and client
- PHP one-time request lifecycle
- The fourth week of summer vacation
- Study notes of the first week of sophomore year
猜你喜欢
Installation and use of cocoapods
spolicy请求案例
Production of a-modal drag function in antui
A new paradigm of distributed deep learning programming: Global tensor
数通基础-STP原理
Sqoop [environment setup 01] CentOS Linux release 7.5 installation configuration sqoop-1.4.7 resolve warnings and verify (attach sqoop 1 + sqoop 2 Latest installation package +mysql driver package res
【荧光字效果】
Gauss elimination solves the inverse of matrix (Gauss)
SSG框架Gatsby访问数据库,并显示到页面上
苹果独占鳌头,三星大举复兴,国产手机在高端市场颗粒无收
随机推荐
面试突击68:为什么 TCP 需要 3 次握手?
Server memory failure prediction can actually do this!
[information system project manager] summary of essence of high-level series for the first time
万字详解“用知识图谱驱动企业业绩增长”
汉诺塔II|汉诺塔4柱
regular expression
Session based recommendations with recurrent neural networks
[fluorescent character effect]
苹果独占鳌头,三星大举复兴,国产手机在高端市场颗粒无收
B站这个视频我是跪着看完的
在.NET 6.0中配置WebHostBuilder
Leetcode 504. Hex number
SQL优化的魅力!从 30248s 到 0.001s
分布式网络通信框架:本地服务怎么发布成RPC服务
The combination of officially issued SSL certificate and self signed certificate realizes website two-way authentication
Installation and use of cocoapods
In Net 6.0
Draw arrows with openlayer
Strange Towers of Hanoi|汉诺塔4柱问题
服务发现原理分析与源码解读