mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Merge pull request #1880 from ooade/add/with-museui
Add with muse-ui example
This commit is contained in:
commit
18fa218373
26
examples/with-museui/nuxt.config.js
Normal file
26
examples/with-museui/nuxt.config.js
Normal 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']
|
||||
};
|
12
examples/with-museui/package.json
Normal file
12
examples/with-museui/package.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "with-museui",
|
||||
"dependencies": {
|
||||
"nuxt": "latest",
|
||||
"muse-ui": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt",
|
||||
"build": "nuxt build",
|
||||
"start": "nuxt start"
|
||||
}
|
||||
}
|
43
examples/with-museui/pages/index.vue
Normal file
43
examples/with-museui/pages/index.vue
Normal 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>
|
4
examples/with-museui/plugins/museui.js
Normal file
4
examples/with-museui/plugins/museui.js
Normal file
@ -0,0 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
import MuseUI from 'muse-ui';
|
||||
|
||||
Vue.use(MuseUI);
|
Loading…
Reference in New Issue
Block a user