@jasperdai/uikit-base-component-vue3
v0.1.0
Published
## 1 Usage
Downloads
66
Readme
vue3-uikit-provider
1 Usage
1.1 Use UIKitProvider Components
<script lang="ts" setup>
import { UIKitProvider } from '@tencentcloud/uikit-base-component-vue3';
</script>
<template>
<UIKitProvider theme="light">
</UIKitProvider>
</template>
1.2 Use Hook useUIKit
<template>
<div>{{ theme }}</div>
<button @click="setTheme('dark')">set theme to dark</button>
<button @click="setTheme('light')">set theme to light</button>
</template>
<script lang="ts" setup>
import { useUIKit } from '@tencentcloud/uikit-base-component-vue3';
const { theme, setTheme } = useUIKit();
</script>