-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
74 changed files
with
392 additions
and
5,647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,41 @@ | ||
<template> | ||
<div class="form-control" :class="class"> | ||
<div class="form-control" :for="id" :class="class"> | ||
<label class="label"> | ||
<span v-if="name" class="text">{{ name }}{{ required ? "*" : "" }}</span> | ||
<span v-if="error" class="error"> | ||
{{ error }} | ||
</span> | ||
<span v-if="props.name" class="text">{{ fullName }}</span> | ||
<span v-if="props.error" class="error">{{ props.error }}</span> | ||
</label> | ||
<input :type="type" v-model="value" :class="error ? 'error' : ''" class="input" :disabled="disabled" :placeholder="placeholder" :autocomplete="autocomplete" /> | ||
<input :type="props.type" v-model="value" :class="props.error ? 'error' : ''" class="input" :disabled="props.disabled" :placeholder="props.placeholder" | ||
:autocomplete="props.autocomplete" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed } from "vue"; | ||
const props = defineProps({ | ||
name: { | ||
type: String, | ||
}, | ||
name: String, | ||
modelValue: { | ||
required: true, | ||
}, | ||
id: String, | ||
type: { | ||
type: String, | ||
default: "text", | ||
}, | ||
error: { | ||
type: String, | ||
}, | ||
class: { | ||
type: String, | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
}, | ||
required: { | ||
type: Boolean, | ||
}, | ||
placeholder: { | ||
type: String, | ||
}, | ||
autocomplete: { | ||
type: String, | ||
}, | ||
error: String, | ||
class: String, | ||
disabled: Boolean, | ||
required: Boolean, | ||
placeholder: String, | ||
autocomplete: String, | ||
}); | ||
const emits = defineEmits(["update:modelValue"]); | ||
const value = computed({ | ||
get: () => { | ||
return props.modelValue; | ||
}, | ||
set: (val) => { | ||
emits("update:modelValue", val); | ||
}, | ||
get: () => props.modelValue, | ||
set: (val) => emits("update:modelValue", val), | ||
}); | ||
const fullName = computed(() => `${props.name}${props.required ? "*" : ""}`); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.