forked from epicmaxco/vuestic-admin
-
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.
Merge pull request epicmaxco#148 from asvae/tree-view
Tree view
- Loading branch information
Showing
29 changed files
with
7,406 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ node_modules/ | |
dist/ | ||
npm-debug.log | ||
package-lock.json | ||
/yarn-error.log | ||
.idea/ |
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 |
---|---|---|
|
@@ -210,5 +210,4 @@ | |
transform: translateY(0); | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<template> | ||
<div class="sets-list row"> | ||
<div class="col-md-12"> | ||
<div class="row"> | ||
|
||
<div class="small-set col-lg-6"> | ||
<vuestic-widget :headerText="$t('treeView.basic')"> | ||
<tree-view-basic-preview/> | ||
</vuestic-widget> | ||
</div> | ||
|
||
<div class="small-set col-lg-6"> | ||
<vuestic-widget :headerText="$t('treeView.icons')"> | ||
<tree-view-icons-preview/> | ||
</vuestic-widget> | ||
</div> | ||
|
||
<div class="small-set col-lg-6"> | ||
<vuestic-widget :headerText="$t('treeView.advanced')"> | ||
<tree-view-advanced-preview/> | ||
</vuestic-widget> | ||
</div> | ||
|
||
|
||
<div class="small-set col-lg-6"> | ||
<vuestic-widget :headerText="$t('treeView.editable')"> | ||
<tree-view-editable-preview/> | ||
</vuestic-widget> | ||
</div> | ||
|
||
<div class="small-set col-lg-6"> | ||
<vuestic-widget :headerText="$t('treeView.selectable')"> | ||
<tree-view-selectable-preview/> | ||
</vuestic-widget> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import VuesticWidget | ||
from '../../../vuestic-theme/vuestic-components/vuestic-widget/VuesticWidget.vue' | ||
import TreeViewBasicPreview from './TreeViewBasicPreview' | ||
import TreeViewIconsPreview from './TreeViewIconsPreview' | ||
import TreeViewSelectablePreview from './TreeViewSelectablePreview' | ||
import TreeViewAdvancedPreview from './TreeViewAdvancedPreview' | ||
import TreeViewEditablePreview from './TreeViewEditablePreview' | ||
export default { | ||
name: 'tree-view', | ||
components: { | ||
TreeViewEditablePreview, | ||
TreeViewAdvancedPreview, | ||
TreeViewSelectablePreview, | ||
TreeViewIconsPreview, | ||
TreeViewBasicPreview, | ||
VuesticWidget | ||
}, | ||
data () { | ||
return { | ||
treeViewData: {} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<div class="tree-view-advanced-preview"> | ||
<div class="row mb-4"> | ||
<div class="small-set col-sm-6 d-flex justify-content-center"> | ||
<button class="btn btn-primary btn-micro" | ||
@click="$refs.treeView.expand()" | ||
> | ||
EXPAND ALL | ||
</button> | ||
</div> | ||
<div class="small-set col-sm-6 d-flex justify-content-center"> | ||
<button class="btn btn-primary btn-micro" | ||
@click="$refs.treeView.collapse()" | ||
> | ||
COLLAPSE ALL | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<vuestic-tree-root ref="treeView"> | ||
<vuestic-tree-category label="Electronics"> | ||
<vuestic-tree-node>Cellphones</vuestic-tree-node> | ||
<vuestic-tree-node>Camera Body Kits</vuestic-tree-node> | ||
<vuestic-tree-node>External HDDs</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
<vuestic-tree-category isOpen label="Products"> | ||
<vuestic-tree-category label="Cables"> | ||
<vuestic-tree-node>Audio</vuestic-tree-node> | ||
<vuestic-tree-node>Video</vuestic-tree-node> | ||
<vuestic-tree-node>Optical</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
<vuestic-tree-node>Monitors</vuestic-tree-node> | ||
<vuestic-tree-node>Keyboards</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
<vuestic-tree-category label="Apparel"> | ||
<vuestic-tree-node>Jackets</vuestic-tree-node> | ||
<vuestic-tree-node>Pants</vuestic-tree-node> | ||
<vuestic-tree-node>Skirts</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
</vuestic-tree-root> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'tree-view-advanced-preview', | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<template> | ||
<vuestic-tree-root> | ||
<vuestic-tree-category label="Electronics"> | ||
<vuestic-tree-node>Cellphones</vuestic-tree-node> | ||
<vuestic-tree-node>Camera Body Kits</vuestic-tree-node> | ||
<vuestic-tree-node>External HDDs</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
<vuestic-tree-category isOpen label="Products"> | ||
<vuestic-tree-category label="Cables"> | ||
<vuestic-tree-node>Audio</vuestic-tree-node> | ||
<vuestic-tree-node>Video</vuestic-tree-node> | ||
<vuestic-tree-node>Optical</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
<vuestic-tree-node>Monitors</vuestic-tree-node> | ||
<vuestic-tree-node>Keyboards</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
<vuestic-tree-category label="Apparel"> | ||
<vuestic-tree-node>Jackets</vuestic-tree-node> | ||
<vuestic-tree-node>Pants</vuestic-tree-node> | ||
<vuestic-tree-node>Skirts</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
</vuestic-tree-root> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'tree-view-basic-preview', | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<template> | ||
<vuestic-tree-root> | ||
|
||
<vuestic-tree-category label="Electronics"> | ||
<vuestic-tree-node v-for="electronic in electronics" :key="electronic.id"> | ||
<div class="form-group"> | ||
<div class="input-group"> | ||
<input v-model="electronic.name"> | ||
<i class="bar"></i> | ||
</div> | ||
</div> | ||
</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
|
||
<vuestic-tree-category isOpen label="Products"> | ||
<vuestic-tree-node v-for="product in products" :key="product.id"> | ||
<div class="form-group"> | ||
<div class="input-group"> | ||
<input v-model="product.name"> | ||
<i class="bar"></i> | ||
</div> | ||
</div> | ||
<div slot="iconRight" class="icon" @click="removeProduct(product)"> | ||
<span aria-hidden="true" class="ion ion-md-close"/> | ||
</div> | ||
</vuestic-tree-node> | ||
<vuestic-tree-node> | ||
<button class="btn btn-primary btn-micro mb-2" | ||
@click="addProduct()" | ||
> | ||
Add new product | ||
</button> | ||
</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
|
||
</vuestic-tree-root> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'tree-view-editable-preview', | ||
data () { | ||
return { | ||
electronics: [ | ||
{ id: 1, name: 'Cellphones' }, | ||
{ id: 2, name: 'Camera Body Kits' }, | ||
{ id: 3, name: 'External HDDs' }, | ||
], | ||
products: [ | ||
{ id: 4, name: 'Cables' }, | ||
{ id: 5, name: 'Monitors' }, | ||
{ id: 6, name: 'Keyboards' }, | ||
], | ||
} | ||
}, | ||
methods: { | ||
addProduct () { | ||
this.products.push({ | ||
id: this.products[this.products.length - 1].id, | ||
name: 'New product' | ||
}) | ||
}, | ||
removeProduct (product) { | ||
this.products = this.products.filter(productToFilter => productToFilter !== product) | ||
} | ||
}, | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<template> | ||
<vuestic-tree-root> | ||
<vuestic-tree-category label="Images"> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-images"/> | ||
</div> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-image"/> | ||
</div> | ||
sick_catz_cuddling.jpg | ||
</vuestic-tree-node> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-image"/> | ||
</div> | ||
pins-and-needles.jpg | ||
</vuestic-tree-node> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-image"/> | ||
</div> | ||
avatar_50x50.jpg | ||
</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
<vuestic-tree-category label="Music" isOpen> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-star-outline"/> | ||
</div> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-musical-notes"/> | ||
</div> | ||
Taylor_swift_hello.mp3 | ||
</vuestic-tree-node> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-musical-notes"/> | ||
</div> | ||
straight_to_the_bank.wav | ||
</vuestic-tree-node> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-musical-notes"/> | ||
</div> | ||
imagine_dragons_promo.mp3 | ||
</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
<vuestic-tree-category label="Miscellaneous"> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-list"/> | ||
</div> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-grid"/> | ||
</div> | ||
dump.sql | ||
</vuestic-tree-node> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-help"/> | ||
</div> | ||
unknown-file | ||
</vuestic-tree-node> | ||
<vuestic-tree-node> | ||
<div slot="icon" class="icon"> | ||
<span aria-hidden="true" class="ion ion-md-key"/> | ||
</div> | ||
secure.key | ||
</vuestic-tree-node> | ||
</vuestic-tree-category> | ||
</vuestic-tree-root> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'tree-view-icons-preview', | ||
} | ||
</script> |
Oops, something went wrong.