fix(editor): Fix design system typecheck errors (no-changelog) (#9447)

This commit is contained in:
Alex Grozav
2024-05-21 20:53:19 +03:00
committed by GitHub
parent d21ad15c1f
commit eef5479e96
20 changed files with 161 additions and 65 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { InputSize } from '@/types';
import type { ElementPlusSizePropType, InputSize } from '@/types';
import { ElInputNumber } from 'element-plus';
import { computed } from 'vue';
type InputNumberProps = {
size?: InputSize;
@@ -10,9 +11,24 @@ type InputNumberProps = {
precision?: number;
};
defineProps<InputNumberProps>();
const props = withDefaults(defineProps<InputNumberProps>(), {
size: undefined,
step: 1,
precision: 0,
min: -Infinity,
max: Infinity,
});
const resolvedSize = computed(() => props.size as ElementPlusSizePropType);
</script>
<template>
<ElInputNumber v-bind="{ ...$props, ...$attrs }" />
<ElInputNumber
:size="resolvedSize"
:min="min"
:max="max"
:step="step"
:precision="precision"
v-bind="$attrs"
/>
</template>