form-input.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div class="form-input-wrapper">
  3. <div class="prefix" v-if="prefix">
  4. {{prefix}}
  5. </div>
  6. <slot name="content"></slot>
  7. <component-zoom :width="50" fontSize="14" :txt="suffix" v-if="suffix">
  8. <div class="suffix">
  9. {{suffix}}
  10. </div>
  11. </component-zoom>
  12. </div>
  13. </template>
  14. <script setup>
  15. import { onMounted, ref, defineProps, defineEmits } from "vue";
  16. import ComponentZoom from '@/view/components/component-zoom.vue'
  17. const props = defineProps({
  18. prefix: {
  19. type: String,
  20. default: '',
  21. },
  22. suffix: {
  23. type: String,
  24. default: '',
  25. },
  26. });
  27. const emits = defineEmits(["close", "confirm", "postPublishFinish"]);
  28. onMounted(() => {
  29. })
  30. </script>
  31. <style scoped lang="scss">
  32. .form-input-wrapper {
  33. width: max-content;
  34. height: 38px;
  35. border: 1px solid #D9D9D9;
  36. border-radius: 5px;
  37. padding: 0 10px;
  38. box-sizing: border-box;
  39. display: flex;
  40. align-items: center;
  41. color: #999999;
  42. font-weight: 400;
  43. font-size: 14px;
  44. .prefix {
  45. margin-right: 4px;
  46. }
  47. .suffix {
  48. margin-left: 4px;
  49. white-space: nowrap;
  50. color: #999999;
  51. font-weight: 400;
  52. }
  53. }
  54. </style>