Skip to content

Commit d472800

Browse files
leiyunkang7bimalghartimagar
authored andcommitted
fix this.$el被销毁替换后继续监听resize (tangbc#396)
1 parent 74e92ed commit d472800

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/item.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const Wrapper = {
2222

2323
// since componet will be reused, so disptach when updated
2424
updated () {
25-
this.dispatchSizeChange()
25+
// this.dispatchSizeChange()
26+
this.resizeObserver.observe(this.$el)
2627
},
2728

2829
beforeDestroy () {

0 commit comments

Comments
 (0)