search results sorting #804, better transitions between succesive searches

This commit is contained in:
2020-07-26 00:18:07 +02:00
parent 57e869bfd5
commit 3ed132147c
5 changed files with 200 additions and 45 deletions
+11 -11
View File
@@ -35,9 +35,9 @@ export default {
required: true
}
},
data: () => ({
preview: ''
}),
// data: () => ({
// preview: ''
// }),
computed: {
...mapState({
editionsbyuuid: state => state.Corpus.editionsbyuuid
@@ -46,14 +46,14 @@ export default {
return this.editionsbyuuid[this.result.textId].title
}
},
created () {
if (this.result.extract) {
const subString = this.result.extract.substr(0, 80)
this.preview = subString.substr(0, subString.lastIndexOf(' ')) + ' …'
} else {
console.warn(`No extract for ${this.result.textId}/${this.result.uuid}`)
}
},
// created () {
// if (this.result.extract) {
// const subString = this.result.extract.substr(0, 80)
// this.preview = subString.substr(0, subString.lastIndexOf(' ')) + ' …'
// } else {
// console.warn(`No extract for ${this.result.textId}/${this.result.uuid}`)
// }
// },
methods: {
...mapActions({
addHistoryItem: 'History/addItem'