Last active
June 2, 2018 00:23
-
-
Save mamcx/63ded3e86f071b7d842e674736ed54d8 to your computer and use it in GitHub Desktop.
Vuetify components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ListCustomersPage = { | |
key: 'ListCustomersPage', | |
template: '#ListCustomersPage', | |
data() { | |
return { | |
title: 'Select Customer', | |
search:'' | |
} | |
}, | |
mounted() { | |
customerStore.dispatch('search',this.search); | |
}, | |
computed:{ | |
items() { | |
return customerStore.state.data; | |
}, | |
searching() { | |
return customerStore.state.searching; | |
} | |
}, | |
methods: { | |
doSearch() { | |
customerStore.dispatch('search',this.search); | |
}, | |
push() { | |
} | |
} | |
}; | |
const toolbar = { | |
template: '#toolbar', | |
props: ['title', 'action'] | |
}; | |
const cellcustomer = { | |
template: '#cellCustomer', | |
props: ['item'] | |
}; | |
new Vue({ | |
el: '#app', | |
template: '#ListCustomersPage', | |
components: { toolbar, cellcustomer }, | |
data() { | |
return { | |
}; | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="format-detection" content="telephone=no"> | |
<meta name="msapplication-tap-highlight" content="no"> | |
<meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet" type="text/css"> | |
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet" type="text/css"></link> | |
<script src="js/vue.js"></script> | |
<script src="js/vuex.js"></script> | |
<script src="https://unpkg.com/vuetify/dist/vuetify.js"></script> | |
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script> | |
</head> | |
<body> | |
<template id="toolbar"> | |
<v-toolbar dark color="primary"> | |
<v-toolbar-side-icon></v-toolbar-side-icon> | |
<v-toolbar-title class="white--text">{{title}}</v-toolbar-title> | |
</v-toolbar> | |
</template> | |
<template id="cellCustomer"> | |
</template> | |
<template id="ListCustomersPage"> | |
<v-app> | |
<toolbar :title="title"></toolbar> | |
</v-app> | |
</template> | |
<div id="app"></div> | |
<script src="js/app.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment