How to use vue.js filter + ajax to implement event monitoring and background data interaction

php中世界最好的语言
Release: 2018-05-28 13:54:03
Original
2808 people have browsed it

This time I will bring you how to use vue.jsFilterajax to implement event monitoring background data interaction, and use vue.js filter ajax to implement event monitoring background data interactionNotesWhat are they? The following is a practical case. Let’s take a look.

When developing vue.js, data can be obtained using jquery and vue-resource. When obtaining data, you must give an initial value to the data.

index.html:

     vuejs 过滤器、ajax数据、嵌套循环、if判断、事件监听   
  

id 姓名 手机号 城市 性别 通过审核 我的学生 操作
{{item.id}} {{item.name}} {{item.tel}} {{item.sex | sexFormat}} {{item.province}}_{{item.city}} {{stu.name}},

Copy after login

json.php:

$i, 'name'=>'test'.$i, 'tel'=>'1368585789'.$i, 'status'=>1, 'province'=>'上海市', 'city'=>'上海市', 'sex'=>1, 'stu'=>array(array('id'=>$i,'name'=>'stu'.$i,'tel'=>'1568585789')), ); } echo json_encode($data);exit;
Copy after login

Running results:

I believe I read this article You have mastered the case method. For more exciting information, please pay attention to other related articles on the PHP Chinese website!

Recommended reading:

How to implement Vue page skeleton screen

##How to implement communication between vue parent and child components

The above is the detailed content of How to use vue.js filter + ajax to implement event monitoring and background data interaction. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!