Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

vue如何实现在第二次请求后无刷新的形式更改页面的赋值?

我现在有一个列表页面,通过jquery,vue实现的,列表数据是通过请求接口返回来的,我在页面上有一些搜索,确定搜索后再次请求接口,我希望页面不刷新直接替换已有的数据,我发现 vue 有个watch事件做监听的,但是具体怎么实现的一直没搜到,希望大神们给点想法,谢谢!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

要是我没理解错的话,再次请求的结果直接赋值给渲染列表的字段就行了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...