Skip to content

Commit 08328a3

Browse files
author
xrr2016
committed
🔥 use muse-ui
1 parent 354cc08 commit 08328a3

File tree

5 files changed

+17
-43
lines changed

5 files changed

+17
-43
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
"dev": "node build/dev-server.js",
99
"build": "node build/build.js",
1010
"server": "nodemon app.js",
11-
"start" : "node app.js"
11+
"start": "node app.js"
1212
},
1313
"dependencies": {
1414
"axios": "^0.15.3",
1515
"body-parser": "^1.16.1",
1616
"express": "^4.14.1",
1717
"jquery": "^3.1.1",
1818
"mongoose": "^4.8.2",
19+
"muse-ui": "^2.0.0-rc.5",
1920
"toastr": "^2.1.2",
2021
"vue": "^2.1.10",
21-
"vue-material": "^0.7.1",
2222
"vue-router": "^2.2.0"
2323
},
2424
"devDependencies": {

src/App.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<template>
22
<div id="app">
3-
<!-- <h2 class="md-dispaly-4 title">{{ title }}</h2> -->
3+
<mu-appbar title="Title">
4+
<mu-icon-button icon='menu' slot="left"/>
5+
<mu-icon-button icon='expand_more' slot="right"/>
6+
</mu-appbar>
47
<router-view></router-view>
58
</div>
69
</template>
@@ -26,7 +29,6 @@ export default {
2629
flex-direction: column;
2730
justify-content: center;
2831
align-items: center;
29-
margin-top: 20px;
3032
}
3133
.title{
3234
letter-spacing: 1px;
File renamed without changes.

src/components/List.vue

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,12 @@
11
<template lang="html">
2-
<md-table-card>
3-
<!-- <md-toolbar>
4-
<h1 class="md-title" style="flex:1;">Movie List</h1>
5-
<md-button class="md-icon-button">
6-
<md-icon>search</md-icon>
7-
</md-button>
8-
</md-toolbar> -->
9-
10-
<md-table-header>
11-
<md-table-row>
12-
<md-table-head>电影海报</md-table-head>
13-
<md-table-head>电影名称</md-table-head>
14-
<md-table-head>上映年份</md-table-head>
15-
<md-table-head>电影类型</md-table-head>
16-
<md-table-head>电影评分</md-table-head>
17-
<md-table-head>操作</md-table-head>
18-
</md-table-row>
19-
</md-table-header>
20-
21-
<md-table-body>
22-
<md-table-row v-for="movie of movies" :key="movie.id">
23-
<md-table-cell><img :src="movie.image" alt=""></md-table-cell>
24-
<md-table-cell>{{ movie.title }}</md-table-cell>
25-
<md-table-cell>{{ movie.genres }}</md-table-cell>
26-
<md-table-cell md-numeric>{{ movie.rating}}</md-table-cell>
27-
<md-table-cell>
28-
<md-button class="md-primary">编辑</md-button>
29-
<md-button class="md-warn">删除</md-button>
30-
</md-tanle-cell>
31-
</md-table-row>
32-
</md-table-body>
33-
34-
</md-table-card>
2+
<div class="list">
3+
List.vue
4+
</div>
355
</template>
366

377
<script>
388
export default {
39-
mounted(){
9+
created(){
4010
this.getMovies()
4111
},
4212
data(){

src/main.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import Vue from 'vue'
22
import App from './App'
33
import toastr from 'toastr'
4+
import MuseUI from 'muse-ui'
45
import axios from 'axios'
5-
import VueMaterial from 'vue-material'
66
import router from './router'
7-
import 'vue-material/dist/vue-material.css'
8-
import './assets/material.font.css'
97
import 'toastr/build/toastr.min.css'
8+
import 'muse-ui/dist/muse-ui.css'
9+
import './assets/icon.css'
10+
11+
Vue.use(MuseUI)
12+
Vue.prototype.$http = axios
1013

1114
toastr.options = {
1215
"closeButton": true,
@@ -31,8 +34,7 @@ toastr.options = {
3134
// return prefix + url
3235
// })
3336

34-
Vue.use(VueMaterial)
35-
Vue.prototype.$http = axios
37+
3638
/* eslint-disable no-new */
3739
new Vue({
3840
created(){

0 commit comments

Comments
 (0)