mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-04-12 02:41:07 +00:00
Add empty md-menu files
This commit is contained in:
parent
0a77a3ccca
commit
e76db4ffcc
8 changed files with 175 additions and 0 deletions
|
|
@ -55,6 +55,10 @@
|
|||
<router-link exact to="/components/list">List</router-link>
|
||||
</md-list-item>
|
||||
|
||||
<md-list-item class="md-inset">
|
||||
<router-link exact to="/components/menu">Menu</router-link>
|
||||
</md-list-item>
|
||||
|
||||
<md-list-item class="md-inset">
|
||||
<router-link exact to="/components/radio">Radio</router-link>
|
||||
</md-list-item>
|
||||
|
|
|
|||
108
docs/src/pages/components/Menu.vue
Normal file
108
docs/src/pages/components/Menu.vue
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<template>
|
||||
<demo-page label="Components - Menu">
|
||||
<div slot="examples">
|
||||
<demo-example label="Default">
|
||||
</demo-example>
|
||||
</div>
|
||||
|
||||
<div slot="code">
|
||||
|
||||
</div>
|
||||
|
||||
<div slot="api">
|
||||
|
||||
</div>
|
||||
</demo-page>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../../../../src/core/stylesheets/variables.scss';
|
||||
|
||||
.phone-viewport {
|
||||
width: 360px;
|
||||
height: 540px;
|
||||
margin-right: 16px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
border: 1px solid rgba(#000, .12);
|
||||
}
|
||||
|
||||
.custom-list {
|
||||
.md-list-action {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 16px;
|
||||
pointer-events: auto;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.md-icon {
|
||||
color: rgba(#000, .26);
|
||||
}
|
||||
}
|
||||
|
||||
.complete-example {
|
||||
height: 540px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
z-index: 1;
|
||||
|
||||
.md-fab {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
left: 16px;
|
||||
box-shadow: $material-shadow-5dp;
|
||||
}
|
||||
|
||||
.md-toolbar {
|
||||
.md-icon {
|
||||
color: #014e70;
|
||||
}
|
||||
}
|
||||
|
||||
.md-title {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.md-list {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.md-list-action .md-icon {
|
||||
color: rgba(#000, .26);
|
||||
}
|
||||
|
||||
.md-avatar-icon .md-icon {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.md-sidenav .md-list-text-container > :nth-child(2) {
|
||||
color: rgba(#fff, .54);
|
||||
}
|
||||
|
||||
.md-account-header {
|
||||
.md-list-item:hover .md-button:hover {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.md-avatar-list .md-list-item-container:hover {
|
||||
background: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
toggleSidenav() {
|
||||
this.$refs.sidebar.toggle();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -14,6 +14,7 @@ import Checkbox from './pages/components/Checkbox';
|
|||
import Icon from './pages/components/Icon';
|
||||
import Input from './pages/components/Input';
|
||||
import List from './pages/components/List';
|
||||
import Menu from './pages/components/Menu';
|
||||
import Radio from './pages/components/Radio';
|
||||
import Ripple from './pages/components/Ripple';
|
||||
import Select from './pages/components/Select';
|
||||
|
|
@ -102,6 +103,11 @@ const components = [
|
|||
name: 'components:list',
|
||||
component: List
|
||||
},
|
||||
{
|
||||
path: '/components/menu',
|
||||
name: 'components:menu',
|
||||
component: Menu
|
||||
},
|
||||
{
|
||||
path: '/components/radio',
|
||||
name: 'components:radio',
|
||||
|
|
|
|||
8
src/components/mdMenu/index.js
Normal file
8
src/components/mdMenu/index.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import mdMenu from './mdMenu.vue';
|
||||
import mdMenuTheme from './mdMenu.theme';
|
||||
|
||||
export default function install(Vue) {
|
||||
Vue.component('md-menu', Vue.extend(mdMenu));
|
||||
|
||||
Vue.material.styles.push(mdMenuTheme);
|
||||
}
|
||||
5
src/components/mdMenu/mdMenu.scss
Normal file
5
src/components/mdMenu/mdMenu.scss
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
@import '../../core/stylesheets/variables.scss';
|
||||
|
||||
.md-select {
|
||||
|
||||
}
|
||||
6
src/components/mdMenu/mdMenu.theme
Normal file
6
src/components/mdMenu/mdMenu.theme
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.THEME_NAME {
|
||||
.md-menu,
|
||||
&.md-menu {
|
||||
|
||||
}
|
||||
}
|
||||
36
src/components/mdMenu/mdMenu.vue
Normal file
36
src/components/mdMenu/mdMenu.vue
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<template>
|
||||
<div class="md-menu" :class="classes">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" src="./mdMenu.scss"></style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
classes() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -8,6 +8,7 @@ import mdDivider from './components/mdDivider';
|
|||
import mdIcon from './components/mdIcon';
|
||||
import mdInputContainer from './components/mdInputContainer';
|
||||
import mdList from './components/mdList';
|
||||
import mdMenu from './components/mdMenu';
|
||||
import mdRadio from './components/mdRadio';
|
||||
import mdSelect from './components/mdSelect';
|
||||
import mdSidenav from './components/mdSidenav';
|
||||
|
|
@ -29,6 +30,7 @@ let options = {
|
|||
mdIcon,
|
||||
mdInputContainer,
|
||||
mdList,
|
||||
mdMenu,
|
||||
mdRadio,
|
||||
mdSelect,
|
||||
mdSidenav,
|
||||
|
|
|
|||
Loading…
Reference in a new issue