This topic created in 3234 days ago, the information mentioned may be changed or developed.
我想实现的效果是 table row 在该 row 某个数据变化时候动态添加个动画效果上去。我尝试了用 directive,因为考虑到它能访问到 el,但它的 update hook 只在元素更新时候才被触发,用 watch 可以监视 model,但难道只有通过 ref 去定位元素做处理?
1 replies • 2017-06-30 09:58:51 +08:00
 |
|
1
gap Jun 30, 2017
给 el 上添加 ref 属性,然后在 watch 中监控 model 变化,然后 this.$ref.something.style...这个方案不行,其他行的样式也会变...
|