简体   繁体   English

我怎么能改用 Vue.js 用 AJAX jQuery 示例重写这个 Flask?

[英]How could I rewrite this Flask with AJAX jQuery example using Vue.js instead?

I want to reproduce this example using Vue.js , and a library like axios or vue-resource .我想使用Vue.js和像axiosvue-resource这样的库来重现这个例子。

http://flask.pocoo.org/docs/1.0/patterns/jquery/# http://flask.pocoo.org/docs/1.0/patterns/jquery/#

Could anyone give me advice on where to start?谁能给我建议从哪里开始?

Well, if you know Vue.js, I'd suggest you build out the front-end first, then use Flask to serve data, much like a RESTful API.好吧,如果您了解 Vue.js,我建议您先构建前端,然后使用 Flask 来提供数据,就像 RESTful API。 To do that, you could use Axios like to said (though I'd recommend the standard Fetch API) to make HTTP requests to you Flask server, and have your Flask server respond with JSON formatted data.要做到这一点,您可以使用 Axios 像说的那样(尽管我建议使用标准的 Fetch API)向您的 Flask 服务器发出 HTTP 请求,并让您的 Flask 服务器使用 JSON 格式的数据进行响应。 Is there any specifics you'd like to know about?您有什么具体想知道的吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM