You've already forked obsidian-visualiser
Registration completed
This commit is contained in:
@@ -6,12 +6,15 @@ interface Prop
|
||||
}
|
||||
const props = defineProps<Prop>();
|
||||
const model = defineModel<string>();
|
||||
|
||||
const err = ref<string | boolean | undefined>(props.error);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="input-group">
|
||||
<label v-if="title" class="input-label">{{ title }}</label>
|
||||
<input class="input-input" :class="{'input-has-error': !!error}" v-model="model" v-bind="$attrs" />
|
||||
<span v-if="error && typeof error === 'string'" class="input-error">{{ error }}</span>
|
||||
<input @input="err = false" class="input-input" :class="{ 'input-has-error': !!err }" v-model="model"
|
||||
v-bind="$attrs" />
|
||||
<span v-if="err && typeof err === 'string'" class="input-error">{{ err }}</span>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user