- 博客(24)
- 收藏
- 关注
原创 2021-07-05
子传父:vue.esm.js?efeb:628 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop’s value. Prop being mutated: “message” found in 解决方
2021-07-05 16:46:31
166
原创 子传父中,[Vue warn]: Error in v-on handler: "ReferenceError: msg is not defined"
错误的原因 有可能是 父元素接受数据的时候没有传参数
2019-07-01 10:38:22
19665
原创 [Vue warn]: Unknown custom element: <son> - did you register the component correctly? For recursive
出现这个错误的原因 检查一下你引入的组件里面是否在components里面写入子组件
2019-07-01 09:05:19
5560
原创 vue.esm.js?efeb:628 [Vue warn]: Error in render: "TypeError: Cannot read property 'matched' of undef
出现错误的原因是在手写一个vue的路由组件的时候,忘了在new vue 里面写router
2019-07-01 08:45:04
7041
原创 ECharts 设置柱状图的每个柱子的颜色不一样 ,显示数据,并自定义单位,
效果图 series: [ { type: 'bar', barCategoryGap:'40%', //设置柱子的颜色 itemStyle: { normal: { color: function(par...
2019-06-10 16:17:27
3412
1
原创 点餐系统的头部样式vue
上图 布局 <div class="nav"> <router-link to='/goods' class='item-active'>点餐 <i class='line' v-show='ll'></i></router-link> <router-link to='/ratings' class='ite...
2019-05-22 06:49:18
301
原创 控制字数的多少,超出部分隐藏,当鼠标划过的时候显示,给p标签加一个自定义属性,当他鼠标划过的时候获取这个属性里面的值
//字数显示问题当字体 $('#content tr td:nth-child(7n)').each(function(index, el) { $(this).hover( function(){ var aa=$(this).attr('title'); $(this).html(aa); }, function(){...
2019-05-07 14:58:49
877
原创 点击当前的td,将容显示在弹窗里面(使用方法:事件委托)
先上效果图 用到的知识点:事件委托(我们不确定会点击哪个td event.target) animation动画特效 @keyframs html <!--模态框的制作--> <div class='Modal_box'> <div class='Modal_inner'> <img src='img/错号.png' id='Wr...
2019-05-07 14:44:14
757
原创 360极速模式兼容性问题
opacity在360兼容模式下不显示问题(在他的前面加上各个浏览器的私有属性) opacity:0; filter:alpha(opacity=0); -moz-opacity:0; -khtml-opacity: 0; opacity: 0; hover不兼容360兼容模式的处理(使用jquery模拟hover) $(function(){ $(’.bnData_context1 ul li’...
2019-05-06 15:42:57
800
原创 手机端 :页面内容不足的时候让他在底部(方法) javascript
获取手机端屏幕高度的时候 使用window.innerHTML if(window.offsetHeight&lt;window.innerHeight){ foot.style.cssText='position:absolute;bottom:0;' }else{ foot.style.cssText='position:fixed;bottom:0;' } ...
2018-12-28 10:43:04
688
原创 字符串的方法复习(javascript)
1.字符串的截取,返回字符串 substring(开始位置,结束位置) 支持反截取 一个参数的时候 就是从开始位置到结束 slice(开始位置,结束位置)) 不支持反截取 一个参数的时候 就是从开始位置到结束 substr(开始位置,长度) 2.字符串的替换 a.replace(‘要替换的’,‘新的’) 3.将字符串转为数组 a.split(‘要切割的对象,把参数变成,’) 例如: var a=...
2018-12-27 16:18:20
195
原创 vue 实用小知识点
1.安装环境 cnpm install -g vue-cli(安装全局脚手架) vue init webpack dome cnpm install cd dome cnpm run dev 2.一个组件的三步骤 import的引入组件 在template里面加载组件视图 在data()后面创建组件名 3.如何解决组件名与h5标签冲突问题 &amp;amp;lt;app-header/&amp;amp;gt; appHeade...
2018-12-26 15:28:39
255
原创 vue-router.esm.js?fe87:16 [vue-router] Duplicate named routes definition:
解决办法
2018-12-26 11:53:32
10041
4
原创 js点击div显示消失的例子
思路:点击按钮,让div显示,再次点击,消失 .这里主要控制div样式的显示隐藏 。我们自定义一个a 让它来控制显示隐藏 这里用的非运算符,三目运算符 html <input type="button" id="btn" value='点击'/> <div id="box"></div> js var oInput=document.getEl..
2018-12-22 14:04:45
4870
原创 关于字符串的一些东西(Es6)
1.字符串查找 str.indexOf(‘banana’) 返回索引位置,没找到返回-1 str.includes(‘banana’) 返回true或者false 例子 判断浏览器 if(navigator.userAgent.includes('Chrome')){ alert('是chrome') }else{ alert('不是chrome') ...
2018-12-19 15:28:06
127
原创 vue 注册登录遇到的问题 function(){[native code]}
登录按钮一直获取不到 查看代码 显示 function(){[native code]} 查了百度 [native code]的意思 说是非法调用导致的 仔细查看代码 原来是粗心导致的 ...
2018-12-10 11:39:43
6342
原创 jquery each()
//需求 列表页信息区分 针对不同的信息 做的动画 判断 KaTeX parse error: Expected '}', got 'EOF' at end of input: … var pp=(&amp;amp;quot;.p_tx a&amp;amp;quot;).eq(i).parent().next().html();//a的父亲的兄弟的内容 if(pp !== ‘Coming Soon’){//判断a父亲兄弟的内容是...
2018-12-05 12:28:18
175
原创 jquey和js分别实现在图片不知道大小的情况下始终居中在屏幕的中央
直接上代码 js代码 var img=document.getElementById('img'); console.log(img); var W=img.offsetWidth;//获取图片的宽度 console.log(W); var H=img.offsetHeight;//获取图片的高度 console.l...
2018-11-29 16:29:46
367
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅