cateditor: improve contents layout
This commit is contained in:
@ -1,60 +1,65 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<v-card>
|
||||
<v-card flat color="grey lighten-4" >
|
||||
<v-card-title>Sections</v-card-title>
|
||||
</v-card>
|
||||
|
||||
<!-- <v-toolbar dense>
|
||||
<v-toolbar-title>Sections</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon>
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-icon v-on="on">add</v-icon>
|
||||
</template>
|
||||
<span>Add new section</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
</v-toolbar> -->
|
||||
|
||||
<draggable v-model="sections" group="categories">
|
||||
<div v-for="item in sections" :key="item.id">
|
||||
<v-hover :key="item.id">
|
||||
<v-list-tile
|
||||
slot-scope="{ hover }"
|
||||
:class="listItemClasses(item.id, hover)"
|
||||
@click="selectSection(item.id)"
|
||||
>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-html="item.name"></v-list-tile-title>
|
||||
<v-list-tile-sub-title color="text--grey lighten-1">12 models</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
|
||||
<v-list-tile-action>
|
||||
<span class="group">
|
||||
<v-btn icon @click.stop="popInfo(item.id)">
|
||||
<v-icon small color="grey lighten-1">info</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click.stop="popDelete(item.id)">
|
||||
<v-icon small color="grey lighten-1">delete</v-icon>
|
||||
</v-btn>
|
||||
</span>
|
||||
</v-list-tile-action>
|
||||
|
||||
</v-list-tile>
|
||||
</v-hover>
|
||||
</div>
|
||||
</draggable>
|
||||
<v-card>
|
||||
<v-card class="subheading font-weight-bold pa-2" color="grey lighten-2">
|
||||
Sections
|
||||
</v-card>
|
||||
|
||||
<!-- <v-toolbar dense>
|
||||
<v-toolbar-title>Sections</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon>
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-icon v-on="on">add</v-icon>
|
||||
</template>
|
||||
<span>Add new section</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
</v-toolbar> -->
|
||||
|
||||
<v-card flat class="scroll-area">
|
||||
<draggable v-model="sections" group="categories">
|
||||
<div v-for="item in sections" :key="item.id">
|
||||
<v-hover :key="item.id">
|
||||
<v-list-tile
|
||||
slot-scope="{ hover }"
|
||||
:class="listItemClasses(item.id, hover)"
|
||||
@click="selectSection(item.id)"
|
||||
>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-html="item.name"></v-list-tile-title>
|
||||
<v-list-tile-sub-title
|
||||
class="caption font-weight-light"
|
||||
color="grey lighten-2">
|
||||
12 models
|
||||
</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
|
||||
<v-list-tile-action>
|
||||
<span class="group">
|
||||
<v-btn icon @click.stop="popInfo(item.id)">
|
||||
<v-icon small color="grey lighten-1">info</v-icon>
|
||||
</v-btn>
|
||||
<v-btn icon @click.stop="popDelete(item.id)">
|
||||
<v-icon small color="grey lighten-1">delete</v-icon>
|
||||
</v-btn>
|
||||
</span>
|
||||
</v-list-tile-action>
|
||||
|
||||
</v-list-tile>
|
||||
</v-hover>
|
||||
</div>
|
||||
</draggable>
|
||||
</v-card>
|
||||
|
||||
<SectionInfoDialog v-model="showSectionPopup" v-bind:section="selectedSectionID"/>
|
||||
<SectionDeleteDialog v-model="showDeleteSectionPopup" v-bind:section="selectedSectionID"/>
|
||||
|
||||
<!--<v-flex xs5>
|
||||
<RawDisplayer :value="sections" title="Data" />
|
||||
</v-flex>-->
|
||||
|
||||
<SectionInfoDialog v-model="showSectionPopup" v-bind:section="selectedSectionID"/>
|
||||
<SectionDeleteDialog v-model="showDeleteSectionPopup" v-bind:section="selectedSectionID"/>
|
||||
</v-container>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -116,5 +121,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.scroll-area {
|
||||
height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user