UNPKG

vuetify

Version:

Vue Material Component Framework

33 lines (30 loc) 573 B
import Vue from 'vue'; /* @vue/component */ export default Vue.extend({ name: 'returnable', props: { returnValue: null }, data: () => ({ isActive: false, originalValue: null }), watch: { isActive(val) { if (val) { this.originalValue = this.returnValue; } else { this.$emit('update:return-value', this.originalValue); } } }, methods: { save(value) { this.originalValue = value; setTimeout(() => { this.isActive = false; }); } } }); //# sourceMappingURL=index.js.map