会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
O2isadrug
博客园
管理
2021年11月8日
Vue 2.x 中 路由当前页跳转到当前页 栈溢出
摘要: const originalReplace = Router.prototype.replace; Router.prototype.replace = function replace(location) { return originalReplace.call(this, location).
阅读全文
posted @ 2021-11-08 14:09 秋雁丁
阅读(333)
评论(0)
推荐(0)
2020年5月10日
vue 中点击页面任意位置 执行方法
摘要: 在 main.js 中 // 点击页面中的任意位置 方法 Vue.prototype.globalClick = function(callback) { document.onclick = function() { callback(); }; }; 其中 callback() 方法为组件中的方
阅读全文
posted @ 2020-05-10 21:41 秋雁丁
阅读(2795)
评论(0)
推荐(0)
2020年5月7日
vue-cli 2.x 打包后页面空白,Element-UI 图标不显示
摘要: 打包完后出现空白页 修改:config 文件下的 index.js,大概在46行左右 原:assetsPublicPath:'' 改:assetsPublicPath:'./' Element-UI 图标不显示 修改:build 文件夹下的 utils.js,大概在51行左右 原: if (opti
阅读全文
posted @ 2020-05-07 18:09 秋雁丁
阅读(868)
评论(0)
推荐(0)
2020年5月6日
Vue 中 父子传值
摘要: 父组件 <template> <div> <Son :sendToSonAttribute = "fromFatherMsg"></Son> <div> </template> <script> export default{ data(){ return { fromFatherMsg:'我是来自
阅读全文
posted @ 2020-05-06 17:41 秋雁丁
阅读(133)
评论(0)
推荐(0)
在 Vue 中使用 axios
摘要: cnpm i axios 更多使用教程参考 https://www.kancloud.cn/yunye/axios/234845 //main.js 文件中 import axios from 'axios' Vue.prototype.$axios = axios; //Vue 组件中使用案例 t
阅读全文
posted @ 2020-05-06 16:30 秋雁丁
阅读(155)
评论(0)
推荐(0)
在 Vue 中使用 ElementUI
摘要: import Element from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' Vue.use(ElementUI) //该方法是全局引入 element-ui npm 最好提前替换成 淘宝源 cnpm cnpm i el
阅读全文
posted @ 2020-05-06 16:25 秋雁丁
阅读(167)
评论(0)
推荐(0)
Vue 中修改 router-link 样式
摘要: .router-link-exact-active{ /* 路由点击后的样式 */ /* 添加需要的样式 */ } router-link 本质是 a 标签,也可以更改 a 标签的样式。
阅读全文
posted @ 2020-05-06 14:17 秋雁丁
阅读(4115)
评论(0)
推荐(0)
2020年4月24日
页面 返回顶部 按钮
摘要: 需提前引入 JQuery.js 。 // 判断 返回顶部 按钮的出现与消失 $(window).on('scroll', function() { if ($(window).scrollTop() > 500) { $('#backTop').fadeIn('slow'); } else { $(
阅读全文
posted @ 2020-04-24 15:12 秋雁丁
阅读(117)
评论(0)
推荐(0)