mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-21 15:26:15 -04:00
chore(lint): switched to a better lint config
This commit is contained in:
parent
4d2b037dbe
commit
33c9b6643f
178 changed files with 4105 additions and 3371 deletions
|
@ -1,5 +1,40 @@
|
|||
<script setup lang="ts">
|
||||
import _ from 'lodash';
|
||||
import type { UseValidationRule } from '@/composable/validation';
|
||||
import CInputText from '@/ui/c-input-text/c-input-text.vue';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
transformer?: (v: string) => string
|
||||
inputValidationRules?: UseValidationRule<string>[]
|
||||
inputLabel?: string
|
||||
inputPlaceholder?: string
|
||||
inputDefault?: string
|
||||
outputLabel?: string
|
||||
outputLanguage?: string
|
||||
}>(),
|
||||
{
|
||||
transformer: _.identity,
|
||||
inputValidationRules: () => [],
|
||||
inputLabel: 'Input',
|
||||
inputDefault: '',
|
||||
inputPlaceholder: 'Input...',
|
||||
outputLabel: 'Output',
|
||||
outputLanguage: '',
|
||||
},
|
||||
);
|
||||
|
||||
const { transformer, inputValidationRules, inputLabel, outputLabel, outputLanguage, inputPlaceholder, inputDefault }
|
||||
= toRefs(props);
|
||||
|
||||
const inputElement = ref<typeof CInputText>();
|
||||
|
||||
const input = ref(inputDefault.value);
|
||||
const output = computed(() => transformer.value(input.value));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-input-text
|
||||
<CInputText
|
||||
ref="inputElement"
|
||||
v-model:value="input"
|
||||
:placeholder="inputPlaceholder"
|
||||
|
@ -13,44 +48,9 @@
|
|||
/>
|
||||
|
||||
<div>
|
||||
<div mb-5px>{{ outputLabel }}</div>
|
||||
<div mb-5px>
|
||||
{{ outputLabel }}
|
||||
</div>
|
||||
<textarea-copyable :value="output" :language="outputLanguage" :follow-height-of="inputElement?.inputWrapperRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { UseValidationRule } from '@/composable/validation';
|
||||
import _ from 'lodash';
|
||||
import CInputText from '@/ui/c-input-text/c-input-text.vue';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
transformer?: (v: string) => string;
|
||||
inputValidationRules?: UseValidationRule<string>[];
|
||||
inputLabel?: string;
|
||||
inputPlaceholder?: string;
|
||||
inputDefault?: string;
|
||||
outputLabel?: string;
|
||||
outputLanguage?: string;
|
||||
}>(),
|
||||
{
|
||||
transformer: _.identity,
|
||||
inputValidationRules: () => [],
|
||||
inputLabel: 'Input',
|
||||
inputDefault: '',
|
||||
inputPlaceholder: 'Input...',
|
||||
outputLabel: 'Output',
|
||||
outputLanguage: '',
|
||||
},
|
||||
);
|
||||
|
||||
const { transformer, inputValidationRules, inputLabel, outputLabel, outputLanguage, inputPlaceholder, inputDefault } =
|
||||
toRefs(props);
|
||||
|
||||
const inputElement = ref<typeof CInputText>();
|
||||
|
||||
const input = ref(inputDefault.value);
|
||||
const output = computed(() => transformer.value(input.value));
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue