11 2022 档案
页签切换不刷新页面
摘要:问题 在使用elementUI时,顶部的标签页切换都会对页面进行刷新,这样页面内部的页码、页面大小等一系列状态就会被重新加载,无法保留原来的状态 一般都会邮箱想到使用Vuex来保存状态,但是保留像页码、页面大小这样不太重要的状态,外加上每个页面都加,使用Vuex写起来就会显得非常的繁琐 所以,在不太
DJango + Vue 文件下载
摘要:后端 import requests from django.http import FileResponse from django.utils.encoding import escape_uri_path def download_file(request): if request.metho
弹出框中表格的勾选
摘要:使用this.$nextTick(),不然对话框中的表格获取不到选中的信息,因为它要等表格数据加载出来,再去做勾选判断,再渲染 dialogOpen() { this.$nextTick(() => { this.list.forEach((item,index) => { // list是对话框中
常用设置时间格式
摘要:fromatTime(val){ const data = new Date(val) const Year = date.getFullYear() let Month = date.getMonth() + 1 Month = Month < 10? '0' + Month : Month le
DJango + Vue 跨域问题解决
摘要:什么是跨域 同源: 协议 + 域名 + 端口号,三者完全相同 以上三个元素只要有一个不相同就是跨域 产生跨域异常的报错信息如下: access to xmlhttprequest at 'http://ip:port1/api/xxx' from origin 'http://ip:port2' h
关于代理的设置
摘要:环境变量设置代理 全局设置代理就使用环境变量配置(这里只针对Linux或者Mac) vim /etc/profile http_proxy=IP:PORT https_proxy=IP:PORT export http_proxy export https_proxy source /etc/pro