mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-30 12:52:43 +08:00
docs(popover, tooltip): body-style
This commit is contained in:
parent
3e40af2a44
commit
317a17b436
@ -1,7 +1,7 @@
|
||||
# Body Style
|
||||
|
||||
```html
|
||||
<n-popover :body-style="{ width: '500px' }" trigger="hover">
|
||||
<n-popover :style="{ width: '500px' }" trigger="hover">
|
||||
<template v-slot:trigger>
|
||||
<n-button> Width 500px </n-button>
|
||||
</template>
|
||||
|
@ -1,7 +1,7 @@
|
||||
# 主体样式
|
||||
|
||||
```html
|
||||
<n-popover :body-style="{ width: '500px' }" trigger="hover">
|
||||
<n-popover :style="{ width: '500px' }" trigger="hover">
|
||||
<template v-slot:trigger>
|
||||
<n-button style="margin:0;"> 宽度 500px </n-button>
|
||||
</template>
|
||||
|
@ -1,25 +1,21 @@
|
||||
# Body Style
|
||||
|
||||
Setting body-style is sometimes useful.
|
||||
Setting style is sometimes useful.
|
||||
|
||||
```html
|
||||
<n-tooltip :body-style="{ maxWidth: '400px' }" trigger="click">
|
||||
<template v-slot:trigger>
|
||||
<n-button> California Girls </n-button>
|
||||
</template>
|
||||
I wish they all could be California girls. I wish they all could be California
|
||||
girls. I wish they all could be California girls.
|
||||
</n-tooltip>
|
||||
<n-tooltip :body-style="{ maxWidth: '400px' }" trigger="click">
|
||||
<template v-slot:trigger>
|
||||
<n-button> California Girls </n-button>
|
||||
</template>
|
||||
I wish ...
|
||||
</n-tooltip>
|
||||
```
|
||||
|
||||
```css
|
||||
.n-button {
|
||||
margin: 0 12px 8px 0;
|
||||
}
|
||||
<n-space>
|
||||
<n-tooltip :style="{ maxWidth: '400px' }" trigger="click">
|
||||
<template v-slot:trigger>
|
||||
<n-button> California Girls </n-button>
|
||||
</template>
|
||||
I wish they all could be California girls. I wish they all could be
|
||||
California girls. I wish they all could be California girls.
|
||||
</n-tooltip>
|
||||
<n-tooltip :style="{ maxWidth: '400px' }" trigger="click">
|
||||
<template v-slot:trigger>
|
||||
<n-button> California Girls </n-button>
|
||||
</template>
|
||||
I wish ...
|
||||
</n-tooltip>
|
||||
</n-space>
|
||||
```
|
||||
|
@ -3,22 +3,18 @@
|
||||
有时候设定主体样式还是挺有用的。
|
||||
|
||||
```html
|
||||
<n-tooltip :body-style="{ maxWidth: '400px' }" trigger="click">
|
||||
<template v-slot:trigger>
|
||||
<n-button> 加州女孩 </n-button>
|
||||
</template>
|
||||
我希望她们都是加州女孩,我希望她们都是加州女孩,我希望她们都是加州女孩
|
||||
</n-tooltip>
|
||||
<n-tooltip :body-style="{ maxWidth: '400px' }" trigger="click">
|
||||
<template v-slot:trigger>
|
||||
<n-button> 加州女孩 </n-button>
|
||||
</template>
|
||||
我希望...
|
||||
</n-tooltip>
|
||||
```
|
||||
|
||||
```css
|
||||
.n-button {
|
||||
margin: 0 12px 8px 0;
|
||||
}
|
||||
<n-space>
|
||||
<n-tooltip :style="{ maxWidth: '400px' }" trigger="click">
|
||||
<template v-slot:trigger>
|
||||
<n-button> 加州女孩 </n-button>
|
||||
</template>
|
||||
我希望她们都是加州女孩,我希望她们都是加州女孩,我希望她们都是加州女孩
|
||||
</n-tooltip>
|
||||
<n-tooltip :style="{ maxWidth: '400px' }" trigger="click">
|
||||
<template v-slot:trigger>
|
||||
<n-button> 加州女孩 </n-button>
|
||||
</template>
|
||||
我希望...
|
||||
</n-tooltip>
|
||||
</n-space>
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user