跳转到内容

IP地址输入框

安装

INFO

如果还需要使用其他组件,请参考全量组件安装

如果仅需要使用IP地址输入框,执行以下命令单独安装:

shell
npm install @havue/ip-input --save
shell
yarn add @havue/ip-input
shell
pnpm install @havue/ip-input

引入

vue
<script>
import { HvIpInput } from 'havue'
// or 
import { HvIpInput } from '@havue/components'
// or
import HvIpInput from '@havue/ip-input'
</script>

示例

.
.
.

disabled:

.
.
.
点我看代码
ts
<template>
  <div class="ip-input-demo">
    <HvIpInput v-model="ip"></HvIpInput>
    <p>disabled:</p>
    <HvIpInput :model-value="ip" disabled></HvIpInput>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { HvIpInput } from '@havue/components'

const ip = ref('')
</script>

<style lang="scss"></style>

配置

属性名说明类型默认值
model-value / v-model绑定值string"..."
disabled是否禁用boolean-