mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-05 14:04:44 +00:00
Change the ready method to mounted
This commit is contained in:
parent
13865a7076
commit
96d5fdc0f1
12 changed files with 13 additions and 12 deletions
|
|
@ -27,7 +27,7 @@
|
|||
this.active = true;
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
if (this.$el.classList.contains('md-active')) {
|
||||
this.active = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
props: {
|
||||
type: String
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
this.$children.forEach((child) => {
|
||||
let element = child.$el;
|
||||
let toggleClass = 'md-toggle';
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
this.hasSlot = this.$el.querySelector('label').innerHTML.trim() !== '';
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
this.$parent.inputLength = this.$el.value.length;
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
if (!this.$parent.$el.classList.contains('md-input-container')) {
|
||||
this.$destroy();
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
this.input = this.$el.querySelector('input') || this.$el.querySelector('textarea') || this.$el.querySelector('select');
|
||||
|
||||
if (!this.input) {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
this.$parent.inputLength = this.$el.value.length;
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
if (!this.$parent.$el.classList.contains('md-input-container')) {
|
||||
this.$destroy();
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
this.hasSlot = this.$el.querySelector('label').innerHTML.trim() !== '';
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
let parentClasses = this.$parent.$el.classList;
|
||||
|
||||
this.parent = this.$parent;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
this.hideMenu();
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
if (!this.$parent.$el.classList.contains('md-input-container')) {
|
||||
this.$destroy();
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
this.hasSlot = this.$el.querySelector('label').innerHTML.trim() !== '';
|
||||
this.leftPos = this.model ? fullThreshold + '%' : initialThreshold;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
padding: 0 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
flex-flow: row wrap;
|
||||
|
||||
&.md-dense {
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@
|
|||
calculateTooltipPosition(this);
|
||||
}
|
||||
},
|
||||
attached() {
|
||||
beforeMount() {
|
||||
this.parent = this.$el.parentNode;
|
||||
},
|
||||
ready() {
|
||||
mounted() {
|
||||
calculateTooltipPosition(this);
|
||||
this.created = false;
|
||||
this.$remove();
|
||||
|
|
|
|||
Loading…
Reference in a new issue