expose-format.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div style="padding: 20px 20px 40px">
  3. <el-form
  4. :model="data"
  5. label-width="70px"
  6. style="max-width: 600px"
  7. label-position="left"
  8. >
  9. <el-form-item label="格式:">
  10. <el-radio-group v-model="data.format">
  11. <el-radio value="JPEG">JPEG</el-radio>
  12. <el-radio value="PDF">PDF</el-radio>
  13. </el-radio-group>
  14. </el-form-item>
  15. <el-form-item label="颜色:">
  16. <el-radio-group v-model="data.color">
  17. <el-radio value="grayscale">黑白</el-radio>
  18. <el-radio value="raw">彩色</el-radio>
  19. </el-radio-group>
  20. </el-form-item>
  21. </el-form>
  22. </div>
  23. </template>
  24. <script lang="ts" setup>
  25. import { ref } from "vue";
  26. import { ExposeFormatData } from ".";
  27. import { ElForm, ElFormItem, ElRadioGroup, ElRadio } from "element-plus";
  28. const props = defineProps<{ ef?: ExposeFormatData }>();
  29. const data = ref<ExposeFormatData>(
  30. props.ef
  31. ? { ...props.ef }
  32. : {
  33. color: "raw",
  34. format: "JPEG",
  35. }
  36. );
  37. defineExpose({
  38. submit: async (): Promise<ExposeFormatData> => {
  39. return data.value;
  40. },
  41. });
  42. </script>
  43. <style lang="scss" scoped>
  44. .vr-layout {
  45. padding: 0 !important;
  46. }
  47. .tagging-layout {
  48. margin-top: 24px;
  49. }
  50. .title {
  51. font-size: 14px;
  52. color: rgba(0, 0, 0, 0.85);
  53. margin: 0;
  54. }
  55. </style>