vue-style-details

1.0.1 • Public • Published

vue-style-details

a beautify details

Source Code

<template>
  <details>
    <summary :style="headerStyle || {}">{{ header }}</summary>
    <slot></slot>
  </details>
</template>

<script>
export default {
  props: {
    header: String,
    headerStyle: Object,
  },
}
</script>

<style lang="scss" scoped>
details {
  margin-top: 10px;
}
summary {
  text-align: center;
  background: rgb(238 238 238 / 60%);
  padding: 5px;
  color: #606266;
  cursor: default;
  font-size: 14px;
  margin-bottom: 10px;
  user-select: none;
  &:hover {
    background: rgb(238 238 238 / 90%);
  }
  &:focus {
    outline: none;
  }
}
</style>

Readme

Keywords

none

Package Sidebar

Install

npm i vue-style-details

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

56.6 kB

Total Files

10

Last publish

Collaborators

  • zhongxingdou