mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-04-24 00:24:49 +00:00
Add javascript code inside .vue file
This commit is contained in:
parent
46f03c8e17
commit
54eeadf4e0
8 changed files with 53 additions and 51 deletions
|
|
@ -1,11 +0,0 @@
|
|||
export default {
|
||||
props: {
|
||||
mdShift: Boolean
|
||||
},
|
||||
computed: {
|
||||
classes() {
|
||||
return this.mdShift && 'md-shift';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -6,4 +6,15 @@
|
|||
|
||||
<style lang="scss" src="./mdBottomBar.scss"></style>
|
||||
|
||||
<script src="./mdBottomBar.js"></script>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
mdShift: Boolean
|
||||
},
|
||||
computed: {
|
||||
classes() {
|
||||
return this.mdShift && 'md-shift';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
export default {
|
||||
props: {
|
||||
mdIcon: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
setActive() {
|
||||
this.$parent.$children.forEach((item) => {
|
||||
item.active = false;
|
||||
});
|
||||
|
||||
this.active = true;
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
if (this.$el.classList.contains('md-active')) {
|
||||
this.active = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -8,4 +8,29 @@
|
|||
</button>
|
||||
</template>
|
||||
|
||||
<script src="./mdBottomBarItem.js"></script>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
mdIcon: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
setActive() {
|
||||
this.$parent.$children.forEach((item) => {
|
||||
item.active = false;
|
||||
});
|
||||
|
||||
this.active = true;
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
if (this.$el.classList.contains('md-active')) {
|
||||
this.active = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
export default {
|
||||
props: {
|
||||
type: String,
|
||||
disabled: Boolean
|
||||
}
|
||||
};
|
||||
|
|
@ -6,4 +6,11 @@
|
|||
|
||||
<style lang="scss" src="./mdButton.scss"></style>
|
||||
|
||||
<script src="./mdButton.js"></script>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
type: String,
|
||||
disabled: Boolean
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
export default {
|
||||
props: {
|
||||
disabled: Boolean
|
||||
}
|
||||
};
|
||||
|
|
@ -4,4 +4,10 @@
|
|||
</a>
|
||||
</template>
|
||||
|
||||
<script src="./mdLinkButton.js"></script>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
disabled: Boolean
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue