<template>
<div class="nav">
<input v-model="name" type="text" /> <button @click="Delete()">查询</button>
</div>
</template> <script>
import axios from "axios"; export default {
name: "DleteView",
data() {
return {
name: [],
};
},
methods: {
Delete() {
axios({
// 请求方式
method: "GET",
// 请求地址
url: `http://localhost:8086/delete`,
// URL中的查询参数 params: {
id: this.name,
},
}).then(function (result) {
this.name = result.data;
});
},
},
};
</script> <style>
.nav {
border-top: 3px solid #ff8500;
background-color: #fcfcfc;
border-bottom: 1px solid #edeeed;
line-height: 41px;
}
.nav a {
display: inline-block;
height: 41px;
padding: 0px 10px;
font-size: 15px;
color: #4c4c4c;
font-family: "微软雅黑";
text-decoration: none;
}
.nav a:hover {
background: #edeeed;
color: #ff8500;
}
</style>
<template>
<div class="nav">
<input v-model="count" type="text" />
<div v-for="item in name" :key="item.id">
<div class="navs">
<label for="#">账号:</label>&nbsp;&nbsp;&nbsp;&nbsp;
<span>{{ item.id }}</span
>&nbsp;&nbsp; <label for="#">部门:</label> &nbsp;&nbsp;&nbsp;
<span>{{ item.locationString }}</span
>&nbsp;&nbsp; <label for="#">名字:</label>&nbsp;&nbsp;&nbsp;
<span>{{ item.name }}</span>
</div>
</div>
<button @click="Delete()">查询</button>
</div>
</template> <script>
import axios from "axios"; export default {
name: "DleteView",
data() {
return {
count: [],
name: [],
};
}, methods: {
Delete() {
axios({
// 请求方式
method: "GET",
// 请求地址
url: `http://localhost:8086/delete`,
// URL中的查询参数
params: {
id: this.count,
},
}).then((result) => {
console.log(result.data);
this.name = result.data;
});
},
},
};
</script>

最新文章

  1. bootstrap1
  2. 移动端css知识总结--字体,毛玻璃效果,input和disabled
  3. 数据分析:.Net程序员该如何选择?
  4. 变量改变时PHP内核做了些什么?
  5. Python Select 解析
  6. Python基本时间转换
  7. sort+awk+uniq三者结合使用
  8. ansible
  9. C# winform 若要在加载设计器前避免可能发生的数据丢失,必须纠正以下错误
  10. LVS DR模型
  11. c语言输入与输出库函数#include&lt;stdio.h&gt;
  12. careercup-栈与队列 3.1
  13. Recommending music on Spotify with deep learning 采用深度学习算法为Spotify做基于内容的音乐推荐
  14. IOS深入学习(4)之Coordinate System
  15. 生成shadow中hash字串
  16. 笔记本WiFi共享
  17. TensorFlow安装-windows系统
  18. 第六次meeting会议
  19. BZOJ.5338.[TJOI2018]xor(可持久化Trie)
  20. vue2.0中使用sass

热门文章

  1. React报错之React Hook useEffect has a missing dependency
  2. xray+awvs的联动
  3. Taurus.MVC 微服务框架 入门开发教程:项目部署:5、微服务应用程序发布到Docker部署(下)。
  4. ARC120F Wine Thief (组合数学)
  5. 1.2_Selenium的三生三世
  6. HC32L110(五) Ubuntu20.04 VSCode的Debug环境配置
  7. flannel跨主网络通信方案(UDP、VXLAN、HOST-GW)详解
  8. 通过 Docker 部署 Mysql 8.0 主从模式
  9. Minio设置永久下载链接
  10. docker 生成mysql镜像启动时自动执行sql