item.vue 1012 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <li class="form-component-item" :class="item.class">
  3. <a>
  4. <i class="form-component-item__icon" :class="item.icon" />
  5. {{item.label}}
  6. </a>
  7. </li>
  8. </template>
  9. <script>
  10. import { defineComponent } from 'vue'
  11. export default defineComponent({
  12. name: 'FormComponentItem',
  13. props: {
  14. item: Object
  15. }
  16. })
  17. </script>
  18. <style lang="less">
  19. .ghost.form-component-item{
  20. width: 100%;
  21. height: 0;
  22. margin: 0;
  23. border-top: 4px solid @danger;
  24. overflow: hidden;
  25. }
  26. .form-component-item{
  27. box-sizing: border-box;
  28. display: block;
  29. font-size: 12px;
  30. width: 48%;
  31. float: left;
  32. line-height: 26px;
  33. list-style: none;
  34. text-overflow: ellipsis;
  35. white-space: nowrap;
  36. overflow: hidden;
  37. margin:1%;
  38. color: #333;
  39. border: 1px solid #f4f6fc;
  40. user-select: none;
  41. &:hover{
  42. color: @primary;
  43. border-style: dashed;
  44. border-color: @primary;
  45. }
  46. &__icon{
  47. margin: 0 6px 0 8px;
  48. }
  49. > a {
  50. display: block;
  51. cursor: move;
  52. background-color: #f4f6fc;
  53. }
  54. }
  55. </style>