#2161 bug fixe
This commit is contained in:
@@ -101,7 +101,7 @@ export default {
|
||||
let itemparts, icon, newspan
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
itemparts = RegExp(/<span[^>]*class="([^"]+)"[^>]*>.+<\/span>/g).exec(items[i], 'g')
|
||||
console.log('itemparts', itemparts)
|
||||
// console.log('itemparts', itemparts)
|
||||
switch (itemparts[1]) {
|
||||
case 'placeName':
|
||||
icon = '<span class="index-item-icon mdi mdi-map-marker"></span>'
|
||||
|
||||
@@ -51,11 +51,15 @@ export default {
|
||||
},
|
||||
created () {
|
||||
let max = 40
|
||||
if (this.result.title.length > max) {
|
||||
let subString = this.result.title.substr(0, max)
|
||||
this.shorted_title = subString.substr(0, subString.lastIndexOf(' ')) + ' …'
|
||||
if (this.result.title) {
|
||||
if (this.result.title.length > max) {
|
||||
let subString = this.result.title.substr(0, max)
|
||||
this.shorted_title = subString.substr(0, subString.lastIndexOf(' ')) + ' …'
|
||||
} else {
|
||||
this.shorted_title = this.result.title
|
||||
}
|
||||
} else {
|
||||
this.shorted_title = this.result.title
|
||||
console.warn(`no result title for ${this.result.uuid}`, this.result)
|
||||
}
|
||||
// if (this.result.extract) {
|
||||
// const subString = this.result.extract.substr(0, 80)
|
||||
|
||||
Reference in New Issue
Block a user