Dodano changelog; poprawki reaktywności

This commit is contained in:
2022-08-20 18:07:21 +02:00
parent 6c4c33cb65
commit 9b252cf205
10 changed files with 218 additions and 84 deletions
+22
View File
@@ -0,0 +1,22 @@
import { defineComponent } from 'vue';
import { SceneryRowItem } from '../types/types';
export default defineComponent({
methods: {
getRouteNames(routes: SceneryRowItem['routes']) {
return routes
.split(';')
.map((route) => {
// !Oc_2EPB
const props1 = route.split('_')[0];
const props2 = route.split('_')[1];
const isInternal = props1.startsWith('!');
const name = isInternal ? props1.replace('!', '') : props1;
return `${isInternal ? '<u>' + name + '</u>' : name} <span style='color: #aaa'>(${props2[0]}/${props2[1]}/${
props2[2]
}${props2[3] ? '/B' : ''})</span>`;
})
.join(', ');
},
},
});