evcc-io/assets/js/mixins/collector.js

14 lines
306 B
JavaScript

export default {
methods: {
// collect all target component properties from current instance
collectProps: function (component) {
let data = {};
for (var p in component.props) {
if (p in this) {
data[p] = this[p];
}
}
return data;
},
},
};