Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
67 lines
1.7 KiB
Vue
67 lines
1.7 KiB
Vue
<script lang="ts" setup>
|
|
import { Page } from '@vben/common-ui';
|
|
|
|
import { Button, Card, message, notification, Space } from 'antdv-next';
|
|
|
|
type NotificationType = 'error' | 'info' | 'success' | 'warning';
|
|
|
|
function info() {
|
|
message.info('How many roads must a man walk down');
|
|
}
|
|
|
|
function error() {
|
|
message.error({
|
|
content: 'Once upon a time you dressed so fine',
|
|
duration: 2.5,
|
|
});
|
|
}
|
|
|
|
function warning() {
|
|
message.warning('How many roads must a man walk down');
|
|
}
|
|
function success() {
|
|
message.success('Cause you walked hand in hand With another man in my place');
|
|
}
|
|
|
|
function notify(type: NotificationType) {
|
|
notification[type]({
|
|
duration: 2.5,
|
|
title: '说点啥呢',
|
|
type,
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<Page
|
|
description="支持多语言,主题功能集成切换等"
|
|
title="Ant Design Vue组件使用演示"
|
|
>
|
|
<Card class="mb-5" title="按钮">
|
|
<Space>
|
|
<Button>Default</Button>
|
|
<Button type="primary"> Primary </Button>
|
|
<Button> Info </Button>
|
|
<Button danger> Error </Button>
|
|
</Space>
|
|
</Card>
|
|
<Card class="mb-5" title="Message">
|
|
<Space>
|
|
<Button @click="info"> 信息 </Button>
|
|
<Button danger @click="error"> 错误 </Button>
|
|
<Button @click="warning"> 警告 </Button>
|
|
<Button @click="success"> 成功 </Button>
|
|
</Space>
|
|
</Card>
|
|
|
|
<Card class="mb-5" title="Notification">
|
|
<Space>
|
|
<Button @click="notify('info')"> 信息 </Button>
|
|
<Button danger @click="notify('error')"> 错误 </Button>
|
|
<Button @click="notify('warning')"> 警告 </Button>
|
|
<Button @click="notify('success')"> 成功 </Button>
|
|
</Space>
|
|
</Card>
|
|
</Page>
|
|
</template>
|