Skip to content

Commit d8510f1

Browse files
committed
🐛 修正官网demo中的说明文字
1 parent 61fc765 commit d8510f1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/styles/src/notification.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ $--notification-warning-color: $warning-color !default;
2222
$--notification-danger-color: $error-color !default;
2323

2424
$prefixCls: 'notification';
25-
$element-separator: '__';
26-
$modifier-separator: '--';
25+
// $element-separator: '__';
26+
// $modifier-separator: '--';
2727

2828
@include b($prefixCls) {
2929
display: flex;

website/docs/notification.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
notifiCustomIcon() {
4545
this.$notify({
4646
title: 'Info',
47-
message: '这是一条没有关闭按钮的消息',
47+
message: '自定义图标',
4848
iconClass: ['pyui-icons', 'py-icon-heart-fill'],
4949
});
5050
},
@@ -138,11 +138,11 @@
138138

139139
:::
140140

141-
### 带有倾向性
141+
### 带有图标
142142

143-
带有 icon,常用来显示「成功、警告、消息、错误」类的系统消息
143+
带有 icon,常用来显示「成功、警告、消息、错误」类的系统消息,或者显示用户自定义图标类
144144

145-
:::demo Element 为 Notification 组件准备了四种通知类型:success, warning, info, error。通过type字段来设置,除此以外的值将被忽略。同时,我们也为 Notification 的各种 type 注册了方法,可以在不传入type字段的情况下像notifiInfo和notifiError那样直接调用。自定义图标需要以数组形式传入图标样式
145+
:::demo Notification 组件准备了四种通知类型:success, warning, info, error。通过type字段来设置,除此以外的值将被忽略。同时,我们也为 Notification 的各种 type 注册了方法,可以在不传入type字段的情况下像notifiInfo和notifiError那样直接调用。自定义图标需要以数组形式传入图标Class。注意:如果定义了以上四种类型的type,则传入的自定义图标无效,因为type属性优先度更高
146146

147147
```html
148148
<template>
@@ -182,7 +182,7 @@
182182
notifiCustomIcon() {
183183
this.$notify({
184184
title: 'Info',
185-
message: '这是一条没有关闭按钮的消息',
185+
message: '自定义图标',
186186
iconClass: ['pyui-icons', 'py-icon-heart-fill'],
187187
});
188188
}
@@ -336,8 +336,8 @@ message 属性支持传入 HTML 片段
336336
| message | 说明文字 | string |||
337337
| dangerouslyUseHTMLString | 是否将 message 属性作为 HTML 片段处理 | boolean || false |
338338
| type | 主题样式,如果不在可选值内将被忽略 | string | success / warning / info / error ||
339-
| iconClass | 自定义图标的类名。若设置了 type,则 iconClass 会被覆盖 | string[] |||
340-
| customClass | 自定义类名 | string | ||
339+
| iconClass | 自定义图标的类名。若设置了 type,则 iconClass 会被覆盖 | string[ ] |||
340+
| customClass | 自定义类名 | string |||
341341
| duration | 显示时间, 毫秒。设为 0 则不会自动关闭 | number || 4500 |
342342
| position | 自定义弹出位置 | string | top-right / top-left / bottom-right / bottom-left | top-right |
343343
| showClose | 是否显示关闭按钮 | boolean || true |

0 commit comments

Comments
 (0)