forked from vueComponent/ant-design-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenuDanger.tsx
40 lines (34 loc) · 815 Bytes
/
menuDanger.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import type { MenuProps } from 'ant-design-vue';
import { Menu } from 'ant-design-vue';
import type { ComponentDemo } from '../../interface';
const items: MenuProps['items'] = [
{
key: '0',
danger: true,
label: '危险',
},
{
key: '1',
danger: true,
label: '危险选中',
},
{
key: '2',
danger: true,
disabled: true,
label: '危险禁用',
},
];
const Demo = () => {
const onClick: MenuProps['onClick'] = e => {
// eslint-disable-next-line
console.log('click ', e);
};
return <Menu onClick={onClick} style={{ width: '256px' }} selectedKeys={['1']} items={items} />;
};
const componentDemo: ComponentDemo = {
demo: <Demo />,
tokens: ['colorError', 'colorErrorHover', 'colorErrorOutline'],
key: 'danger',
};
export default componentDemo;