示例仅供参考,请以真机为主

Input 输入框

cl-input 组件基于 uni-app 的 input 组件:

参数

参数说明类型可选值默认值
modelValue / v-model绑定值string / number
type类型stringtext 及原生 input 的 type 值text
password是否密码类型booleanfalse
placeholder输入框为空时占位符booleanfalse
clearable是否可清空booleanfalse
disabled是否禁用状态booleanfalse
fill是否宽度填充booleanfalse
round是否圆角booleanfalse
border是否带有边框booleanfalse
focus是否聚焦booleanfalse
background-color背景颜色string

插槽

插槽说明
prepend在元素的开始插入内容
append在元素的结尾插入内容

示例

基本用法

<cl-input />

可清空

<cl-input clearable />

禁用状态

<cl-input disabled />

插槽

<cl-input>
	<template #prepend>
		<text>https://</text>
	</template>
</cl-input>

<cl-input>
	<template #append>
		<text>.com</text>
	</template>
</cl-input>
Last Updated: