Change the ready method to mounted

This commit is contained in:
Marcos Moura 2016-08-31 19:20:23 -03:00
parent 13865a7076
commit 96d5fdc0f1
12 changed files with 13 additions and 12 deletions

View file

@ -27,7 +27,7 @@
this.active = true;
}
},
ready() {
mounted() {
if (this.$el.classList.contains('md-active')) {
this.active = true;
}

View file

@ -13,7 +13,7 @@
props: {
type: String
},
ready() {
mounted() {
this.$children.forEach((child) => {
let element = child.$el;
let toggleClass = 'md-toggle';

View file

@ -45,7 +45,7 @@
}
}
},
ready() {
mounted() {
this.hasSlot = this.$el.querySelector('label').innerHTML.trim() !== '';
}
};

View file

@ -103,7 +103,7 @@
this.$parent.inputLength = this.$el.value.length;
}
},
ready() {
mounted() {
if (!this.$parent.$el.classList.contains('md-input-container')) {
this.$destroy();

View file

@ -56,7 +56,7 @@
}
}
},
ready() {
mounted() {
this.input = this.$el.querySelector('input') || this.$el.querySelector('textarea') || this.$el.querySelector('select');
if (!this.input) {

View file

@ -102,7 +102,7 @@
this.$parent.inputLength = this.$el.value.length;
}
},
ready() {
mounted() {
if (!this.$parent.$el.classList.contains('md-input-container')) {
this.$destroy();

View file

@ -47,7 +47,7 @@
}
}
},
ready() {
mounted() {
this.hasSlot = this.$el.querySelector('label').innerHTML.trim() !== '';
}
};

View file

@ -28,7 +28,7 @@
}
}
},
ready() {
mounted() {
let parentClasses = this.$parent.$el.classList;
this.parent = this.$parent;

View file

@ -83,7 +83,7 @@
this.hideMenu();
}
},
ready() {
mounted() {
if (!this.$parent.$el.classList.contains('md-input-container')) {
this.$destroy();

View file

@ -98,7 +98,7 @@
}
}
},
ready() {
mounted() {
this.hasSlot = this.$el.querySelector('label').innerHTML.trim() !== '';
this.leftPos = this.model ? fullThreshold + '%' : initialThreshold;
},

View file

@ -5,6 +5,7 @@
padding: 0 8px;
display: flex;
align-items: center;
align-content: center;
flex-flow: row wrap;
&.md-dense {

View file

@ -80,10 +80,10 @@
calculateTooltipPosition(this);
}
},
attached() {
beforeMount() {
this.parent = this.$el.parentNode;
},
ready() {
mounted() {
calculateTooltipPosition(this);
this.created = false;
this.$remove();