Skip to content

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>
Result is: 1

Usage

Slots

NameTypeDescription
defaultAttributes of the scope.

Content that needs to be render.

Released under the ISC License.