mirror of https://github.com/rancher/dashboard.git
32 lines
546 B
Vue
32 lines
546 B
Vue
<script>
|
|
|
|
export default {
|
|
props: {
|
|
// When sortabletable calculates these values it converts null and undefined to ''
|
|
// passing '' to a prop typed as Boolean coerces it to true
|
|
value: {
|
|
type: [String, Boolean],
|
|
default: true
|
|
},
|
|
},
|
|
|
|
computed: {
|
|
checked() {
|
|
return this.value === true || this.value === 'true';
|
|
}
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<span v-if="checked">
|
|
<i class="icon icon-checkmark" />
|
|
</span>
|
|
<span
|
|
v-else
|
|
class="text-muted"
|
|
>
|
|
—
|
|
</span>
|
|
</template>
|