feat: migrate Toast and Table with reviewed state focus and SSR contracts

This commit is contained in:
maoyingjie
2026-10-24 07:19:26 +08:00
parent 0cfe7b6195
commit ed41af5294
95 changed files with 9358 additions and 8 deletions
@@ -0,0 +1,28 @@
<script setup lang="ts">
import { onBeforeUnmount } from "vue";
import { h } from "vue";
import { IconStar } from "@tabler/icons-vue";
import {
Button,
ToastProvider,
createToastFunction,
ToastQueue,
type ToastContentValue,
} from "@heroui-vue/components";
const queue = new ToastQueue<ToastContentValue>();
onBeforeUnmount(() => queue.destroy());
const toast = createToastFunction(queue);
function show() {
toast("自定义图标指示器", {
indicator: h(IconStar, { class: "size-5", "aria-hidden": "true" }),
});
}
</script>
<template>
<div class="flex flex-col gap-3">
<Button size="sm" variant="secondary" @click="show">自定义指示器</Button>
<ToastProvider :queue="queue" to="body" />
</div>
</template>