Appearance
输入框
基础用法
代码示例
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,true | false | Boolean |
label | 名称 | ----- | ----- | String |
center | 居中展示 | ----- | ----- | Boolean |