Notice 通知
使用指南
import { Notice } from 'fs-ui'
1
代码演示
通知类型
Notice({
type: 'default',
message: '默认',
})
Notice({
type: 'success',
message: '成功',
})
Notice({
type: 'fail',
message: '失败',
})
Notice({
type: 'warning',
message: '警示',
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
自定义
Notice({
message: '自定义',
background: 'bisque',
color: 'red',
duration: '5000'
})
1
2
3
4
5
6
2
3
4
5
6
插件的方式调用
export default {
mounted () {
this.$notice('提示文案');
}
}
1
2
3
4
5
2
3
4
5
方法
方法名 | 参数 | 返回值 | 说明 |
---|---|---|---|
Notice | options | toast实例 | 展示提示 |
参数
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
type | 提示类型,可选值为 success fail warning default | String | default |
message | 内容 | String/html | - |
duration | 时间 | Number | 2000 |
background | 背景 | String | - |
color | 字体颜色 | String | - |