balm-ui
balm-ui copied to clipboard
Feature requests - inputs
- A way to provide masks for textfields
- A way to hide spinners (arrows) for number fields
About request loading, I prefer to use global masks, like this:
<div>
<app-layout>
Your template
</app-layout>
<loading-layout v-if="$store.isLoading"></loading-layout>
</div>
I ment input masks. It's a way to control input. Sometimes formating and pre-validation of data is needed,
Hi guys, is it possible using something like maska with BalmUI?
@siloam @elf-mouse I am trying the sample below without success. Do you have any idea to solve this?
<template>
<ui-textfield
v-model="model"
:attrs="{ 'v-maska': '', 'data-maska': '#####-###'}"
required
maxlength="9">
Example
</ui-textfield>
</template>
<script>
import { vMaska } from "maska"
export default {
directives: { maska: vMaska },
data () {
return {
model: null
}
}
}
</script>
Hi @rodrigobraga , you can use maska
like this:
-
main.js
import { vMaska } from 'maska'; const app = createApp(App); app.directive('maska', vMaska);
-
app.vue
<ui-textfield v-model="value" v-maska :attrs="{ 'data-maska': '#-#' }" ></ui-textfield>
@elf-mouse Thanks!