mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
37 lines
734 B
Markdown
37 lines
734 B
Markdown
|
# 基础用法
|
||
|
```html
|
||
|
<n-alert title="Default 类型" type="default">
|
||
|
<template v-slot:icon>
|
||
|
<n-icon>
|
||
|
<ios-airplane />
|
||
|
</n-icon>
|
||
|
</template>
|
||
|
Gee it's good to be back home
|
||
|
</n-alert>
|
||
|
<n-alert title="Info 类型" type="info">
|
||
|
Gee it's good to be back home
|
||
|
</n-alert>
|
||
|
<n-alert title="Success 类型" type="success">
|
||
|
Leave it till tomorrow to unpack my case
|
||
|
</n-alert>
|
||
|
<n-alert title="Warning 类型" type="warning">
|
||
|
Honey disconnect the phone
|
||
|
</n-alert>
|
||
|
<n-alert title="Error 类型" type="error">
|
||
|
I'm back in the U.S.S.R.
|
||
|
</n-alert>
|
||
|
```
|
||
|
```js
|
||
|
import iosAirplane from 'naive-ui/lib/icons/ios-airplane'
|
||
|
|
||
|
export default {
|
||
|
components: {
|
||
|
iosAirplane
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
```css
|
||
|
.n-alert {
|
||
|
margin-bottom: 12px;
|
||
|
}
|
||
|
```
|