- v-for必须加key属性,否则编译不了
- v-for只有一个参数时,不能加括号(),否则报final loader didn’t return a Buffer or String编译失败
- 小程序image标签没有width、height属性,这样写无效
<img width="80px" height="80px" />
- v-if条件,不能写太复杂,这样写会报错
<div v-if="obj !={}"></div>
- 子组件传参,不能传对象
- 不支持document
- 不支持addEventListener
- 主包/单个分包大小不超过2M,整个小程序的所有分包大小不超过16M
-
r
o
u
t
e
r
.
p
u
s
h
(
)
方法相当于
w
x
.
n
a
v
i
g
a
t
e
T
o
(
)
。
w
x
.
n
a
v
i
g
a
t
e
T
o
会保留当前页面,跳转到某个页面,最多能保留
10
个,超过会报
f
a
i
l
w
e
b
v
i
e
w
c
o
u
n
t
l
i
m
i
t
e
x
c
e
e
d
。解决办法:使用
router.push()方法相当于wx.navigateTo()。wx.navigateTo会保留当前页面,跳转到某个页面,最多能保留10个,超过会报 fail webview count limit exceed。 解决办法: 使用
router.push()方法相当于wx.navigateTo()。wx.navigateTo会保留当前页面,跳转到某个页面,最多能保留10个,超过会报failwebviewcountlimitexceed。解决办法:使用router.replace()或者wx.redirectTo(),它们没有次数限制
r o u t e r . r e p l a c e ( ) 和 router.replace()和 router.replace()和router.push()的传参方式类似