Password Element
An element used to render a password input.
#Examples
<script>
export default {
mixins: [Laraform],
data: () => ({
schema: {
password: {
type: 'password'
}
}
})
}
</script>
<script>
export default {
mixins: [Laraform],
data: () => ({
schema: {
password: {
type: 'password',
addon: {
before: '<svg width="12" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="lock-alt" class="svg-inline--fa fa-lock-alt fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zM264 392c0 22.1-17.9 40-40 40s-40-17.9-40-40v-48c0-22.1 17.9-40 40-40s40 17.9 40 40v48zm32-168H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"></path></svg>'
}
}
}
})
}
</script>
#Options
Name | Type | Description |
---|---|---|
default | string |
Value of element when the form is initially loaded or reseted. |
placeholder | string |
The placeholder of the element. |
floating | string |
The floating label of the element. |
disabled | boolean |
Whether the field is disabled. |
readonly | boolean |
Whether the field is readonly. |
addon | object |
An object containing before and after properties, representing the contents of the input's before and after addons. |
#Properties
Name | Type | Default | Description |
---|---|---|---|
disabled | boolean |
false |
Whether the field is disabled. |
addon | object |
{} |
An object containing before and after properties, representing the contents of the input's before and after addons. |
defaultValue | string |
null |
Value of element when the form is initially loaded or reseted. |
placeholder | string |
null |
The placeholder of the element. |
floating | string |
null |
The floating label of the element. |
readonly | boolean |
false |
Whether the field is readonly. |
#Methods
# .disable()
Disabled the field.
# .enable()
Enables the field.