<script lang="ts" setup="">
import Inputmask from 'inputmask'
const ipValue = ref('')
const inputRef = ref()
onMounted(() => {
const im = new Inputmask({
alias: 'ip',
greedy: true,
placeholder: ' ',
})
im.mask(inputRef.value)
})
</script>
<template>
<input
v-model="ipValue"
type="text"
ref="inputRef"
placeholder=" . . . "
class="ip-input"
/>
</template>
<style lang="scss" scoped>
.ip-input {
max-width: 400px;
height: 32px;
background: #2e3133;
border-radius: 4px;
color: white;
border: none;
padding: 7px 10px;
}
</style>