Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted() {
const adapter = {
addClass: className => {
this.$set(this.classes, className, true);
},
getPrimaryBar: () => this.$refs.primary,
getBuffer: () => this.$refs.buffer,
hasClass: className => this.$el.classList.contains(className),
removeClass: className => this.$delete(this.classes, className),
setStyle: (el, styleProperty, value) => (el.style[styleProperty] = value),
};
this.foundation = new MDCLinearProgressFoundation(adapter);
this.foundation.init();
this.foundation.setReverse(this.reversed);
this.foundation.setProgress(Number(this.progress));
this.foundation.setBuffer(Number(this.buffer));
this.foundation.setDeterminate(!this.indeterminate);
if (this.open) {
this.foundation.open();
} else {
this.foundation.close();
}
},
beforeDestroy() {
mounted() {
const adapter = {
addClass: className => {
this.$set(this.classes, className, true);
},
forceLayout: () => this.$el.offsetWidth,
getPrimaryBar: () => this.$refs.primary,
getBuffer: () => this.$refs.buffer,
hasClass: className => this.$el.classList.contains(className),
removeClass: className => this.$delete(this.classes, className),
setStyle: (el, styleProperty, value) => (el.style[styleProperty] = value),
};
this.foundation = new MDCLinearProgressFoundation(adapter);
this.foundation.init();
this.foundation.setReverse(this.reversed);
this.foundation.setProgress(Number(this.progress));
this.foundation.setBuffer(Number(this.buffer));
this.foundation.setDeterminate(!this.indeterminate);
if (this.open) {
this.foundation.open();
} else {
this.foundation.close();
}
},
beforeDestroy() {