vue-note
Vue DOM元素绑定动态style
:style="{ transform: 'translateY(-' + num1 + 'px)' }"Vue dom元素绑定多个类名需要以数组的方式书写
:class="[item.colorAndBoxName,
current1==item.id?'selected1':'',
current2==item.id?'selected2':'',
current3==item.id?'selected3':'']"requestAnimationFrame方法写动画
let animation3Func = function() {
// do something...
// 需要执行自调用来执行动画效果
self.animalId3 = window.requestAnimationFrame(animation3Func);
};
self.animalId3 = window.requestAnimationFrame(animation3Func);
//清除这个动画效果
window.cancelAnimationFrame(this.animalId3);Vue使用clipboard(将指定数据存储到剪贴板)
Vue脚手架搭建的项目无法热更新解决方法
Vue项目build时移除console.log
VS Code调试vue代码
vue2 Element-UI 按需引入
1. 安装插件
2. 编辑.babelrc
.babelrcLast updated