vue-axios删除操作
2024-09-02 20:22:30
<template>
<div class="nav">
<input v-model="location" type="text" />
<input @click="Deletes()" value="删除" type="button" />
<h4 v-if="font === 4">成功</h4>
</div>
</template> <script>
import axios from "axios";
export default {
name: "DeleteView",
data() {
return {
location: "",
font: [],
};
}, methods: {
Deletes() {
axios({
// 请求方式
method: "GET",
// 请求地址
url: `http://localhost:8086/Deletes`,
// URL中的查询参数
params: {
location: this.location,
},
}).then((sta) => {
console.log(sta);
this.font = 4;
});
},
},
};
</script> <style>
label {
font-size: 20px;
font-weight: 700;
} .navs {
margin-top: 10px;
}
.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>
最新文章
- 数据结构:栈 顺序表方法和单链表方法(python版)
- CentOS7下安装配置MariaDB
- Unity 状态转化机器
- About-JavaOOAD
- DOJO官方API翻译或解读-dojo/_base/lang --hitch()
- 新浪云sae 邮件服务 quicksend()
- K - The Unique MST - poj 1679
- CPrimer Plus第12章 存储类、链接和内存管理随笔
- html5基础的常用的技巧
- JVM学习笔记二:垃圾收集算法
- MyBatis(三):数据库查询结果不为空,但是使用MyBatis框架查询为空问题
- socket error:10053
- 什么是 SaaS (Software as a Service)
- jQuery之基础核心(demo)
- Random库 --Python3
- 2019.03.04 bzoj5308: [Zjoi2018]胖(二分答案+st表)
- js中如何通过身份证号计算出生日期和年龄
- js实现a_b变成A B的两种方法
- Go开发环境与LIteIDE安装、配置、搭建
- RJ45接口
热门文章
- 用Socket套接字发送和接收文件(中间用数组存取)
- Java接口自动化测试框架系列(一)自动化测试框架
- Javaweb___Ajax和Json
- Spring常用注解(SpirngBoot方面讲的更加详细)
- Helm安装ingress-nginx-4.0.19
- KingbaseES V8R6 集群环境wal日志清理
- Oracle 与 PostgreSQL 函数行为的差异引发性能差异
- KingbaseES 如何查看应用执行的SQL的执行计划
- KFS邮件自动告警-数据比对-数据修复配置方法
- [Python]-openpyxl模块Excel数据处理-读取公式的结果