09 2020 档案
摘要:通过 scale(1.2) translateY(-7px) 两者同时控制,实现放大同时、向上移动,2个动画的速率是一样的 .pro-box-list a img{ width: 90px; height: 90px; transition: all 0.5s; box-shadow: 0 1px
阅读全文
摘要:组件名首字母必须大写,区分原生html标签 会使用到JSX语法 function方式创建组件 function Func(props){ return ( <div ><h1>测试函数组件{props.name}</h1></div> ) } ES6 class方式 class Cls extend
阅读全文
摘要:1.模块化:将重复的(可复用的)代码抽离为单个模块 2.组件化:将重复的 (可复用的) 的前端页面元素抽离单个组件 * Vue中实现组件化:1.Vue.component() 2.Vue.extend() 3.'.vue模板文件'。一个组件包含template、script、style编译整合的文件
阅读全文
摘要:slot内容分发是Vue的Api来源 作用域插槽 <div id="app"> <my-list> {{msg}} </my-list> </div> <script> Vue.component("my-list", { template: `<div><slot></slot></div>`,
阅读全文