生命周期
activated
keep-alive 组件激活时调用。该钩子在服务器端渲染期间不被调用。
deactivated
beforeCreate
created
beforeMount
mounted
beforeUpdate
updated
beforedestroy
destroyed
事件修饰符
.stop: event.stopPropagation() 阻止事件冒泡
.prevent event.preventDefault() 阻止事件默认行为
.capture : 捕获
.self : 只有当该元素是事件本身时触发回调
.once : 只会触发一次
过滤器
全局 Vue.filter
Vue.filter('time',function(val,val1,val2){
console.log(val,val1,val2);
})
局部 filters
<el-table-column label="时间">
<template slot-scope="scope">
{{ scope.row.add_time | times }}
</template>
</el-table-column>
filters: {
times(e) {
return e;
},
},