一、要在vue里面使用scss的话,必须在style上面加一句css

其次, 还要安装vue
cnpm install node-sass --save-dev
cnpm install sass-loader --save-dev
这两个,就可使用了;
二、当要判断props的某个值是否存在时(type),即要转成Boolean的时候,能够加上!!去转(!!type)
三、props 能够对参数进行校验,经过使用validator() {}能够
四、写的组件div之间一直有一个空隙
缘由: 空隙产生的缘由是div设置为
display:inline-block;
标签换行时就会出现间隙
解决: 给父级加上font-size; 0