|
|
@@ -1,7 +1,9 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { Page } from '@vben/common-ui';
|
|
|
|
|
|
-import { Button, Card, message, notification, Space } from 'ant-design-vue';
|
|
|
+import { Button, Card, Space } from 'tdesign-vue-next';
|
|
|
+
|
|
|
+import { message, notification } from '#/adapter/tdesign';
|
|
|
|
|
|
type NotificationType = 'error' | 'info' | 'success' | 'warning';
|
|
|
|
|
|
@@ -26,8 +28,7 @@ function success() {
|
|
|
function notify(type: NotificationType) {
|
|
|
notification[type]({
|
|
|
duration: 2500,
|
|
|
- message: '说点啥呢',
|
|
|
- type,
|
|
|
+ title: '说点啥呢',
|
|
|
});
|
|
|
}
|
|
|
</script>
|
|
|
@@ -35,20 +36,20 @@ function notify(type: NotificationType) {
|
|
|
<template>
|
|
|
<Page
|
|
|
description="支持多语言,主题功能集成切换等"
|
|
|
- title="Ant Design Vue组件使用演示"
|
|
|
+ title="TDesign Vue组件使用演示"
|
|
|
>
|
|
|
<Card class="mb-5" title="按钮">
|
|
|
<Space>
|
|
|
<Button>Default</Button>
|
|
|
- <Button type="primary"> Primary </Button>
|
|
|
- <Button> Info </Button>
|
|
|
- <Button danger> Error </Button>
|
|
|
+ <Button theme="primary"> Primary </Button>
|
|
|
+ <Button theme="default"> Info </Button>
|
|
|
+ <Button theme="danger"> Error </Button>
|
|
|
</Space>
|
|
|
</Card>
|
|
|
<Card class="mb-5" title="Message">
|
|
|
<Space>
|
|
|
<Button @click="info"> 信息 </Button>
|
|
|
- <Button danger @click="error"> 错误 </Button>
|
|
|
+ <Button theme="danger" @click="error"> 错误 </Button>
|
|
|
<Button @click="warning"> 警告 </Button>
|
|
|
<Button @click="success"> 成功 </Button>
|
|
|
</Space>
|
|
|
@@ -57,7 +58,7 @@ function notify(type: NotificationType) {
|
|
|
<Card class="mb-5" title="Notification">
|
|
|
<Space>
|
|
|
<Button @click="notify('info')"> 信息 </Button>
|
|
|
- <Button danger @click="notify('error')"> 错误 </Button>
|
|
|
+ <Button theme="danger" @click="notify('error')"> 错误 </Button>
|
|
|
<Button @click="notify('warning')"> 警告 </Button>
|
|
|
<Button @click="notify('success')"> 成功 </Button>
|
|
|
</Space>
|