SettingItem.vue 538 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <div class="go-setting-item" :style="{ width: width + 'px' }">
  3. <slot ></slot>
  4. <n-text class="name" depth="3">{{ name }}</n-text>
  5. </div>
  6. </template>
  7. <script setup lang="ts">
  8. defineProps({
  9. name: {
  10. type: String,
  11. required: false
  12. },
  13. width: {
  14. type: Number,
  15. required: false
  16. }
  17. })
  18. </script>
  19. <style lang="scss" scoped>
  20. @include go(setting-item) {
  21. display: flex;
  22. flex-direction: column;
  23. min-width: 110px;
  24. text-align: start;
  25. margin-bottom: 5px;
  26. .name {
  27. margin-top: 2px;
  28. }
  29. }
  30. </style>