mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-27 08:45:53 -04:00
Chore: Add code comments
This commit is contained in:
parent
43527f2f40
commit
179e3569b5
2 changed files with 45 additions and 5 deletions
|
@ -15,28 +15,54 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* Generic input field with a customizable action on the right.
|
||||
* Action is passed in as a function.
|
||||
*/
|
||||
export default {
|
||||
props: {
|
||||
/**
|
||||
* The value of the input field.
|
||||
*/
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* Whether the input field is enabled / disabled.
|
||||
*/
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* Placeholder text for the input field.
|
||||
*/
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* The icon displayed in the right button of the input field.
|
||||
* Accepts a Font Awesome icon string identifier.
|
||||
* @example "plus"
|
||||
*/
|
||||
icon: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**
|
||||
* The input type of the input field.
|
||||
* @example "email"
|
||||
*/
|
||||
type: {
|
||||
type: String,
|
||||
default: "text",
|
||||
},
|
||||
/**
|
||||
* The action to be performed when the button is clicked.
|
||||
* Action is passed in as a function.
|
||||
*/
|
||||
action: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
|
@ -44,6 +70,9 @@ export default {
|
|||
},
|
||||
emits: [ "update:modelValue" ],
|
||||
computed: {
|
||||
/**
|
||||
* Send value update to parent on change.
|
||||
*/
|
||||
model: {
|
||||
get() {
|
||||
return this.modelValue;
|
||||
|
@ -53,10 +82,5 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue