- 博客(48)
- 问答 (3)
- 收藏
- 关注
原创 vue报错‘vue-cli-service‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
'vue-cli-service' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
2023-08-11 18:51:34
633
原创 什么是重绘和重排(回流)?怎么避免重绘和重排?
重排一般是由于元素的大小和布局的改变,或者节点的增添、删除引起的。重排一定会引起重绘,重绘不一定会引起重排。:重绘一般是由于元素样式的改变引起的。
2023-07-17 10:58:53
399
1
原创 前端面试题:script的defer与async的区别
如果脚本无需等待页面解析,且无依赖独立运行,那么就是用async;如果页面需要等待页面解析,且依赖于其他脚本,那么就使用defer。异步下载并且立即执行,然后文档继续解析。异步加载后解析文档,然后再执行脚本;
2023-06-29 15:40:08
130
原创 前端面试题:vue内置指令和自定义指令
Vue指令是带有v-前缀的特殊属性,他们作用于HTML元素,将指令绑定在元素上时,指令会为绑定的目标元素添加一些特殊的行为。自定义指令的定义方法:有局部定义和全局定义。
2023-06-20 22:02:23
304
原创 前端面试题:同步和异步的理解
我的理解:同步就是自上而下依次执行任务,如果当前任务需要一段时间才能返回结果,那我就继续等待,直到当前任务的结果返回,然后对其进行处理,再执行接下来的任务;异步就是自上而下执行任务的同时,遇到了需要一段时间才能执行的任务,那就在等待这个任务的时候继续向下执行,直到等待的任务返回结果以后,才去执行它。**异步:**指的是进程一直执行,如果当前请求需要一段事件才能返回结果,则不需要管它,继续执行下面的操作,等有消息返回的时候再去处理它,这样提高了执行的效率。
2023-06-20 21:18:06
230
原创 报错:TypeError: Assignment to constant variable
TypeError: Assignment to constant variable
2023-05-11 16:22:46
1777
原创 使用v-for遍历报错Cannot use v-for on stateful component root element because it renders multiple elements.
Cannot use v-for on stateful component root element because it renders multiple elements.
2023-05-05 15:45:09
463
原创 [Vue warn]: Error in render: “RangeError: Invalid array length“
Error in render: "RangeError: Invalid array length"
2023-04-21 10:19:04
1290
原创 eslint:vue报错 error Component name ““ should always be multi-word
eslint:vue报错 error Component name "" should always be multi-word
2023-03-10 19:51:21
2663
3
原创 Refused to apply style from ‘http://localhost:8080/css/iconfont.css‘ because its MIME type (‘text/ht
efused to apply style from 'http://localhost:8080/css/iconfont.css' because its MIME type ('text/ht
2023-02-18 17:37:32
1837
1
原创 vue项目报错:Component name “xxx“ should always be multi-word
vue项目报错:Component name "xxx" should always be multi-word
2023-02-18 16:20:25
389
原创 vue-router报错Uncaught ReferenceError: xxx is not defined
报错 Uncaught ReferenceError: Messagedetail is not defined中是否引入。
2023-02-17 19:19:55
1142
原创 vue-router的重定向
当页面不显示,提示[vue-router] invalid redirect option: {“staticRenderFns”:[null],“_compiled”:true,“beforeCreate”:[null],“beforeDestroy”:[null],“__file”:“src/pages/Message.vue”}时,检查一下自己重定向的位置是否正确。
2023-02-17 18:50:53
553
原创 [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not avaiable
[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.(found in )
2022-12-13 09:47:14
4154
原创 react+antd报错:Module not found: Error: Can‘t resolve ‘antd/es/input/style/css‘ in XXX
Module not found: Error: Can't resolve 'antd/es/input/style/css' in xxx
2022-10-29 11:10:34
6585
原创 react报出警告Failed to parse source map: ‘webpack://antd/./components/config-provider/style/index.less‘
Failed to parse source map: 'webpack://antd/./components/config-provider/style/index.less'antd.min.css就可以了。
2022-10-28 19:56:30
1197
3
原创 Reacte路由报错:A <Route> is only ever to be used as the child of <Routes> element, never rendered direct
由于react-router-dom更新到6版本以后,有一些写法开始与5不同
2022-10-12 15:56:42
1512
3
原创 react警告之react-dom.development.js:86 Warning: ReactDOM.render is no longer supported in React 18.
react-dom.development.js:86 Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more:
2022-10-08 11:07:22
4099
1
原创 react报错index.jsx:8 Uncaught TypeError: Cannot read properties of undefined (reading ‘map‘)
在react时使用map遍历数组报错index.jsx:8 Uncaught TypeError: Cannot read properties of undefined (reading 'map')
2022-10-06 10:52:17
1438
原创 报错:Uncaught Invariant Violation:Target container is not a DOM element
Uncaught Invariant Violation:Target container is not a DOM element
2022-09-26 20:05:17
748
原创 webpack报错之TypeError:Cannot read property ‘tap‘ of undefined at HtmlWebpackPlugin.apply
配置webpack生成html文件时,报错TypeError:Cannot read property ‘tap’ of undefined at HtmlWebpackPlugin.apply,我在网络上经过查阅发现自己是HtmlWebpackPlugin安装版本的问题,我修改了一下HtmlWebpackPlugin的安装版本就成功了。如果你也出现同样的错误,查看一下自己的版本是否与webpack的版本兼容,具体查看官网。
2022-09-21 16:06:40
1069
原创 axios报错: TypeError: r.toUpperCase is not a function
axios报错: TypeError: r.toUpperCase is not a function
2022-09-04 17:22:35
940
原创 报错Error: listen EADDRINUSE: address already in use :::xx 端口被占用问题
端口被占用问题
2022-08-18 21:48:13
914
1
原创 jQuery之toggleClass() 方法
toggleClass()对设置和移除被选元素的一个或多个类进行切换,有则删除,无则加toggleClass() 方法有两个参数,class和switch
2022-06-24 09:33:44
2608
原创 报错:Uncaught ReferenceError: $ is not defined 的解决方法
报错:Uncaught ReferenceError: $ is not defined 的几个原因1.没有导入jQuery的jar包2.jQuery的jar包放进了WEB-INF里,jQuery的jar包最好放在WebContent下,跟WEB-INF同级3.导入jQuery的路径名没有写对4.jQuery没有包含js上面是引入顺序,我的错误是我的jQuery文件里面没有包含js库代码,所以导致报错,下面是jQuery- v1.10.1.js库...
2022-06-14 09:51:28
16369
1
原创 原型链式继承
每个函数对象都会有一个phototype属性,这个属性指向的对象为原型对象。这个函数如果作为普通函数调用,则原型函数没有任何作用;如果作为构造函数调用,那么它的实例就会拥有一个隐含的属性__poroto__,也叫做隐式原型,隐式原型指向构造函数的原型对象。我们定义了Dog构造函数,里面定义了狗的一些属性,姓名,颜色、年龄等;定义了Corky构造函数,用call()方法继承了Dog的属性;为Dog定义了原型方法,通过更改Corky的原型对象,让它来继承Dog的原型方法,所以Corky也拥有了dog的跑、跳
2022-06-09 17:32:03
91
原创 call和apply方法的作用与区别
call()call()用来调用给定值和单独提供函数的参数。call()使用时可以继承另一个对象的属性,而不必为新对象重写该方法。apply()apply() 方法调用具有给定值的函数,并以数组(或类似数组的对象)的形式提供。它使用时也可以继承另一个对象的属性,而不必为新对象重写该方法。例子使用 call() 和 apply()方法时...
2022-06-09 11:50:37
279
原创 原型prototype与原型对象__proto__
定义prototype:每个函数(function)对象中都有一个特殊的属性,叫做prototype,该属性指的对象为原型对象。原型对象(prototype)相当于一个公共的区域可以被所有的该类实例访问,我们可以将一些实例共有的属性或方法存储在原型对象中,这样只需要设置一次即可以让所有的对象都访问到该方法或者属性。_ proto :每个对象都有一个__proto_(隐式原型)属性。constructor:是构造函数显示原型的一个属性,指向这个原型对象对应的构造函数。实例的隐式原型指向其构造函数的显示
2022-06-01 20:49:25
298
原创 使用Html+Css+JS实现商品的展示,价格计算等功能
源码在后面效果展示图片功能调用外部数据,动态建立路径导航调用外部数据,动态建立图片展示页面,为并未主图绑定鼠标移入、移动、移出事件,实现放大镜详情展示3.并为其绑定左右按钮事件,进行切换4. 为小图绑定切换事件,由小图切换主图,...
2022-05-29 09:03:39
8713
4
空空如也
使用less除法时,带上括号就会产生空格,不带括号就不进行运算
2022-11-07
使用antd改变自定义主题
2022-10-29
根据不同的dpr显示不同颜色的背景
2022-10-27
webpack加载css文件
2022-09-20
连接mongodb数据库失败
2022-08-20
我想获取图片集合的当前显示图片的索引,想问问使用jQuery怎么获取
2022-06-24
使用jquery来修改照片的层级
2022-06-23
TA创建的收藏夹 TA关注的收藏夹
TA关注的人