Notice 通知
本文介绍使用 Notice 通知组件的不同方式以及相关 API。
Kylin
<dependency component="{ Notice }" src="@alipay/antui-vue" ></dependency>
ESModule
import { Notice } from '@alipay/antui-vue';
API 说明
props
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
operation | 公告的可用操作,可选 | string | null |
href |
| string | null |
slots:公告内容。
events
属性 | 说明 | 函数 |
---|---|---|
close |
| Function(): void |
Demo
下面是一个基础样式示例。
截图

代码
<template>
<div>
<Notice>
因全国公民身份系统升级,添加银行卡
</Notice>
<Notice operation="go" href="https://www.alipay.com/">
因全国公民身份系统升级,添加银行卡
</Notice>
<Notice operation="close" @close="show = false" v-if="show">
因全国公民身份系统升级,添加银行卡
</Notice>
</div>
</template>
<script>
export default {
data() {
return {
show: true,
};
},
};
</script>