11<script lang="ts" setup>
22import { Page } from ' @vben/common-ui' ;
33
4- import { Button , Card , message , notification , Space } from ' ant-design-vue' ;
4+ import { Button , Card , Space } from ' tdesign-vue-next' ;
5+
6+ import { message , notification } from ' #/adapter/tdesign' ;
57
68type NotificationType = ' error' | ' info' | ' success' | ' warning' ;
79
@@ -26,29 +28,28 @@ function success() {
2628function notify(type : NotificationType ) {
2729 notification [type ]({
2830 duration: 2500 ,
29- message: ' 说点啥呢' ,
30- type ,
31+ title: ' 说点啥呢' ,
3132 });
3233}
3334 </script >
3435
3536<template >
3637 <Page
3738 description =" 支持多语言,主题功能集成切换等"
38- title =" Ant Design Vue组件使用演示"
39+ title =" TDesign Vue组件使用演示"
3940 >
4041 <Card class =" mb-5" title =" 按钮" >
4142 <Space >
4243 <Button >Default</Button >
43- <Button type =" primary" > Primary </Button >
44- <Button > Info </Button >
45- <Button danger > Error </Button >
44+ <Button theme =" primary" > Primary </Button >
45+ <Button theme = " default " > Info </Button >
46+ <Button theme = " danger" > Error </Button >
4647 </Space >
4748 </Card >
4849 <Card class =" mb-5" title =" Message" >
4950 <Space >
5051 <Button @click =" info" > 信息 </Button >
51- <Button danger @click =" error" > 错误 </Button >
52+ <Button theme = " danger" @click =" error" > 错误 </Button >
5253 <Button @click =" warning" > 警告 </Button >
5354 <Button @click =" success" > 成功 </Button >
5455 </Space >
@@ -57,7 +58,7 @@ function notify(type: NotificationType) {
5758 <Card class =" mb-5" title =" Notification" >
5859 <Space >
5960 <Button @click =" notify('info')" > 信息 </Button >
60- <Button danger @click =" notify('error')" > 错误 </Button >
61+ <Button theme = " danger" @click =" notify('error')" > 错误 </Button >
6162 <Button @click =" notify('warning')" > 警告 </Button >
6263 <Button @click =" notify('success')" > 成功 </Button >
6364 </Space >
0 commit comments