前言 公司项目需要做个画线缩放,我司称之为瞳距缩放,简而言之就是:2张图,从第一张图画一条线,再从第二个图画一条线,第二条线以第一条为基准,延长到一致的长度,并同比缩放图片;文字太枯燥,请先实例图 例子1:以皮卡丘为例,我要把路飞的拳头缩放到皮卡丘头那么大 例子2:以皮卡丘的基准,缩小路飞,与其身高 ...
分类:
其他好文 时间:
2019-12-13 13:39:00
阅读次数:
89
根据每项的parentId,生成具体树形结构的对象。 const nest = (items, id = null, link = 'parent_id') => items .filter(item => item[link] id) .map(item => ({ ...item, childr ...
分类:
其他好文 时间:
2019-12-13 00:19:17
阅读次数:
239
在用EMLOG建设单页网站时,需要在首页显示评论发布框和评论列表,要实现这个功能,就需要修改模版脚本文件module.php里的blog_comments_post、blog_comments、blog_comments_children这三个函数来实现效果;默认情况下这三个函数需要在文章页面才能正 ...
分类:
其他好文 时间:
2019-12-12 00:59:33
阅读次数:
109
antd里面的form表单方面,遇到一个高阶函数,以及高阶组件,于是看了一下这方面内容,前辈们的文章写得也非常详细,这里就稍微kobe一下 高阶函数与高阶组件 高阶函数: 高阶函数,是一种特别的函数,接受的参数为函数,返回值也是函数 成立条件,二者兼一即可 1).一类特别的函数 a).接受函数类型的 ...
分类:
其他好文 时间:
2019-12-11 00:37:28
阅读次数:
101
本文介绍利用props传参,传参的形式有三种:布尔模式、对象模式、函数模式 <router-link :to="{name:'children',params:{id:msg}}">切换咯</router-link> 布尔模式:将props属性设置成为true,如果 props 被设置为 true, ...
分类:
其他好文 时间:
2019-12-10 12:59:30
阅读次数:
90
触发BFC body 根元素 浮动元素:float 除 none 以外的值 绝对定位元素:position (absolute、fixed) display 为 inline-block、table-cells、flex overflow 除了 visible 以外的值 (hidden、auto、s ...
分类:
其他好文 时间:
2019-12-09 21:37:53
阅读次数:
118
children([expr]) 概述 取得一个包含匹配的元素集合中每一个元素的所有子元素的元素集合。 可以通过可选的表达式来过滤所匹配的子元素。注意:parents()将查找所有祖辈元素,而children()只考虑子元素而不考虑所有后代元素。大理石量具哪家好 参数 exprStringV1.0 ...
分类:
其他好文 时间:
2019-12-09 19:04:21
阅读次数:
145
使用场景:当组件层级较深,然后需要使用到根组件中的某些值,就需要使用到依赖注入 依赖注入的基本内容就是关于 provide 和 inject 根组件中使用provide export default { name: 'app', data(){ return { msg:'Welcome to Yo ...
分类:
其他好文 时间:
2019-12-09 13:39:11
阅读次数:
98
The last two challenges used the flex-direction property set to row. This property can also create a column by vertically stacking the children of a f ...
分类:
Web程序 时间:
2019-12-08 23:33:55
阅读次数:
130
Adding display: flex to an element turns it into a flex container. This makes it possible to align any children of that element into rows or columns. ...
分类:
Web程序 时间:
2019-12-08 22:45:24
阅读次数:
114