mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
chore: improve types (#115)
* wip: improve types * feat: improve types * Apply suggestions from code review Co-authored-by: Sylvain Marroufin <marroufin.sylvain@gmail.com> * chore: update * chore: enable ci typecheck * chore: fix Co-authored-by: Sylvain Marroufin <marroufin.sylvain@gmail.com>
This commit is contained in:
@@ -134,6 +134,7 @@ onMounted(() => {
|
||||
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
// @ts-expect-error internals
|
||||
const popoverProvides = comboboxInput.value?.$.provides
|
||||
if (!popoverProvides) {
|
||||
return
|
||||
@@ -203,7 +204,7 @@ function onClear () {
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
updateQuery: (q) => {
|
||||
updateQuery: (q: string) => {
|
||||
query.value = q
|
||||
},
|
||||
comboboxApi,
|
||||
|
||||
@@ -72,7 +72,7 @@ defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
function highlight ({ indices, value }, i = 1) {
|
||||
function highlight ({ indices, value }: { indices: number[][], value:string }, i = 1): string {
|
||||
const pair = indices[indices.length - i]
|
||||
if (!pair) {
|
||||
return value
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
v-slot="{ isActive }"
|
||||
:key="index"
|
||||
v-bind="link"
|
||||
:class="[baseClass, spacingClass]"
|
||||
:class="[baseClass, spacingClass].join(' ')"
|
||||
:active-class="activeClass"
|
||||
:inactive-class="inactiveClass"
|
||||
@click="link.click && link.click()"
|
||||
|
||||
Reference in New Issue
Block a user