返回顶部

随笔分类 -  vue

摘要:参考:https://www.runoob.com/w3cnote/js-refresh-current-page.html 我的情况: vue页面(A)下打开一个html页面(B),在html页面上操作完成后,关闭html页面并刷新vue页面 A页面: function toPageB(url){ 阅读全文
posted @ 2020-08-13 10:23 前端-xyq 阅读(1351) 评论(0) 推荐(0)
摘要:页面: <a-pagination :current="current" :total="total" :pageSize="pageSize" @change="pageChange"></a-pagination> //current即为当前页,需重置时给此值赋值即可 阅读全文
posted @ 2020-08-11 09:35 前端-xyq 阅读(3894) 评论(1) 推荐(0)
摘要:搬运自:https://www.cnblogs.com/dafei4/p/13020211.html 解决办法: [ :rowKey ] 带冒号的表示绑定的是表达式不带的表示绑定的就是值 方法一: <a-table :columns="columns" :data-source="tableData 阅读全文
posted @ 2020-07-29 17:58 前端-xyq 阅读(9623) 评论(3) 推荐(4)
摘要:我的需求: select下拉联动,选择模板配置后,字段配置重新获取,此时要清空之前已选的字段 代码: <template> <div> <a-form class="dataForm" :form="form" :label-col="{ span: 5 }" :wrapper-col="{ spa 阅读全文
posted @ 2020-07-14 17:50 前端-xyq 阅读(10544) 评论(2) 推荐(2)
摘要:1. 新建methods.js export function alertMessage(txt) { alert(txt) } 2. 组件中引入并使用 <template> <div> <button @click="alertMessage(111)">弹窗</button> </div> </ 阅读全文
posted @ 2020-07-07 10:13 前端-xyq 阅读(427) 评论(0) 推荐(1)
摘要:方法一: vue: <template> <a-table :locale="{emptyText: '暂无数据'}" :columns="columns" :dataSource="dataTable" :pagination="false"> <template slot="name" slot 阅读全文
posted @ 2020-07-03 11:04 前端-xyq 阅读(8091) 评论(1) 推荐(0)
摘要:搬运自:https://www.jianshu.com/p/b358a91bdf2d 前言 vue.config.js 是一个可选的配置文件,如果项目的 (和 package.json 同级的) 根目录中存在这个文件,那么它会被 @vue/cli-service 自动加载。 也可以使用 packag 阅读全文
posted @ 2020-06-29 10:07 前端-xyq 阅读(3190) 评论(0) 推荐(0)
摘要:参考: https://blog.csdn.net/Liu_yunzhao/article/details/90520028 https://www.cnblogs.com/xiangsj/p/8905648.html 概念 同源策略 同源策略是一种约定,它是浏览器最核心也最基本的安全功能,如果缺少 阅读全文
posted @ 2020-06-28 17:00 前端-xyq 阅读(6526) 评论(0) 推荐(0)
摘要:参考:https://www.antdv.com/docs/vue/customize-theme-cn/ 项目根目录下新建文件vue.config.js // vue.config.js for less-loader@6.0.0 module.exports = { css: { loaderO 阅读全文
posted @ 2020-06-28 16:43 前端-xyq 阅读(2220) 评论(0) 推荐(1)
摘要:搬运自:https://blog.csdn.net/qq_39043923/article/details/106918747?%3E?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1 vue项目中,经常需要使用如elementUI 阅读全文
posted @ 2020-06-23 17:37 前端-xyq 阅读(9048) 评论(0) 推荐(2)
摘要:1. 配置baseUrl 在package.json同级目录下新建一个faceConfig.js文件 faceConfig.js: // 前端所有配置放这里 const faceConfig = () => { return { // 正式环节 'devServer': window.locatio 阅读全文
posted @ 2020-06-15 15:40 前端-xyq 阅读(8888) 评论(0) 推荐(0)
摘要:参考:https://blog.csdn.net/hong_taizi/article/details/80387980?utm_source=blogxgwz6 问题:axios返回200状态码(即请求成功)却走进了catch里面 原因: 1. 当axios请求完成后走的时then的代码块,如果t 阅读全文
posted @ 2020-06-12 14:14 前端-xyq 阅读(6227) 评论(0) 推荐(0)
摘要:搬运自:https://segmentfault.com/a/1190000021913990?utm_source=tag-newest 1. 下载print.js https://github.com/zxc19890923/print/blob/master/print.js 在src目录下面 阅读全文
posted @ 2020-06-12 10:30 前端-xyq 阅读(8074) 评论(0) 推荐(0)
摘要:解决方法:使用upload.clearFiles()方法清空文件列表 页面: <el-upload ref="upload_file" action="" :multiple="false" :limit="1" :show-file-list="false" :on-change="importE 阅读全文
posted @ 2020-06-12 10:21 前端-xyq 阅读(2055) 评论(0) 推荐(0)
摘要:参考:https://www.jianshu.com/p/c9324d237a8e 关于window.location的详解: window.location 对象不仅可以获得当前页面的地址 (URL),还能够将浏览器重定向到新的页面。 下面,以http://www.myurl.com:8866/t 阅读全文
posted @ 2020-06-12 10:15 前端-xyq 阅读(23265) 评论(0) 推荐(0)
摘要:页面: <a-table :scroll={x:200} :locale="{emptyText: '暂无数据'}" :columns="columns" :dataSource="dataTable" :pagination="false"> ···</a-table> css: /deep/ . 阅读全文
posted @ 2020-06-12 09:45 前端-xyq 阅读(10018) 评论(0) 推荐(1)
摘要:参考:https://blog.csdn.net/weixin_43905402/article/details/106074435 我的问题:vue项目中使用ant-design-vue,表单中输入框输入很卡顿 原因:vue在进行输入时,进行了多次的render刷新渲染操作,导致了input框输入 阅读全文
posted @ 2020-06-12 09:40 前端-xyq 阅读(7472) 评论(2) 推荐(0)
摘要:我的需求:多个页面顶部共用一个组件topBar,topBar内有"首页"按钮,点击可返回到首页,想做成当前页为首页时,不显示这个按钮,其他则显示。 原topBar: 其他组件: 发现报错 : The data property "isHome" is already declared as a pr 阅读全文
posted @ 2020-06-11 16:28 前端-xyq 阅读(4231) 评论(0) 推荐(0)
摘要:参考:https://blog.csdn.net/qq_43779703/article/details/100693565 https://blog.csdn.net/xuaner8786/article/details/81217075 https://blog.csdn.net/qq_3132 阅读全文
posted @ 2020-06-11 16:21 前端-xyq 阅读(8814) 评论(0) 推荐(1)
摘要:我的情况:登录接口是单独做的,其他接口则是用的封装的axios。 登录后将后台返回的token存入localStorage,之后的接口均需传入token,token失效或者没有的时候会提示未授权,返回到登录页。 在封装的js中,我将localStorage中的token单独设置为一个变量,方便之后利 阅读全文
posted @ 2020-06-11 16:09 前端-xyq 阅读(984) 评论(0) 推荐(0)