Skip to content
On this page

输入框

基础用法

代码示例
js
<template>
    <pied-input v-model="inputValue"></pied-input>
</template>

<script setup>
import { ref } from 'vue'
let inputValue = ref('')
</script>

输入类型

代码示例
js
<template>
    <pied-input v-model="inputValue" type="text"></pied-input>
    <pied-input v-model="inputValue" type="password"></pied-input>
</template>

<script setup>
import { ref } from 'vue'
let inputValue = ref('')
</script>

自定义名称

用户名
密码
代码示例
js
<template>
    <pied-input v-model="inputValue" type="text" label="用户名"></pied-input>
    <pied-input v-model="inputValue" type="password" label="密码"></pied-input>
</template>

<script setup>
import { ref } from 'vue'
let inputValue = ref('')
</script>

输入框居中

用户名
代码示例
js
<template>
    <pied-input v-model="inputValue" type="text" label="用户名" center></pied-input>
</template>

<script setup>
import { ref } from 'vue'
let inputValue = ref('')
</script>

禁用

用户名
密码
代码示例
js
<template>
    <pied-input v-model="inputValue" type="text" label="用户名" disabled></pied-input>
    <pied-input v-model="inputValue" type="password" label="密码" disabled></pied-input>
</template>

<script setup>
import { ref } from 'vue'
let inputValue = ref('')
</script>
参数说明可选值默认值类型
v-model绑定值----------String
type输入类型----------text,password
disabled禁用false,truefalseBoolean
label名称----------String
center居中展示----------Boolean

Released under the MIT License.