Skip to content

Commit 26f47f5

Browse files
committed
watch string => function
1 parent e4d45b6 commit 26f47f5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-waterfall",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "A waterfall layout component for Vue.js",
55
"main": "lib/vue-waterfall.min.js",
66
"files": [

src/waterfall-slot.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ export default {
5757
width: 0,
5858
height: 0
5959
}
60-
this.$watch('width, height', this.notify)
60+
this.$watch(() => (
61+
this.width,
62+
this.height
63+
), this.notify)
6164
},
6265
mounted () {
6366
this.$parent.$once('reflowed', () => {

0 commit comments

Comments
 (0)