![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
华山令狐虫
代码如诗
展开
-
vue+springboot 前后端分离 上传文件处理后再下载,并且传递参数
【代码】vue+springboot 前后端分离 上传文件处理后再下载,并且传递参数。原创 2023-08-15 11:56:37 · 755 阅读 · 0 评论 -
关于vue props watch监听不生效的问题
发现子组件初始化的时候(页面初次加载),watch里的函数并没有执行,必须在created里面调用一次this.getDetail(this.id),才能初始化执行。里手动调用一次,就必须使用。原创 2023-06-13 18:01:34 · 2223 阅读 · 0 评论 -
vue使用 codemirror
/Tab可以弹出选择项。注意版本,不要使用新版。原创 2023-05-04 16:23:39 · 1303 阅读 · 1 评论 -
vue node-saas 安装报错
【代码】vue node-saas 安装报错。原创 2022-11-12 17:22:47 · 1296 阅读 · 0 评论 -
vue axios FormData 前端上传文件
<input type="file" ref="fileInput" /> <button @click="upload">上传</button> upload() { const files = this.$refs.fileInput.files var formData = new FormData(); let config = { headers: { "Content-Ty...原创 2021-09-18 11:33:27 · 239 阅读 · 0 评论 -
vue 自动注册某个文件夹下的所有组件
在组件同级目录下创建index.jsconst install = (Vue) => { const requireComponent = require.context(".", true, /\.vue/); requireComponent.keys().forEach(fileName => { const config = requireComponent(fileName); Vue.component(config.defau.原创 2021-09-18 13:28:03 · 2567 阅读 · 0 评论 -
自己编写vue tabs组件编写
mytabs.vue<template> <div> <ul> <li v-for="item in labels" @click="clickTab(item)">{{item}}</li> </ul> <slot></slot> </div></template><script>export default { da原创 2021-08-17 22:16:36 · 313 阅读 · 0 评论 -
vue + springboot 文件上传
vue + springboot 文件上传 @RequestMapping(value = "/import", produces = "application/json;charset=UTF-8") public void uploadFile(@RequestParam("file") MultipartFile file) throws IOException { //读取文件内容 String s = IOUtils.toString(file.getInput原创 2021-08-14 21:46:53 · 194 阅读 · 0 评论 -
前后端分离jwt登录验证
前后端分离jwt登录验证 (vue + springboot)方案第一次登录后,前端j将后端返回的token保存在localStorage中以后每次前端访问后端接口时,都从localStorage中取出token加入请求header的Authorization字段后端建立拦截器,拦截每个请求的header中的Authorization字段值,即token,校验token是否过期,如果过期返回响应码401,否则放行前端建立全局响应拦截器,如果拦截到接口请求响应码是401,就跳转到登录页面log原创 2021-08-07 17:30:58 · 642 阅读 · 1 评论 -
vue 自己实现select
vue 自己实现select<template> <div class="form"> <span class="label">{{ label }}</span> <input contenteditable="true" class="input" :value="getLabel()" @input="handleInput" readonly="readonly"原创 2021-07-03 18:48:36 · 706 阅读 · 0 评论 -
vue 实现自己的input
<template> <div class="form"> <span class="label">{{ label }}</span> <input contenteditable="true" class="input" :value="value" @input="handleInput" /> </div></template>&l.原创 2021-07-03 18:06:11 · 2403 阅读 · 0 评论 -
vue codemirror 设置高度无效的解决办法
最近使用vue-codemirror发现设置高度怎么都不生效,网上的办法都用了也不行,最后终于摸索出解决办法首先是坑不能使用scss, 只有使用css才有效要给.CodeMirror-scroll设置高度,给.CodeMirror设置高度无效<template> <div class="root"> <div class="my"> <codemirror ref="myCm" v-m原创 2021-07-03 18:07:52 · 1382 阅读 · 3 评论 -
IIS部署vue(history路由模式)项目
IIS部署vue(history路由模式)项目安装url rewite插件离线下载url rewiter插件https://www.iis.net/downloads/microsoft/url-rewrite页面最底部安装url rewrite插件安装后要重启IIS才能在IIS界面显示这个配置url 重写规则双击url rewite进入,点击添加规则选择空白规则创建填写规则...原创 2021-06-09 15:33:08 · 584 阅读 · 0 评论 -
vue springboot 文件下载
后端 @RequestMapping("/apiDocs") public void apiDocs(String ids, HttpServletResponse response) { List<Integer> collect = Arrays.stream(ids.split(",")).map(t -> Integer.valueOf(t)).collect(Collectors.toList()); String docs = api原创 2021-04-28 14:09:26 · 156 阅读 · 0 评论 -
uni-app (vue ) 数据变化,页面不重新渲染的问题
前几天遇到一个问题当我点击取消收藏按钮的时候,再重新刷新页面,会发现第2个项目里的爱心按钮还是空心的按理说,收藏页面的所有线路,按钮都是已经收藏的状态,应该是实心爱心图标,可是只要我之前点过取消,让按钮变成空心状态,它就会一直是空心状态。很明显,子组件的数据变化了,但是反应在页面上,没有重新渲染。最后找到原因<template> <view> <busLine v-for="(item,index) in lines" :line="ite.原创 2020-08-03 17:14:06 · 4037 阅读 · 0 评论 -
vue iview upload组件上传跨域在前端代理解决
vue 的 iview upload组件上传存在跨域问题<template> <Upload action="//jsonplaceholder.typicode.com/posts/"> <Button icon="ios-cloud-upload-outline">Upload files</Button> ...原创 2019-04-22 21:36:34 · 3914 阅读 · 0 评论 -
vue 部署 nginx 报错 403 forbidden
vue打包后的dist 放在 /usr/local目录下访问没有问题 server { listen 8080; # 监听端口 server_name localhost; # _代表匹配所有 root /usr/local/dist; # 站点根目录 index index.html;}dist 放在 /r...原创 2019-03-20 17:12:00 · 11134 阅读 · 3 评论