vue学习之路
meifeng88
信管小卒一名
展开
-
ant design form-model resetFields() 重置表单无效
ant design form-model resetFields() 重置表单无效特别注意一: 如果是下拉框需要重置重新显示placeholder,初始值需要设置undefined特别注意二:使用resetFields时务必,加上prop和rules,即使需求不需要校验此时方能生效...原创 2022-07-13 09:52:28 · 1224 阅读 · 1 评论 -
nvm安装npm失效解决办法(全网唯一)
nvm安装npm原创 2022-06-11 12:47:19 · 622 阅读 · 0 评论 -
vscode开发前端必备插件
vscode开发前端必备插件原创 2021-12-06 10:17:09 · 145 阅读 · 0 评论 -
Promise setTimeout NextTick执行顺序
const first = () => (new Promise((resolve, reject) => { console.log(3); let p = new Promise((resolve, reject) => { console.log(7); setTimeout(() => { console.log(5); resolve(6); }, 0) .原创 2021-12-03 16:44:16 · 762 阅读 · 0 评论 -
text-indent妙用
一般会采用把该段文字分成两个span进行布局展示,会比较废手;那么可不可以换个方式呢,我们都知道text-indent是让首行缩进,那么我们奇思妙想反过来搞岂不是和我们这个需求刚好匹配呢;实现css:{text-indent: -2em; padding-left: 2em;}就能实现如上的需求了,yyds...原创 2021-08-14 10:02:54 · 115 阅读 · 0 评论 -
使用JS刷题如何处理输出
出现多组不确定的数据时,使用下面process.stdin.on('end', function () { arr.forEach(function(el, index) { if (el === 1) { console.log(index); } });})监听end原创 2021-01-14 23:39:02 · 215 阅读 · 0 评论 -
Cannot pull, git cannot resolve reference ORIG_HEAD
Cannot pull, git cannot resolve reference ORIG_HEAD拉取代码的时候 Cannot lock the ref ‘ORIG_HEAD’.这样解决:I solved it by removing the file .git/ORIG_HEAD then doing the pull again. The .git/ORIG_HEAD file was 0 bytes instead of the git reference it was supposed t原创 2020-12-23 15:25:10 · 785 阅读 · 0 评论 -
beforeRouteEnter和beforeRouteUpdate的坑
beforeRouteEnter是新进入的一个路由,比如进入/login登录界面,会触发beforeRouteEnter这个钩子;而beforeRouteUpdate是路由更新时触发,从主页进入登录界面不会触发这个钩子函数,一个父路由下的子路由跳转会触发这个钩子函数。...原创 2018-10-29 11:33:51 · 11825 阅读 · 0 评论 -
input聚焦边框问题
聚焦时边框使用 outline: none即可去边框;默认边框使用 border: none去边框原创 2018-10-23 15:44:35 · 6553 阅读 · 0 评论 -
VUE项目,从mongodb后台获取的对象数组,前端对其进行排序
methods: { //升序排序,js中方法 sortRole (pro) { return function (a,b) { var value1 = a[pro]; var value2 = b[pro]; return value1 - value2; }...原创 2018-09-29 16:35:27 · 664 阅读 · 0 评论 -
使用vue-cli初始化webpack模板的vue项目,npm run dev 启动时会打印很多日志,影响开发!!!
解决方法:初始化时package.json中的一个脚本是这样的(高亮):"scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "build": "node build/build.js" },此时启动项目,日志会从1%打印到10...原创 2018-09-19 18:00:29 · 4052 阅读 · 0 评论 -
使用webpack模板初始化项目时,proxyTable配置无效!!
使用vue init webpack your-project-name初始化vue项目时,项目结构在此就不多说。里面config文件夹下index.js文件中有个proxyTable配置,此配置是代理转发所用。当向服务器端口(与vue项目不同端口,即跨域请求)请求数据时,代码是某个vue页面中methods下axios.get('/users').then((res)=>{console....原创 2018-09-19 17:11:12 · 4919 阅读 · 2 评论