forked from uditbh/vuetify-material-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7332f23
commit 8f8aed6
Showing
8 changed files
with
247 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<template> | ||
<div | ||
:style="styles" | ||
:class="classes" | ||
class="v-offset" | ||
> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
fullWidth: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
offset: { | ||
type: [Number, String], | ||
default: 0 | ||
} | ||
}, | ||
computed: { | ||
classes () { | ||
return { | ||
'v-offset--full-width': this.fullWidth | ||
} | ||
}, | ||
styles () { | ||
return { | ||
top: `-${this.offset}px`, | ||
marginBottom: `-${this.offset}px` | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
.v-offset { | ||
margin: 0 auto; | ||
max-width: 90%; | ||
position: relative; | ||
} | ||
.v-offset--full-width { | ||
max-width: 100%; | ||
} | ||
</style> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,167 @@ | ||
<template> | ||
<v-container fill-height> | ||
<v-container | ||
fill-height | ||
fluid | ||
grid-list-xl | ||
> | ||
<v-layout | ||
justify-center | ||
align-center | ||
/> | ||
wrap | ||
> | ||
<v-flex | ||
xs12 | ||
md6 | ||
> | ||
<material-card> | ||
<v-card | ||
slot="offset" | ||
color="secondary" | ||
class="elevation-10" | ||
dark | ||
> | ||
<div class="pa-3"> | ||
<div class="title font-weight-light mb-2">Simple Table</div> | ||
<div class="subheading font-weight-thin grey--text text--lighten-2">Here is a subtitle for this table</div> | ||
</div> | ||
</v-card> | ||
|
||
<v-data-table | ||
:headers="headers" | ||
:items="items" | ||
hide-actions | ||
> | ||
<template | ||
slot="headerCell" | ||
slot-scope="{ header }" | ||
> | ||
<span | ||
class="subheading font-weight-light secondary--text text--darken-3" | ||
v-text="header.text" | ||
/> | ||
</template> | ||
<template | ||
slot="items" | ||
slot-scope="{ item }" | ||
> | ||
<td>{{ item.name }}</td> | ||
<td>{{ item.country }}</td> | ||
<td>{{ item.city }}</td> | ||
<td class="text-xs-right">{{ item.salary }}</td> | ||
</template> | ||
</v-data-table> | ||
</material-card> | ||
</v-flex> | ||
<v-flex | ||
xs12 | ||
md6 | ||
> | ||
<material-card | ||
color="transparent" | ||
flat | ||
full-width | ||
> | ||
<v-card | ||
slot="offset" | ||
color="secondary" | ||
class="elevation-10" | ||
dark | ||
> | ||
<div class="pa-3"> | ||
<div class="title font-weight-light mb-2">Table on Plain Background</div> | ||
<div class="subheading font-weight-thin grey--text text--lighten-2">Here is a subtitle for this table</div> | ||
</div> | ||
</v-card> | ||
|
||
<v-data-table | ||
:headers="headers" | ||
:items="items.slice(0, 3)" | ||
hide-actions | ||
> | ||
<template | ||
slot="headerCell" | ||
slot-scope="{ header }" | ||
> | ||
<span | ||
class="subheading font-weight-light secondary--text text--darken-3" | ||
v-text="header.text" | ||
/> | ||
</template> | ||
<template | ||
slot="items" | ||
slot-scope="{ item }" | ||
> | ||
<td>{{ item.name }}</td> | ||
<td>{{ item.country }}</td> | ||
<td>{{ item.city }}</td> | ||
<td class="text-xs-right">{{ item.salary }}</td> | ||
</template> | ||
</v-data-table> | ||
</material-card> | ||
</v-flex> | ||
</v-layout> | ||
</v-container> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
// | ||
data: () => ({ | ||
headers: [ | ||
{ | ||
sortable: false, | ||
text: 'Name', | ||
value: 'name' | ||
}, | ||
{ | ||
sortable: false, | ||
text: 'Country', | ||
value: 'country' | ||
}, | ||
{ | ||
sortable: false, | ||
text: 'City', | ||
value: 'city' | ||
}, | ||
{ | ||
sortable: false, | ||
text: 'Salary', | ||
value: 'salary', | ||
align: 'right' | ||
} | ||
], | ||
items: [ | ||
{ | ||
name: 'Dakota Rice', | ||
country: 'Niger', | ||
city: 'Oud-Tunrhout', | ||
salary: '$35,738' | ||
}, | ||
{ | ||
name: 'Minerva Hooper', | ||
country: 'Curaçao', | ||
city: 'Sinaai-Waas', | ||
salary: '$23,738' | ||
}, { | ||
name: 'Sage Rodriguez', | ||
country: 'Netherlands', | ||
city: 'Overland Park', | ||
salary: '$56,142' | ||
}, { | ||
name: 'Philip Chanley', | ||
country: 'Korea, South', | ||
city: 'Gloucester', | ||
salary: '$38,735' | ||
}, { | ||
name: 'Doris Greene', | ||
country: 'Malawi', | ||
city: 'Feldkirchen in Kārnten', | ||
salary: '$63,542' | ||
}, { | ||
name: 'Mason Porter', | ||
country: 'Chile', | ||
city: 'Gloucester', | ||
salary: '$78,615' | ||
} | ||
] | ||
}) | ||
} | ||
</script> |
This file contains 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