![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
枫依流水
第一
展开
-
yarn无法在win10的powershell运行,yarn无法在powershell运行,npm无法在powershell运行
windows中运行yarn 和 npmPowerShell yarn : 无法加载文件 C:\Users\Admin\AppData\Roaming\npm\yarn.ps1,因为在此系统因为在此系统上禁止运行脚本。解决办法:以管理员身份运行 powershell ,然后在控制栏输入 set-ExecutionPolicy RemoteSignedPS C:\Windows\system32> set-ExecutionPolicy RemoteSigned执行策略更改执行策略可帮原创 2021-04-12 11:27:57 · 2907 阅读 · 0 评论 -
node-sass 安装失败的解决
1.初步诊断是node-sass安装有问题![image.png](https://img-blog.csdnimg.cn/img_convert/24059d8558dcf321d67685e0ce608394.png#align=left&display=inline&height=364&margin=[object Object]&name=image.png&originHeight=728&originWidth=1044&size=10原创 2021-03-15 19:47:46 · 342 阅读 · 0 评论 -
better-scroll 滚动插件better-scroll无法滚动
better-scroll 是一款重点解决移动端(已支持 PC)各种滚动场景需求的插件。它的核心是借鉴的 iscroll 的实现,它的 API 设计基本兼容 iscroll,在 iscroll 的基础上又扩展了一些 feature 以及做了一些性能优化。项目中遇到了BScroll是使用了 better-scroll 插件。遇到问题:内容无法滚动问题原因:排查语法写的没问题,问题出在获取dom right-header-table 。项目中存在多个重名right-header-table原创 2021-02-19 19:00:36 · 372 阅读 · 2 评论 -
[BScroll warn]: Can not resolve the wrapper DOM. 的解决
维护项目时,遇到错误如下:[BScroll warn]: Can not resolve the wrapper DOM. Vue better-scroll[Vue warn]: Error in mounted hook: “TypeError: Cannot read property ‘children’ of undefined”问题分析:BScroll 未获得到 DOM解决办法:1.找到使用BScroll 的地方,项目中使用的如下:import BScroll from 'bsc原创 2021-02-18 15:54:41 · 4431 阅读 · 1 评论 -
关于vue中Cannot read property ‘key‘ of undefined 的解决
报错图:原因及解决办法:就是因为":starNum=" 的值应该是number型,为空时我传递一个String型的 ‘0’,应该为number型的 0导致循环中starNum 被使用,类似 v-for="(item,index) in starNum" :key= “index”key就报错了.key的报错,一般就是用到key了,或者就是v-for里的 :key 的问题原代码:<SubHeader headerText="技术" :starNum=原创 2021-01-13 13:46:39 · 9845 阅读 · 2 评论 -
Visual Studio Code 插件失效,VScode 插件失效,vscode插件失效的解决方法
1.猜测是gpu的问题,终端输入code --disable-gpu就可以了。2.把插件重新卸载,再安装,关闭VScode,重新打开VScode原创 2021-01-07 16:12:11 · 3823 阅读 · 3 评论 -
Vant 的collapse折叠面板的使用,解决循环,迭代,点击全部展开,点击单个展开
Vant 的collapse折叠面板的使用,解决循环,迭代,点击全部展开,点击单个展开1.点击某个折叠,其他折叠也展开,v-for写在van-collapse 里 name不起作用。<van-collapse v-model="activeName" v-for="item in textList" :key="item.index" > <van-collapse-item name="">2.点击某个折叠,只展示单个折叠其他不受影响,v-for写在van-colla原创 2020-09-02 20:31:23 · 19556 阅读 · 2 评论 -
vue开发中v-for在Eslint的规则检查下出现:Expected ‘v-bind:key‘ directives to use the viriables错误
vue开发中v-for在Eslint的规则检查下出现:Expected ‘v-bind:key’ directives to use the viriables错误原代码写错:v-for="item in textList" :key="index"正确写法:v-for="item in textList" :key="item.index"后面key值写上 item.index(附链接:)https://cn.vuejs.org/v2/guide/list.html#用-v-for-把一原创 2020-09-02 18:50:38 · 1584 阅读 · 1 评论 -
解决:This dependency was not found:
报错:-!../…/…/node_modules/css-loader/dist/cjs.js??ref–6-oneOf-1-1!../…/…/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../…/…/node_modules/postcss-loader/src/index.js??ref–6-oneOf-1-2!./style.css in ./node_modules/css-loader/dist/cjs.js??ref–6-on原创 2020-09-01 17:35:45 · 37943 阅读 · 2 评论 -
报错完美解决 Property or method “XXX“ is not defined on the instance but referenced during render. Ma...
报错完美解决 Property or method “XXX” is not defined on the instance but referenced during render. Ma…报错原因:是在template里面或者在方法里使用了,但是在data里没有定义。如果是template里面,注意如果是v-bind:value的形式,需要在data里面定义对应的value值。...原创 2020-08-28 19:40:13 · 7606 阅读 · 0 评论 -
/deep/深度选择器,修改Vant 内部的样式
遇到的问题:做vue项目中,遇到对Vant的样式修改,但是修改无法修改。解决方法:使用 /deep/ 深度选择器/deep/的意思大概为深入的,深远的。无意中看到css中有关于这种写法,开始没太注意 ,以为是组件css的写法,后来才发现不是。我们都知道Scoped CSS规范是Web组件产生不污染其他组件,也不被其他组件污染的CSS规范。这样在打包的时候会生成一个独一无二hash值,这样父组件的样式就不会影响到子组件了,然后你要想修改子组件的样式,一般是提取一个公共文件,在公共文件里面修改样式,但是原创 2020-08-28 18:44:53 · 3041 阅读 · 0 评论