Skip to content
This repository has been archived by the owner on Jan 12, 2020. It is now read-only.

✨ add deep option (for prop watching) #3

Merged
merged 1 commit into from
Mar 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
✨ add deep option (for prop watching)
  • Loading branch information
Alexandre Bonaventure committed Mar 30, 2017
commit 88f8709ba7d9582dd55bb9157fdcd80d52db87a8
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export default (props, options = defaultOptions) => ({
};
},
created() {
each(props, (prop, propName) => {
each(props, ({ deep = false }, propName) => {
this.$watch(propName, (value) => {
this[options.localName][propName] = value;
});
});
}, { deep });
},
});