摘要: subString(7,3),参数以较大的为截取结尾索引,当前截取的字符串为(3-7),当参数为负数时,负数参数默认为0; slice参数如果为负数则从字符串后面截取;如果开始索引大于结束索引则返回空字符串, subStr不支持负数,如果是负数则返回空字符串,第二个参数为获取的个数。 阅读全文
posted @ 2021-01-13 12:44 敲敲碰碰 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 1.匿名插槽 //parent <helloWorld> 插槽使用 </helloWorld> //child <template> <div> <!-- 显示插槽内容:“插槽使用” --> <slot></slot> </div> </template> 2.具名插槽 给slot添加name属性。 阅读全文
posted @ 2021-01-03 10:39 敲敲碰碰 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 一,父到子 1.属性props。 //child props:{msg:String} //parent <HelloWrold :Msg="welcome to Your Vue.js App"></HelloWorld> 2.引用$ref。 <HelloWorld ref="HW"/> this 阅读全文
posted @ 2021-01-03 10:22 敲敲碰碰 阅读(132) 评论(0) 推荐(0) 编辑
摘要: html: <div class="fullScreen"> <i class="el-icon-full-screen" @click="toggleFullscreen"></i></div> data: data(){ return { isShowFullScreen: false, isS 阅读全文
posted @ 2020-12-18 18:13 敲敲碰碰 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 一.微信小程序。 微信小程序提供了onLoad,onShow生命周期函数来进入页面获取列表数据。onLoad和onShow区别:onLoad,如果第一次进入页面之后,再次进入时不再触发。onShow,小程序每次进入页面都会触发,如果在onShow里调用列表接口,可以每次获取最新数据,但是页面也会重新 阅读全文
posted @ 2020-12-09 17:52 敲敲碰碰 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 小程序tabBar事件 阅读全文
posted @ 2020-12-03 10:27 敲敲碰碰 阅读(1441) 评论(0) 推荐(0) 编辑
摘要: checkbox: html: <div> <label class="unSelected selected" for="choose"> <checkbox clsss="choose"/> </label> </div> css: .unSelected{ display: inline-bl 阅读全文
posted @ 2019-12-16 11:46 敲敲碰碰 阅读(1964) 评论(0) 推荐(0) 编辑
摘要: 打开浏览器,通过http=>DNS=>IP=>TCP/IP=>获取到静态文件(js 、css、html、img等)=>绘制html dom 节点Tree 阅读全文
posted @ 2019-09-24 15:16 敲敲碰碰 阅读(206) 评论(0) 推荐(1) 编辑
摘要: 方法:通过日期函数toLocaleString()获取。new Date().toLocaleString( ); //"2019/9/1 上午11:20:23" 获取年月日方法:new Date().toLocaleString( ).replace(/\//g,'-').split(" ")[0 阅读全文
posted @ 2019-09-01 11:23 敲敲碰碰 阅读(3984) 评论(0) 推荐(0) 编辑
摘要: 新闻发布系统文字需要换行,后台返回数据包含空格、回车符号需要默认显示出来。在父元素加上css样式 :white-space:pre;即可。 例:<div class="white-space:pre;">abce efg</div> 兼容性:所有浏览器都支持 white-space 属性。 js动态 阅读全文
posted @ 2019-08-30 10:24 敲敲碰碰 阅读(3079) 评论(0) 推荐(0) 编辑