2019-09-22 22:59:29 +08:00
|
|
|
# Button Group
|
|
|
|
Button can be grouped.
|
|
|
|
```html
|
2020-02-29 16:17:42 +08:00
|
|
|
<n-button-group vertical>
|
2019-09-22 22:59:29 +08:00
|
|
|
<n-button
|
|
|
|
round
|
|
|
|
>
|
2019-10-24 18:04:31 +08:00
|
|
|
<template v-slot:icon>
|
2020-02-29 16:17:42 +08:00
|
|
|
<log-in-outline />
|
2019-10-24 18:04:31 +08:00
|
|
|
</template>
|
2020-02-29 16:17:42 +08:00
|
|
|
Live a
|
2019-09-22 22:59:29 +08:00
|
|
|
</n-button>
|
|
|
|
<n-button
|
2020-02-29 16:17:42 +08:00
|
|
|
ghost
|
|
|
|
>
|
|
|
|
<template v-slot:icon>
|
|
|
|
<log-in-outline />
|
|
|
|
</template>
|
|
|
|
Sufficient
|
|
|
|
</n-button>
|
2020-05-30 00:29:18 +08:00
|
|
|
<n-button>
|
2020-02-29 16:17:42 +08:00
|
|
|
<template v-slot:icon>
|
|
|
|
<log-in-outline />
|
|
|
|
</template>
|
|
|
|
Life
|
|
|
|
</n-button>
|
|
|
|
</n-button-group>
|
|
|
|
<n-button-group vertical size="large">
|
2020-05-30 00:29:18 +08:00
|
|
|
<n-button>
|
2019-10-24 18:04:31 +08:00
|
|
|
<template v-slot:icon>
|
2020-02-29 16:17:42 +08:00
|
|
|
<log-in-outline />
|
2019-10-24 18:04:31 +08:00
|
|
|
</template>
|
2020-02-29 16:17:42 +08:00
|
|
|
With
|
2019-09-22 22:59:29 +08:00
|
|
|
</n-button>
|
2020-05-30 00:29:18 +08:00
|
|
|
<n-button>
|
2019-10-24 18:04:31 +08:00
|
|
|
<template v-slot:icon>
|
2020-02-29 16:17:42 +08:00
|
|
|
<log-in-outline />
|
2019-10-24 18:04:31 +08:00
|
|
|
</template>
|
2020-02-29 16:17:42 +08:00
|
|
|
Enough
|
2019-09-22 22:59:29 +08:00
|
|
|
</n-button>
|
|
|
|
<n-button
|
2020-02-29 16:17:42 +08:00
|
|
|
ghost
|
|
|
|
round
|
2019-09-22 22:59:29 +08:00
|
|
|
>
|
2019-10-24 18:04:31 +08:00
|
|
|
<template v-slot:icon>
|
2020-02-29 16:17:42 +08:00
|
|
|
<log-in-outline />
|
2019-10-24 18:04:31 +08:00
|
|
|
</template>
|
2020-02-29 16:17:42 +08:00
|
|
|
Happiness
|
2019-09-22 22:59:29 +08:00
|
|
|
</n-button>
|
|
|
|
</n-button-group>
|
2020-02-29 16:17:42 +08:00
|
|
|
<n-button-group size="small">
|
2019-09-22 22:59:29 +08:00
|
|
|
<n-button
|
|
|
|
round
|
|
|
|
>
|
2019-10-24 18:04:31 +08:00
|
|
|
<template v-slot:icon>
|
2020-02-29 16:17:42 +08:00
|
|
|
<log-in-outline />
|
|
|
|
</template>
|
|
|
|
Life
|
|
|
|
</n-button>
|
2020-05-30 00:29:18 +08:00
|
|
|
<n-button>
|
2020-02-29 16:17:42 +08:00
|
|
|
<template v-slot:icon>
|
|
|
|
<log-in-outline />
|
2019-10-24 18:04:31 +08:00
|
|
|
</template>
|
2020-02-29 16:17:42 +08:00
|
|
|
Is
|
2019-09-22 22:59:29 +08:00
|
|
|
</n-button>
|
2020-05-30 00:29:18 +08:00
|
|
|
<n-button>
|
2020-02-29 16:17:42 +08:00
|
|
|
<template v-slot:icon>
|
|
|
|
<log-in-outline />
|
|
|
|
</template>
|
|
|
|
Good
|
|
|
|
</n-button>
|
|
|
|
</n-button-group>
|
|
|
|
<n-button-group>
|
2019-09-22 22:59:29 +08:00
|
|
|
<n-button
|
2020-02-29 16:17:42 +08:00
|
|
|
ghost
|
2019-09-22 22:59:29 +08:00
|
|
|
>
|
2019-10-24 18:04:31 +08:00
|
|
|
<template v-slot:icon>
|
2020-02-29 16:17:42 +08:00
|
|
|
<log-in-outline />
|
2019-10-24 18:04:31 +08:00
|
|
|
</template>
|
2020-02-29 16:17:42 +08:00
|
|
|
Eat
|
2019-09-22 22:59:29 +08:00
|
|
|
</n-button>
|
|
|
|
<n-button
|
2020-02-29 16:17:42 +08:00
|
|
|
ghost
|
2019-09-22 22:59:29 +08:00
|
|
|
>
|
2019-10-24 18:04:31 +08:00
|
|
|
<template v-slot:icon>
|
2020-02-29 16:17:42 +08:00
|
|
|
<log-in-outline />
|
2019-10-24 18:04:31 +08:00
|
|
|
</template>
|
2020-02-29 16:17:42 +08:00
|
|
|
One More
|
2019-09-22 22:59:29 +08:00
|
|
|
</n-button>
|
|
|
|
<n-button
|
2020-02-29 16:17:42 +08:00
|
|
|
round
|
2019-09-22 22:59:29 +08:00
|
|
|
>
|
2019-10-24 18:04:31 +08:00
|
|
|
<template v-slot:icon>
|
2020-02-29 16:17:42 +08:00
|
|
|
<log-in-outline />
|
2019-10-24 18:04:31 +08:00
|
|
|
</template>
|
2020-02-29 16:17:42 +08:00
|
|
|
Apple
|
2019-09-22 22:59:29 +08:00
|
|
|
</n-button>
|
|
|
|
</n-button-group>
|
|
|
|
```
|
2019-10-24 18:04:31 +08:00
|
|
|
```js
|
2020-02-29 16:17:42 +08:00
|
|
|
import logInOutline from 'naive-ui/lib/icons/log-in-outline'
|
2019-10-24 18:04:31 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2020-02-29 16:17:42 +08:00
|
|
|
logInOutline
|
2019-10-24 18:04:31 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
2019-09-22 22:59:29 +08:00
|
|
|
```css
|
2020-02-29 16:17:42 +08:00
|
|
|
.n-button-group {
|
|
|
|
margin: 0 12px 12px 0;
|
2019-09-22 22:59:29 +08:00
|
|
|
}
|
|
|
|
```
|