Skip to content

Commit

Permalink
demand loading
Browse files Browse the repository at this point in the history
  • Loading branch information
showonne committed Jun 29, 2016
1 parent 6418aef commit 1d51270
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .babelrc
@@ -1,5 +1,10 @@
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"],
"plugins": ["transform-runtime", ["component", [
{
"libraryName": "mint-ui",
"style": true
}
]]],
"comments": false
}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -18,6 +18,7 @@
"devDependencies": {
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-component": "^0.3.3",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
Expand Down
7 changes: 5 additions & 2 deletions src/components/App.vue
Expand Up @@ -23,15 +23,18 @@
<script>
import { TabItem, Tabbar } from 'mint-ui'
export default {
components: { TabItem, Tabbar },
components: {
'mt-tab-item': TabItem,
'mt-tabbar': Tabbar
},
computed: {
isWelcom() {
return this.$route.path === '/' || this.$route.path === '/login'
}
},
data() {
return {
channel: this.$route.path.slice(1)
channel: this.$route.path.split('/')[1]
}
},
watch: {
Expand Down
4 changes: 3 additions & 1 deletion src/components/Detail.vue
Expand Up @@ -51,7 +51,9 @@
<script>
import { Header, Indicator, MessageBox, Toast } from 'mint-ui'
export default {
components: { 'mtHeader': { Header }, Indicator, MessageBox, Toast },
components: {
'mt-header': Header
},
data() {
return {
content: {
Expand Down
5 changes: 4 additions & 1 deletion src/components/Login.vue
Expand Up @@ -8,7 +8,10 @@
<script>
import { Field, Button } from 'mint-ui'
export default {
components: { Field, Button },
components: {
'mt-field': Field,
'mt-button': Button
},
props: [{
name: 'tocken',
default: ''
Expand Down
7 changes: 6 additions & 1 deletion src/components/Topic.vue
Expand Up @@ -36,7 +36,12 @@
<script>
import { Loadmore, Navbar, TabItem, Indicator, Tabbar } from 'mint-ui'
export default {
components: { Loadmore, Navbar, TabItem, Tabbar },
components: {
'mt-loadmore': Loadmore,
'mt-navbar': Navbar,
'mt-tab-item': TabItem,
'mt-tabbar': Tabbar
},
data() {
return {
dataList: [],
Expand Down
1 change: 0 additions & 1 deletion src/components/User.vue
Expand Up @@ -33,7 +33,6 @@
</template>

<script>
import { Tabbar, TabItem } from 'mint-ui'
export default {
data() {
return {
Expand Down
6 changes: 3 additions & 3 deletions src/main.js
@@ -1,12 +1,12 @@
import Vue from 'vue'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
//import MintUI from 'mint-ui'
//import 'mint-ui/lib/style.css'
import VueResource from 'vue-resource'
import VueRouter from 'vue-router'

require('./assets/less/global.less')

Vue.use(MintUI)
// Vue.use(MintUI)
Vue.use(VueResource)
Vue.use(VueRouter)

Expand Down

0 comments on commit 1d51270

Please sign in to comment.