vue-axios更改操作
<template>
<div class="nav">
<label for="">新部门</label><input v-model="location" type="text" />
<label for="">旧部门</label><input v-model="OldLocation" type="text" />
<input @click="Updata()" value="更改" type="button" />
<h4 v-if="font === 4">更改成功,但是不晓得你数据库有没有前置部门条件;</h4>
</div>
</template>
<script>
import axios from "axios";
export default {
name: "UpdateView",
data() {
return {
location: [],
OldLocation: [],
font: [],
};
}, methods: {
Updata() {
axios({
// 请求方式
method: "GET",
// 请求地址
url: `http://localhost:8086/Update`,
// URL中的查询参数
params: {
location: this.location,
OldLocation: this.OldLocation,
},
}).then((res) => {
console.log(res);
this.font = 4;
});
},
},
};
</script>
<style>
label {
font-size: 20px;
font-weight: 700;
margin-left: 10px;
margin-right: 10px;
} input {
margin-left: 10px;
margin-right: 10px;
} .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>
vue-axios更改操作的更多相关文章
- vue axios拦截器 + 自编写插件 实现全局 loading 效果;
项目需求:用自定义的 .gif 图标实现全局 loading 效果:为避免在每个页面手动添加,且简单高效的实现,经查阅资料,最终采用了 vue axios拦截器 + 自编写 loading 插件:下面 ...
- VUE AXIOS 跨域问题
背景: 后台跨域使用通配符:context.Response.Headers.Add("Access-Control-Allow-Origin", "*"); ...
- vue axios 总结篇
1.npm --save 和 --save-dev 有什么区别 发布到线上的叫生产环境~,在本地开发的时候叫开发环境,--save就是会打包到线上去并且在线上环境能用到的,比如你npm install ...
- 基于Vue + axios + WebApi + NPOI导出Excel文件
一.前言 项目中前端采用的Element UI 框架, 远程数据请求,使用的是axios,后端接口框架采用的asp.net webapi,数据导出成Excel采用NPOI组件.其业务场景,主要是列表页 ...
- vue axios 取消上次请求
axios.defaults.timeout = 1000 * 5axios.defaults.baseURL = baseUrlvar CancelToken = axios.CancelToken ...
- vue 中 直接操作 cookie 及 如何使用工具 js-cookie
转载:https://www.cnblogs.com/xiangsj/p/9030648.html vue 中直接操作 cookie 以下3种操作方式 set: function (name, val ...
- vue axios使用form-data的形式提交数据的问题
vue axios使用form-data的形式提交数据vue axios request payload form data由于axios默认发送数据时,数据格式是Request Payload,而并 ...
- axios常用操作
axios常用操作 一:函数化编程 1:编写可复用的方法 axios(config)的方法中,有必须的url参数和非必须的options参数.所以我们可以先写一个接受这两个参数的方法,在这个方法中我们 ...
- 035——VUE中表单控件处理之使用vue控制select操作文字栏目列表
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Vue之cookie操作(原生)
Vue之cookie操作(原生) 再vue组件中加入以下几个方法,然后调用即可. methods:{ //读取cookie,需要注意的是cookie是不能存中文的,如果需要存中文,解决方法是后端先进行 ...
随机推荐
- 自动化选课(Python + selenium
前几天听到朋友说自己选课事情,突发奇想想要搞这样一个东西,但是由于各种原因只做到以下的完成度,具体的情况也会在解释的最后留下.这个只适用于曲师大的教务系统,因为用的这个系统来进行的一个调试,对于其 ...
- 论文解读(PairNorm)《PairNorm: Tackling Oversmoothing in GNNs》
论文信息 论文标题:PairNorm: Tackling Oversmoothing in GNNs论文作者:Lingxiao Zhao, Leman Akoglu论文来源:2020,ICLR论文地址 ...
- 升级CentOS 7 内核版本
1.查看当前内核版本 $uname -r 3.10.0-957.el7.x86_64 $uname -a Linux prometheus 3.10.0-957.el7.x86_64 #1 SMP T ...
- java基础———打印三角形
代码 public static void main(String[] args) { for (int i = 1; i <= 5; i++) { for (int j = 5; j > ...
- C# using()的本质
" 程序世界没有秘密,所有答案都在源码里 " 01.点明观点 C#中,非托管资源使用之后必须释放,而using()是使用非托管资源的最佳方式,可以确保资源在代码块结束之后被正确释放 ...
- KingbaseESV8R6 垃圾回收原理以及如何预防膨胀
背景 KingbaseESV8R6支持snapshot too old 那么实际工作中,经常看到表又膨胀了,那么我们讨论一下导致对象膨胀的常见原因有哪些呢? 未开启autovacuum 对于未开启au ...
- 重复造轮子 SimpleMapper
接手的项目还在用 TinyMapper 的一个早期版本用来做自动映射工具,TinyMapper 虽然速度快,但在配置里不能转换类型,比如 deleted 在数据库中用 0.1 表示,转换成实体模型时没 ...
- 一文读懂,硬核 Apache DolphinScheduler3.0 源码解析
点亮 ️ Star · 照亮开源之路 https://github.com/apache/dolphinscheduler 本文目录 1 DolphinScheduler的设计与策略 1.1 分布 ...
- vue3中defineComponent 的作用
vue3中,新增了 defineComponent ,它并没有实现任何的逻辑,只是把接收的 Object 直接返回,它的存在是完全让传入的整个对象获得对应的类型,它的存在就是完全为了服务 TypeSc ...
- 百度ueditor工具栏配置大全
toolbars: [[ 'source', // 源代码 'anchor', // 锚点 'undo', // 撤销 'redo', // 重做 'bold', // 加粗 'indent', // ...