eslint autofixes for vuetify 2

This commit is contained in:
2019-10-01 23:19:40 -07:00
parent e6e060da80
commit 29cf8b8739
18 changed files with 215 additions and 206 deletions

View File

@ -9,7 +9,7 @@
<v-col cols="4">
<v-card>
<DragListHeading title="Sections">
<v-btn @click="showAddSectionDialog = true" icon class="ma-0 pa-0">
<v-btn icon class="ma-0 pa-0" @click="showAddSectionDialog = true">
<v-icon>add</v-icon>
</v-btn>
</DragListHeading>
@ -26,14 +26,14 @@
and so section-drop can cover all interior
-->
<v-list-item-content class="section-parent">
<v-list-item-title v-html="item.name"></v-list-item-title>
<v-list-item-title v-html="item.name"/>
<v-list-item-subtitle
class="caption font-weight-light"
color="grey lighten-2"
>
{{sectionModelCount(item.id)}} {{sectionModelCount(item.id) | pluralize('model') }}
{{ sectionModelCount(item.id) }} {{ sectionModelCount(item.id) | pluralize('model') }}
</v-list-item-subtitle>
<v-list-item-subtitle class="section-drop" :section-id="item.id"></v-list-item-subtitle>
<v-list-item-subtitle class="section-drop" :section-id="item.id"/>
</v-list-item-content>
<v-list-item-action>
@ -67,11 +67,11 @@
@click="selectModel(item.model)"
>
<v-list-item-content>
<v-list-item-title v-html="item.name"></v-list-item-title>
<v-list-item-title v-html="item.name"/>
<v-list-item-subtitle
class="caption font-weight-light"
color="grey lighten-2">
{{item.ids.length}} {{item.ids.length | pluralize('material') }}
{{ item.ids.length }} {{ item.ids.length | pluralize('material') }}
</v-list-item-subtitle>
</v-list-item-content>
@ -101,13 +101,13 @@
<div v-for="item in selectedMaterials" :key="item.id">
<v-hover :key="item.id">
<v-list-item
@click="selectMaterial(item.id)"
slot-scope="{ hover }"
:class="materialListItemClasses(item.id, hover)"
@click="selectMaterial(item.id)"
>
<v-list-item-content>
<v-list-item-title><b>{{ item.id }}</b> {{ item.name }}</v-list-item-title>
<v-list-item-subtitle v-html="item.color"></v-list-item-subtitle>
<v-list-item-subtitle v-html="item.color"/>
</v-list-item-content>
<v-list-item-action>
@ -200,83 +200,6 @@ export default {
},
},
methods: {
sectionModelCount(sectionID) {
let section = this.section(sectionID)
if (section) {
let models = this.sectionModels(section) || []
return models.length
} else {
return 0
}
},
sectionListItemClasses(id, hovering) {
if (id === this.selectedSectionID) {
return 'list-item primary'
} else if (hovering) {
return 'list-item list-hover'
} else {
return 'list-item'
}
},
modelListItemClasses(id, hovering) {
if (id === this.selectedModelID) {
return 'list-item primary'
} else if (hovering) {
return 'list-item list-hover'
} else {
return 'list-item'
}
},
materialListItemClasses(id, hovering) {
if (id === this.selectedMaterialID) {
return 'list-item primary'
} else if (hovering) {
return 'list-item list-hover'
} else {
return 'list-item'
}
},
popSectionInfo(id) {
this.selectSection(id)
this.showSectionInfoDialog = true
},
popSectionDelete(id) {
this.selectSection(id)
this.showSectionDeleteDialog = true
},
popModelInfo(id) {
this.selectModel(id)
this.showModelInfoDialog = true
},
popModelDelete(id) {
this.selectModel(id)
this.showModelDeleteDialog = true
},
popMaterialDelete(id) {
this.selectMaterial(id)
this.showMaterialDeleteDialog = true
},
...mapActions([
'selectSection',
'selectModel',
'selectMaterial',
'reorderSection',
'reorderModel',
'reorderMaterial',
'moveModelToSection',
'moveMaterialToSection',
]),
},
mounted: function() {
let me = this
@ -359,6 +282,84 @@ export default {
},
})
},
methods: {
sectionModelCount(sectionID) {
let section = this.section(sectionID)
if (section) {
let models = this.sectionModels(section) || []
return models.length
} else {
return 0
}
},
sectionListItemClasses(id, hovering) {
if (id === this.selectedSectionID) {
return 'list-item primary'
} else if (hovering) {
return 'list-item list-hover'
} else {
return 'list-item'
}
},
modelListItemClasses(id, hovering) {
if (id === this.selectedModelID) {
return 'list-item primary'
} else if (hovering) {
return 'list-item list-hover'
} else {
return 'list-item'
}
},
materialListItemClasses(id, hovering) {
if (id === this.selectedMaterialID) {
return 'list-item primary'
} else if (hovering) {
return 'list-item list-hover'
} else {
return 'list-item'
}
},
popSectionInfo(id) {
this.selectSection(id)
this.showSectionInfoDialog = true
},
popSectionDelete(id) {
this.selectSection(id)
this.showSectionDeleteDialog = true
},
popModelInfo(id) {
this.selectModel(id)
this.showModelInfoDialog = true
},
popModelDelete(id) {
this.selectModel(id)
this.showModelDeleteDialog = true
},
popMaterialDelete(id) {
this.selectMaterial(id)
this.showMaterialDeleteDialog = true
},
...mapActions([
'selectSection',
'selectModel',
'selectMaterial',
'reorderSection',
'reorderModel',
'reorderMaterial',
'moveModelToSection',
'moveMaterialToSection',
]),
}
}
function addSectionDrops(myvue) {