Location group name cache

This commit is contained in:
Natsumi
2022-12-11 22:01:44 +13:00
parent 8e83c626d2
commit db298a4d20
4 changed files with 144 additions and 68 deletions

View File

@@ -79,19 +79,27 @@ Vue.component('marquee-text', MarqueeText);
Vue.component('location', {
template:
'<span><span style="margin-right:5px">{{ text }}</span><span class="flags" :class="region" style="display:inline-block;margin-bottom:2px"></span><i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>',
'<span><span style="margin-right:5px">{{ text }}</span>' +
'<span v-if="groupName" style="margin-right:5px">{{ groupName }}</span>' +
'<span class="flags" :class="region" style="display:inline-block;margin-bottom:2px"></span>' +
'<i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>',
props: {
location: String,
hint: {
type: String,
default: ''
},
grouphint: {
type: String,
default: ''
}
},
data() {
return {
text: this.location,
region: this.region,
strict: this.strict
strict: this.strict,
groupName: this.groupName
};
},
methods: {
@@ -130,6 +138,7 @@ Vue.component('marquee-text', MarqueeText);
}
}
this.strict = L.strict;
this.groupName = this.grouphint;
}
},
watch: {