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 lang="ts">
import { defineComponent, h, inject, useAttrs } from "vue";
import CloseButton from "../close-button/CloseButton.vue";
import { toastContextKey } from "./context";
export default defineComponent({
name: "ToastCloseButton",
inheritAttrs: false,
props: {
isDisabled: { type: Boolean, default: false },
},
setup(props, { slots }) {
const attrs = useAttrs();
const ctx = inject(toastContextKey, null);
return () =>
h(
CloseButton,
{
...attrs,
isDisabled: props.isDisabled,
class: [ctx?.slots.value.close(), attrs.class],
"data-slot": "toast-close",
},
slots,
);
},
});
</script>