forked from openbmc/webui-vue
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create example BmcTable component to eventually showcase all functionality. For now, it only includes table sort. Signed-off-by: Yoshie Muranaka <[email protected]> Change-Id: Id3f3ac603a58d5dbc8674ec5b2d9d059e935407d
- Loading branch information
1 parent
c36f90e
commit 2e48404
Showing
2 changed files
with
117 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<b-table | ||
hover | ||
show-empty | ||
no-sort-reset | ||
sort-icon-left | ||
responsive="md" | ||
head-variant="light" | ||
table-variant="light" | ||
sort-by="rank" | ||
:items="items" | ||
:fields="fields" | ||
/> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
items: [ | ||
{ | ||
name: 'Veracruz All Natural', | ||
rank: 1, | ||
description: 'Authentic Mexican Food, Smoothies, and Juices' | ||
}, | ||
{ | ||
name: 'Torchy\'s Tacos', | ||
rank: 3, | ||
description: 'At Torchy\'s Tacos, we make food that breaks the mold.' | ||
}, | ||
{ | ||
name: 'Tacodeli', | ||
rank: 2, | ||
description: 'Tacodeli handcrafts Mexican-inspired, creative tacos with local and organic ingredients topped with award-winning salsas.' | ||
}, | ||
], | ||
fields: [ | ||
{ | ||
key: 'name', | ||
label: 'Name', | ||
sortable: true | ||
}, | ||
{ | ||
key: 'rank', | ||
label: 'Rank', | ||
sortable: true | ||
}, | ||
{ | ||
key: 'description', | ||
label: 'Description', | ||
sortable: false | ||
} | ||
] | ||
} | ||
} | ||
} | ||
</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