From 5689942a23938c39a6d47e7163b585c9bf2ed6e4 Mon Sep 17 00:00:00 2001 From: betavs <34408516+betavs@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:52:02 +0800 Subject: [PATCH] refactor(toast): sfc to tsx (#1397) * refactor(toast): sfc to tsx * perf(toast): sfc to tsx * test(config-provider): snap update * perf(toast): sfc to tsx --- src/toast/__test__/index.test.jsx | 2 +- src/toast/index.ts | 2 +- src/toast/{toast.vue => toast.tsx} | 120 +++++++++++++++-------------- 3 files changed, 66 insertions(+), 58 deletions(-) rename src/toast/{toast.vue => toast.tsx} (61%) diff --git a/src/toast/__test__/index.test.jsx b/src/toast/__test__/index.test.jsx index 707651bbf..7446acc51 100644 --- a/src/toast/__test__/index.test.jsx +++ b/src/toast/__test__/index.test.jsx @@ -1,5 +1,5 @@ import { describe, it, expect, vi } from 'vitest'; -import Toast from '../toast.vue'; +import Toast from '../toast'; import Overlay from '../../overlay'; import { mount } from '@vue/test-utils'; import { LoadingIcon } from 'tdesign-icons-vue-next'; diff --git a/src/toast/index.ts b/src/toast/index.ts index d770546ef..db9a8340a 100644 --- a/src/toast/index.ts +++ b/src/toast/index.ts @@ -1,5 +1,5 @@ import { createApp, App, DefineComponent } from 'vue'; -import vueToast from './toast.vue'; +import vueToast from './toast'; import { TdToastProps } from './type'; import { WithInstallType, isBrowser } from '../shared'; diff --git a/src/toast/toast.vue b/src/toast/toast.tsx similarity index 61% rename from src/toast/toast.vue rename to src/toast/toast.tsx index 97202e236..c0a2e9dc4 100644 --- a/src/toast/toast.vue +++ b/src/toast/toast.tsx @@ -1,21 +1,6 @@ - - -