format: apply repo prettier (3.8.1) to the folded skills tree
963 markdown files reformatted with the repository's pinned prettier so pnpm format:check covers the folded tree like every other repo file. The formatter's embedded-language pass also normalized code fences (TS semicolons, closed HTML tags in examples, lowercased CSS hex colors, one renumbered list that skipped an index). Alphanumeric token deltas vs the fold commit were audited file-by-file; all are formatter-equivalent markup normalizations plus the four sanitized skills.
This commit is contained in:
@@ -10,16 +10,16 @@ Retrieves the underlying DOM element from a Vue ref or component instance
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { unrefElement } from '@vueuse/core'
|
||||
import { onMounted, useTemplateRef } from 'vue'
|
||||
import { unrefElement } from '@vueuse/core';
|
||||
import { onMounted, useTemplateRef } from 'vue';
|
||||
|
||||
const div = useTemplateRef('div') // will be bound to the <div> element
|
||||
const hello = useTemplateRef('hello') // will be bound to the HelloWorld Component
|
||||
const div = useTemplateRef('div'); // will be bound to the <div> element
|
||||
const hello = useTemplateRef('hello'); // will be bound to the HelloWorld Component
|
||||
|
||||
onMounted(() => {
|
||||
console.log(unrefElement(div)) // the <div> element
|
||||
console.log(unrefElement(hello)) // the root element of the HelloWorld Component
|
||||
})
|
||||
console.log(unrefElement(div)); // the <div> element
|
||||
console.log(unrefElement(hello)); // the root element of the HelloWorld Component
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -31,18 +31,13 @@ onMounted(() => {
|
||||
## Type Declarations
|
||||
|
||||
```ts
|
||||
export type VueInstance = ComponentPublicInstance
|
||||
export type MaybeElementRef<T extends MaybeElement = MaybeElement> = MaybeRef<T>
|
||||
export type MaybeComputedElementRef<T extends MaybeElement = MaybeElement> =
|
||||
MaybeRefOrGetter<T>
|
||||
export type MaybeElement =
|
||||
| HTMLElement
|
||||
| SVGElement
|
||||
| VueInstance
|
||||
| undefined
|
||||
| null
|
||||
export type UnRefElementReturn<T extends MaybeElement = MaybeElement> =
|
||||
T extends VueInstance ? Exclude<MaybeElement, VueInstance> : T | undefined
|
||||
export type VueInstance = ComponentPublicInstance;
|
||||
export type MaybeElementRef<T extends MaybeElement = MaybeElement> = MaybeRef<T>;
|
||||
export type MaybeComputedElementRef<T extends MaybeElement = MaybeElement> = MaybeRefOrGetter<T>;
|
||||
export type MaybeElement = HTMLElement | SVGElement | VueInstance | undefined | null;
|
||||
export type UnRefElementReturn<T extends MaybeElement = MaybeElement> = T extends VueInstance
|
||||
? Exclude<MaybeElement, VueInstance>
|
||||
: T | undefined;
|
||||
/**
|
||||
* Get the dom element of a ref of element or Vue component instance
|
||||
*
|
||||
@@ -50,5 +45,5 @@ export type UnRefElementReturn<T extends MaybeElement = MaybeElement> =
|
||||
*/
|
||||
export declare function unrefElement<T extends MaybeElement>(
|
||||
elRef: MaybeComputedElementRef<T>,
|
||||
): UnRefElementReturn<T>
|
||||
): UnRefElementReturn<T>;
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user