You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/WebMVC/wwwroot/components/shared/display/selectlist.html

21 lines
679 B

<template>
<div :title="currentValue">{{currentValue}}</div>
</template>
<script>
export default {
props: ['name', 'value', 'data', 'enum'],
computed: {
currentValue: function () {
if (this.value === undefined || this.value === null) {
return '';
}
else if (this.data[this.value]) {
return this.data[this.value]
}
else {
return Enumerable.from(this.data[this.name + 'SelectList']).firstOrDefault(o => o.value === this.value.toString()).text;
}
}
}
};
</script>