Skip to content

Commit 7b7ccd9

Browse files
authored
fix this.$el被销毁替换后继续监听resize (#396)
1 parent b8a09a4 commit 7b7ccd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/item.js

+2-1
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)