<template>
  <div class="demo-tooltip-basic">
    <div class="top">
      <ui-tooltip
        class="item"
        content="Top Left 提示文字"
        placement="top-start">
        <ui-button>上左</ui-button>
      </ui-tooltip>
      <ui-tooltip
        class="item"
        content="Top Center 提示文字"
        placement="top">
        <ui-button>上边</ui-button>
      </ui-tooltip>
      <ui-tooltip
        class="item"
        content="Top Right 提示文字"
        placement="top-end">
        <ui-button>上右</ui-button>
      </ui-tooltip>
    </div>
    <div class="left">
      <ui-tooltip
        class="item"
        content="Left Top 提示文字"
        placement="left-start">
        <ui-button>左上</ui-button>
      </ui-tooltip>
      <ui-tooltip
        class="item"
        content="Left Center 提示文字"
        placement="left">
        <ui-button>左边</ui-button>
      </ui-tooltip>
      <ui-tooltip
        class="item"
        content="Left Bottom 提示文字"
        placement="left-end">
        <ui-button>左下</ui-button>
      </ui-tooltip>
    </div>
    <div class="right">
      <ui-tooltip
        class="item"
        content="Right Top 提示文字"
        placement="right-start">
        <ui-button>右上</ui-button>
      </ui-tooltip>
      <ui-tooltip
        class="item"
        content="Right Center 提示文字"
        placement="right">
        <ui-button>右边</ui-button>
      </ui-tooltip>
      <ui-tooltip
        class="item"
        content="Right Bottom 提示文字"
        placement="right-end">
        <ui-button>右下</ui-button>
      </ui-tooltip>
    </div>
    <div class="bottom">
      <ui-tooltip
        class="item"
        content="Bottom Left 提示文字"
        trigger="click"
        placement="bottom-start">
        <ui-button>下左</ui-button>
      </ui-tooltip>
      <ui-tooltip
        class="item"
        content="Bottom Center 提示文字"
        placement="bottom">
        <ui-button>下边</ui-button>
      </ui-tooltip>
      <ui-tooltip
        class="item"
        content="Bottom Right 提示文字"
        placement="bottom-end">
        <ui-button>下右</ui-button>
      </ui-tooltip>
    </div>
  </div>
</template>
<script>
import { Tooltip, Button } from "amumu-ui"
export default {
  components: {
    "ui-tooltip": Tooltip,
    "ui-button": Button,
  },
  data() {
    return {
      value: "",
    }
  },
}
</script>
<style lang="scss">
.top {
  text-align: center;
}

.left {
  float: left;
  width: 85px;
}

.right {
  float: right;
  width: 85px;
}

.bottom {
  clear: both;
  text-align: center;
}

.item {
  margin: 4px;
}

.left .ui-tooltip-popper,
.right .ui-tooltip-popper {
  padding: 8px 10px;
}
</style>
