2018-01-12 08:10:41 +00:00
|
|
|
|
<script>
|
2019-01-12 03:33:27 +00:00
|
|
|
|
import Basic from './basic';
|
|
|
|
|
import ArrowCenter from './arrow-point-at-center';
|
|
|
|
|
import Control from './control';
|
|
|
|
|
import Placement from './placement';
|
|
|
|
|
import TriggerType from './triggerType';
|
|
|
|
|
import HoverWithClick from './hover-with-click';
|
|
|
|
|
import CN from '../index.zh-CN.md';
|
|
|
|
|
import US from '../index.en-US.md';
|
2018-04-16 13:54:37 +00:00
|
|
|
|
|
|
|
|
|
const md = {
|
|
|
|
|
cn: `# Popover
|
|
|
|
|
|
|
|
|
|
点击/鼠标移入元素,弹出气泡式的卡片浮层。
|
|
|
|
|
|
|
|
|
|
## 何时使用
|
|
|
|
|
|
|
|
|
|
当目标元素有进一步的描述和相关操作时,可以收纳到卡片中,根据用户的操作行为进行展现。
|
|
|
|
|
|
|
|
|
|
和 \`Tooltip\` 的区别是,用户可以对浮层上的元素进行操作,因此它可以承载更复杂的内容,比如链接或按钮等。
|
|
|
|
|
## 代码演示`,
|
|
|
|
|
us: `# Popover
|
|
|
|
|
|
|
|
|
|
The floating card popped by clicking or hovering.
|
|
|
|
|
|
|
|
|
|
## When To Use
|
|
|
|
|
|
|
|
|
|
A simple popup menu to provide extra information or operations.
|
|
|
|
|
|
|
|
|
|
Comparing with \`Tooltip\`, besides information \`Popover\` card can also provide action elements like links and buttons.
|
|
|
|
|
## Examples
|
|
|
|
|
`,
|
2019-01-12 03:33:27 +00:00
|
|
|
|
};
|
2018-01-12 08:10:41 +00:00
|
|
|
|
export default {
|
2018-03-20 13:48:01 +00:00
|
|
|
|
category: 'Components',
|
|
|
|
|
subtitle: '气泡卡片',
|
|
|
|
|
type: 'Data Display',
|
|
|
|
|
title: 'Popover',
|
2019-09-28 12:45:07 +00:00
|
|
|
|
render() {
|
2018-04-16 13:54:37 +00:00
|
|
|
|
return (
|
|
|
|
|
<div>
|
2019-09-28 12:45:07 +00:00
|
|
|
|
<md cn={md.cn} us={md.us} />
|
2018-04-16 13:54:37 +00:00
|
|
|
|
<Basic />
|
|
|
|
|
<ArrowCenter />
|
|
|
|
|
<Control />
|
|
|
|
|
<Placement />
|
|
|
|
|
<TriggerType />
|
2018-09-05 13:28:54 +00:00
|
|
|
|
<HoverWithClick />
|
2018-04-16 13:54:37 +00:00
|
|
|
|
<api>
|
2019-09-28 12:45:07 +00:00
|
|
|
|
<template slot="cn">
|
|
|
|
|
<CN />
|
2018-04-16 13:54:37 +00:00
|
|
|
|
</template>
|
2019-09-28 12:45:07 +00:00
|
|
|
|
<US />
|
2018-04-16 13:54:37 +00:00
|
|
|
|
</api>
|
|
|
|
|
</div>
|
2019-01-12 03:33:27 +00:00
|
|
|
|
);
|
2018-01-12 08:10:41 +00:00
|
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
|
};
|
2018-01-12 08:10:41 +00:00
|
|
|
|
</script>
|