- 博客(8)
- 收藏
- 关注
原创 vue手机号中间四位加*号
vue手机号加*号 1.在methods里面写一个方法: mobileStr(str) { if(str.length>7){ return str.substring(0,3)+'****'+str.substring(7,str.length); }else { return str.substring(0,str.length-1)+'****'; } }, 2.哪里需要就调用就行啦 this.mobileStr(); ...
2020-06-15 16:13:38
2387
原创 Vue页面跳转后当前位置不在顶部的解决办法
Vue页面跳转后当前位置不在顶部的解决办法 1.route 路由文件下index.js下 添加 routes:[], -> scrollBehavior (to, from, savedPosition) { return { x: 0, y: 0} } 解决啦
2020-06-15 16:11:06
833
原创 vue 富文本的使用方法
vue 富文本 (1)npm 安装 -》npm install vue-quill-editor -D (2)需要的位置 引入 组件 import {quillEditor} from "vue-quill-editor"; import 'quill/dist/quill.core.css'; import 'quill/dist/quill.snow.css'; import 'quill/dist/quill.bubble.css'; (3)使用 <div class="edit
2020-06-15 16:08:45
294
原创 自定义面板
自定义面板(输入框后面加 元) 我用的element-ui 做例子 <el-input v-model="state3" placeholder="请输入内容"> <span slot="suffix">元</span> </el-input> 效果图是这样:
2020-06-15 16:06:36
332
原创 页面吸顶效果
页面吸顶效果(vue) mounted() { window.addEventListener("scroll", this.hidemenu); //监听滚动事件 }, 2.mathods里面 handleScroll () { var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop var offsetTop = document.q
2020-06-15 16:01:55
313
原创 npm 报错This is probably not a problem with npm. There is likely additional logging output above.
npm 报错This is probably not a problem with npm. There is likely additional logging output above. 1.版本的问题 方法: 重新 npm install (输入npm install 或 cnpm install 后,再次启动) 然后 npm i -D webpack-dev-server@3.0.0 再 npm run dev 2.如果还是不行 在把之前装的都清空 rm -rf node_modules r
2020-06-10 14:17:11
2036
2
原创 Vscode全局替换
1.* VsCode整个项目进行替换命令 command + shift + h / ctrl + shift + h 2.问题:vscode同时对文件中相同的内容进行更改 解决方法: 1、选择编辑内容 2、按Ctrl+Shift+L选中对应的所有内容 然后可以全部编辑和替换了 ...
2020-06-10 14:10:04
17017
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅