refactor: Link component

This commit is contained in:
Jannat Patel
2026-02-16 19:48:58 +05:30
parent 73b20653f0
commit c1608f8cc4
2 changed files with 150 additions and 195 deletions

View File

@@ -11,7 +11,6 @@
:size="attrs.size || 'sm'"
:variant="attrs.variant"
:placeholder="attrs.placeholder"
:filterable="false"
:readonly="attrs.readonly"
>
<template #target="{ open, togglePopover }">
@@ -95,6 +94,7 @@ const valuePropPassed = computed(() => 'value' in attrs)
const value = computed({
get: () => (valuePropPassed.value ? attrs.value : props.modelValue),
set: (val) => {
console.log('Setting value to:', val)
return (
val?.value &&
emit(valuePropPassed.value ? 'change' : 'update:modelValue', val?.value)