Merge pull request #1880 from ooade/add/with-museui

Add with muse-ui example
This commit is contained in:
Sébastien Chopin 2017-10-18 11:15:10 +02:00 committed by GitHub
commit 18fa218373
4 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,26 @@
module.exports = {
head: {
meta: [
{
name: 'viewport',
content: 'width=device-width, initial-scale=1'
}
],
link: [
{
rel: 'stylesheet',
href:
'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic'
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/icon?family=Material+Icons'
},
{
rel: 'stylesheet',
href: 'https://unpkg.com/muse-ui@2.1.0/dist/muse-ui.css'
}
]
},
plugins: ['~/plugins/museui']
};

View File

@ -0,0 +1,12 @@
{
"name": "with-museui",
"dependencies": {
"nuxt": "latest",
"muse-ui": "latest"
},
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start"
}
}

View File

@ -0,0 +1,43 @@
<template>
<div>
<mu-appbar title="Nuxt.js">
<mu-icon-button icon="menu" slot="left" @click="toggle()" />
<mu-icon-menu icon="expand_more" slot="right">
<mu-menu-item value="1" title="One" />
<mu-menu-item value="2" title="Two" />
<mu-menu-item value="3" title="Three" />
</mu-icon-menu>
</mu-appbar>
<mu-drawer :open="open" @close="toggle()" :docked=false>
<mu-list>
<mu-list-item title="Menu Item 1" />
<mu-list-item title="Menu Item 2" />
<mu-list-item title="Menu Item 3" />
</mu-list>
</mu-drawer>
<div class="content">
<mu-raised-button label="Primary" class="demo-raised-button" primary/>
</div>
</div>
</template>
<script>
export default {
data() {
return {
open: false
}
},
methods: {
toggle(flag) {
this.open = !this.open;
}
}
}
</script>
<style>
.content {
margin: 10px
}
</style>

View File

@ -0,0 +1,4 @@
import Vue from 'vue';
import MuseUI from 'muse-ui';
Vue.use(MuseUI);