mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-18 12:34:25 +08:00
fix avatar&button doc
This commit is contained in:
parent
5429638435
commit
45f15a8559
@ -10,5 +10,5 @@
|
||||
color: 'red',
|
||||
backgroundColor: 'yellow'
|
||||
}
|
||||
}">Liu<br>Dehua</n-avatar>
|
||||
}">刘<br>德华</n-avatar>
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 尺寸
|
||||
|
||||
头像有 `small`、`medium`、`large` 尺寸。
|
||||
头像有 `small`、`medium` 和 `large` 尺寸。
|
||||
|
||||
```html
|
||||
<n-avatar size="small" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1573566445479&di=8804b1996cbf89582232a3994665454c&imgtype=jpg&src=http%3A%2F%2Fimg4.imgtn.bdimg.com%2Fit%2Fu%3D3628555514%2C2933400515%26fm%3D214%26gp%3D0.jpg"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Basic
|
||||
There are `default`, `primary`, `info`, `success`, `warning` and `error` type of button
|
||||
There are `default`, `primary`, `info`, `success`, `warning` and `error` type of button.
|
||||
```html
|
||||
<n-button>Default</n-button>
|
||||
<n-button type="primary">Primary</n-button>
|
||||
@ -12,4 +12,4 @@ There are `default`, `primary`, `info`, `success`, `warning` and `error` type of
|
||||
.n-button {
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Disabled
|
||||
Button can be disabled
|
||||
Button can be disabled.
|
||||
```html
|
||||
<n-button
|
||||
size="small"
|
||||
@ -42,4 +42,4 @@ export default {
|
||||
.n-button {
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Events
|
||||
Listening events on button.
|
||||
Handle events on button.
|
||||
```html
|
||||
<n-button @click="handleClick">
|
||||
Click Me
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Icon
|
||||
Using icon in button
|
||||
Use icon in button.
|
||||
```html
|
||||
<n-button>
|
||||
<template v-slot:icon>
|
||||
@ -27,4 +27,4 @@ export default {
|
||||
.n-button {
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 禁用
|
||||
按钮可以被禁用
|
||||
按钮可以被禁用。
|
||||
```html
|
||||
<n-button
|
||||
size="small"
|
||||
@ -30,4 +30,4 @@
|
||||
.n-button {
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 图标
|
||||
在按钮上使用图标
|
||||
在按钮上使用图标。
|
||||
```html
|
||||
<n-button icon="md-save">Save</n-button>
|
||||
<n-button icon="md-save" icon-position="right">Save</n-button>
|
||||
@ -8,4 +8,4 @@
|
||||
.n-button {
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 按钮
|
||||
按钮用来触发一些操作
|
||||
按钮用来触发一些操作。
|
||||
## 演示
|
||||
```demo
|
||||
basic
|
||||
@ -15,4 +15,4 @@ debug
|
||||
## API
|
||||
|属性|说明|类型|默认值|版本|
|
||||
|-|-|-|-|-|
|
||||
|type|按钮类型|string|`'default'`||
|
||||
|type|按钮类型|string|`'default'`||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 加载中
|
||||
按钮有加载状态
|
||||
按钮有加载状态。
|
||||
```html
|
||||
<n-button
|
||||
icon="md-save"
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 形状
|
||||
按钮拥有不同的形状
|
||||
按钮拥有不同的形状。
|
||||
```html
|
||||
<n-button circle icon="md-save" />
|
||||
<n-button type="primary" round>Primary</n-button>
|
||||
@ -9,4 +9,4 @@
|
||||
.n-button {
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user