mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-25 01:06:15 -04:00
feat(base64-string-converter): switch to encode and decode url safe base64 strings (#392)
* feat(base64-string-converter): switch to encode and decode url safe * feat(base64-string-converter): changes based on review comments, use config object instead of boolean argument. * feat(base64-string-converter): fix validation, add option to watch additional refs for changes which interfere with validation rules
This commit is contained in:
parent
8c92d56318
commit
0b20f1c16a
4 changed files with 72 additions and 12 deletions
|
@ -61,6 +61,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { generateRandomId } from '@/utils/random';
|
||||
import { useValidation, type UseValidationRule } from '@/composable/validation';
|
||||
import type { Ref } from 'vue';
|
||||
import { useTheme } from './c-input-text.theme';
|
||||
import { useAppTheme } from '../theme/themes';
|
||||
|
||||
|
@ -73,6 +74,7 @@ const props = withDefaults(
|
|||
readonly?: boolean;
|
||||
disabled?: boolean;
|
||||
validationRules?: UseValidationRule<string>[];
|
||||
validationWatch?: Ref<unknown>[];
|
||||
validation?: ReturnType<typeof useValidation>;
|
||||
labelPosition?: 'top' | 'left';
|
||||
labelWidth?: string;
|
||||
|
@ -97,6 +99,7 @@ const props = withDefaults(
|
|||
readonly: false,
|
||||
disabled: false,
|
||||
validationRules: () => [],
|
||||
validationWatch: undefined,
|
||||
validation: undefined,
|
||||
labelPosition: 'top',
|
||||
labelWidth: 'auto',
|
||||
|
@ -125,6 +128,7 @@ const validation =
|
|||
useValidation({
|
||||
rules: validationRules,
|
||||
source: value,
|
||||
watch: props.validationWatch,
|
||||
});
|
||||
|
||||
const theme = useTheme();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue