EditIncreaseVariable.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div>
  3. <ui-textarea
  4. :model-value="data.description"
  5. :placeholder="t('common.description')"
  6. class="w-full"
  7. @change="updateData({ description: $event })"
  8. />
  9. <ui-input
  10. :model-value="data.variableName"
  11. :label="t('workflow.variables.name')"
  12. :title="t('workflow.variables.name')"
  13. class="mt-2 w-full"
  14. @change="updateData({ variableName: $event })"
  15. />
  16. <ui-input
  17. :model-value="data.increaseBy"
  18. :label="t('workflow.blocks.increase-variable.increase')"
  19. placeholder="0"
  20. type="number"
  21. class="w-full mt-2"
  22. @change="updateData({ increaseBy: +$event })"
  23. />
  24. </div>
  25. </template>
  26. <script setup>
  27. import { useI18n } from 'vue-i18n';
  28. const props = defineProps({
  29. data: {
  30. type: Object,
  31. default: () => ({}),
  32. },
  33. });
  34. const emit = defineEmits(['update:data']);
  35. const { t } = useI18n();
  36. function updateData(value) {
  37. emit('update:data', { ...props.data, ...value });
  38. }
  39. </script>
  40. <style>
  41. .log-data .block-variable {
  42. margin-top: 4px;
  43. }
  44. </style>