Element plus admin安装依赖
摘要:一,首选确保已经安装了node,我安装的是当前最新版:18.16 二,安装pnpm,在命令行中执行: npm install -g pnpm pnpm官网:https://www.pnpm.cn 三,打开Element plus admin工程,在里面双击i 随后就开始安装各种依赖了! Elemen
阅读全文
posted @
2023-05-18 22:38
sunylat
阅读(263)
推荐(0)
打开Vue文件报错解决方法
摘要:错误截图: 解决办法: npm i eslint-plugin-import 参考: https://juejin.cn/post/7033416976064053278
阅读全文
posted @
2023-04-27 15:48
sunylat
阅读(47)
推荐(0)
Vue - eslint默认验证,函数名称和括号相连报错
摘要:如果函数名和括号相连,eslint验证会报错,这个可以通过eslint的设置解决: 一,打开eslintrc.js,在rules配置中加入: 'space-before-function-paren':0 完整配置: rules: { // allow async-await 'generator-
阅读全文
posted @
2023-02-22 09:47
sunylat
阅读(110)
推荐(0)
Element UI - 如何让Dialog处于模式窗体状态?
摘要:模式窗体,在窗体打开时候,始终处于桌面最上面,只有这个窗体操作完毕,才可以关闭! 实现方法: 解决方式一 : 将Dialog下的close-on-click-modal属性改为‘false’。注意: 在使用close-on-click-modal属性时,必须在该属性前加“:”。 解决方式二: 可以通
阅读全文
posted @
2021-06-04 17:23
sunylat
阅读(300)
推荐(0)
VUE常用插件和依赖的安装!
摘要:1,Axios http://www.axios-js.com/ npm install axios yarn add axios 2,NProgress https://madewith.cn/23 npm install --save nprogress yarn add nprogress
阅读全文
posted @
2021-06-03 13:34
sunylat
阅读(180)
推荐(0)
Element dialog实现拖拽功能
摘要:1,建立directives.js文件。 import Vue from 'vue'; // v-dialogDrag: 弹窗拖拽属性 Vue.directive('drag', { bind(el, binding, vnode, oldVnode) { const dialogHeaderEl
阅读全文
posted @
2021-05-30 08:10
sunylat
阅读(738)
推荐(0)
Vue - yarn安装和换国内源
摘要:一,安装: npm install -g yarn 二,切换国内源 1、查看一下当前源: yarn config get registry 2、切换为淘宝源: yarn config set registry https://registry.npm.taobao.org 3、切换为自带的: yar
阅读全文
posted @
2021-04-22 20:12
sunylat
阅读(1810)
推荐(0)
Vue - 一个配置文件引发的问题
摘要:我在虚拟机中访问主机中的Vue网站,发现不能正常访问,打开浏览器调试模式,看到以下错误: Uncaught SyntaxError: Block-scoped declarations (let, const, functionUncaught SyntaxError: Block-scoped d
阅读全文
posted @
2021-04-22 19:57
sunylat
阅读(337)
推荐(0)
Vue - webpack版本引发的错误!
摘要:错误截图: 引起错误原因:webpack版本,项目使用4版本。 解决办法: 1,删除先前版本webpack。 npm uninstall webpack 2,安装4版本的webpack。 npm install webpack@^4.0.0 --save-dev 参考: https://blog.c
阅读全文
posted @
2021-04-20 13:12
sunylat
阅读(183)
推荐(0)
Vue - 跨域问题解决方法。
摘要:VUE访问接口的时候,很可能出现跨域请求,从而被提供接口的服务器拒绝,这个问题可以直接在VUE里面解决,解决方法:在vue.config.js里面加入配置信息。 在module.exports中加入: devServer: { proxy:'http://localhost:8089' }, 这里的
阅读全文
posted @
2021-04-18 11:52
sunylat
阅读(364)
推荐(0)
Vue - webpack的BUG
摘要:当编译VUE工程时候,出现了错误: 解决方法:修改出错代码。 getEntryJs(outputName, assetSource, cssCode) { var config = {url: outputName, colors: this.options.matchColors} var con
阅读全文
posted @
2021-04-18 11:48
sunylat
阅读(176)
推荐(0)
Node - 换淘宝源
摘要:一、临时使用 npm --registry https://registry.npm.taobao.org install express 二、永久使用 npm config set registry https://registry.npm.taobao.org 三、验证是否更换成功 npm co
阅读全文
posted @
2021-04-12 21:24
sunylat
阅读(417)
推荐(0)
Vue - WebStorm自带格式化和ESLint冲突的解决方法!
摘要:默认情况下,WebStorm自带格式化(Ctrl+Alt+L)和ESLint冲突,尽管在代码上鼠标右键,选择“Fix ESLint problems”菜单项,也可以解决这种冲突,但是每次都这样实在太麻烦了!我们可以在工程文件的“.eslintrc.js”文件上鼠标右键,随后选择“Apply ESLi
阅读全文
posted @
2021-04-11 22:19
sunylat
阅读(2575)
推荐(1)