Refactor #3832 - Update TriStateCheckbox

pull/3868/head
mertsincan 2023-04-14 15:28:17 +03:00
parent c5f81757c6
commit 42538d37cf
1 changed files with 3 additions and 20 deletions

View File

@ -24,7 +24,9 @@
<slot v-else-if="modelValue === false" name="uncheckicon"> <slot v-else-if="modelValue === false" name="uncheckicon">
<component :is="'TimesIcon'" class="p-checkbox-icon" /> <component :is="'TimesIcon'" class="p-checkbox-icon" />
</slot> </slot>
<slot v-else name="nullableicon" /> <slot v-else name="nullableicon">
<span class="p-checkbox-icon"></span>
</slot>
</div> </div>
</div> </div>
</template> </template>
@ -113,25 +115,6 @@ export default {
} }
}, },
computed: { computed: {
icon() {
let icon;
switch (this.modelValue) {
case true:
icon = 'pi pi-check';
break;
case false:
icon = 'pi pi-times';
break;
case null:
icon = null;
break;
}
return icon;
},
containerClass() { containerClass() {
return [ return [
'p-checkbox p-component', 'p-checkbox p-component',