Scope
"-scope" is used to make terms denoting an instrument used for viewing or examination.
Example
Show Code
vue
<script lang="ts" setup>
import { RLink, RScope } from 'roughness'
function performTimeConsumingOperation() {
// ...
return 1
}
</script>
<template>
<RScope v-slot="{ result }" :result="performTimeConsumingOperation()">
Result is: <RLink :href="`#result-${result}`">{{ result }}</RLink>
</RScope>
</template>
Usage
Slots
Name | Type | Description |
---|---|---|
default | Attributes of the scope. | Content that needs to be render. |