zhangmeng
2024-04-19 e3ba120cb766a17e098e58d11c39ffc600a3070c
commit | author | age
e3ba12 1 export default {
Z 2     props: {
3         // 搜索框形状,round-圆形,square-方形
4         shape: {
5             type: String,
6             default: uni.$u.props.search.shape
7         },
8         // 搜索框背景色,默认值#f2f2f2
9         bgColor: {
10             type: String,
11             default: uni.$u.props.search.bgColor
12         },
13         // 占位提示文字
14         placeholder: {
15             type: String,
16             default: uni.$u.props.search.placeholder
17         },
18         // 是否启用清除控件
19         clearabled: {
20             type: Boolean,
21             default: uni.$u.props.search.clearabled
22         },
23         // 是否自动聚焦
24         focus: {
25             type: Boolean,
26             default: uni.$u.props.search.focus
27         },
28         // 是否在搜索框右侧显示取消按钮
29         showAction: {
30             type: Boolean,
31             default: uni.$u.props.search.showAction
32         },
33         // 右边控件的样式
34         actionStyle: {
35             type: Object,
36             default: uni.$u.props.search.actionStyle
37         },
38         // 取消按钮文字
39         actionText: {
40             type: String,
41             default: uni.$u.props.search.actionText
42         },
43         // 输入框内容对齐方式,可选值为 left|center|right
44         inputAlign: {
45             type: String,
46             default: uni.$u.props.search.inputAlign
47         },
48         // input输入框的样式,可以定义文字颜色,大小等,对象形式
49         inputStyle: {
50             type: Object,
51             default: uni.$u.props.search.inputStyle
52         },
53         // 是否启用输入框
54         disabled: {
55             type: Boolean,
56             default: uni.$u.props.search.disabled
57         },
58         // 边框颜色
59         borderColor: {
60             type: String,
61             default: uni.$u.props.search.borderColor
62         },
63         // 搜索图标的颜色,默认同输入框字体颜色
64         searchIconColor: {
65             type: String,
66             default: uni.$u.props.search.searchIconColor
67         },
68         // 输入框字体颜色
69         color: {
70             type: String,
71             default: uni.$u.props.search.color
72         },
73         // placeholder的颜色
74         placeholderColor: {
75             type: String,
76             default: uni.$u.props.search.placeholderColor
77         },
78         // 左边输入框的图标,可以为uView图标名称或图片路径
79         searchIcon: {
80             type: String,
81             default: uni.$u.props.search.searchIcon
82         },
83         searchIconSize: {
84             type: [Number, String],
85             default: uni.$u.props.search.searchIconSize
86         },
87         // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
88         margin: {
89             type: String,
90             default: uni.$u.props.search.margin
91         },
92         // 开启showAction时,是否在input获取焦点时才显示
93         animation: {
94             type: Boolean,
95             default: uni.$u.props.search.animation
96         },
97         // 输入框的初始化内容
98         value: {
99             type: String,
100             default: uni.$u.props.search.value
101         },
102         // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
103         maxlength: {
104             type: [String, Number],
105             default: uni.$u.props.search.maxlength
106         },
107         // 搜索框高度,单位px
108         height: {
109             type: [String, Number],
110             default: uni.$u.props.search.height
111         },
112         // 搜索框左侧文本
113         label: {
114             type: [String, Number, null],
115             default: uni.$u.props.search.label
116         }
117     }
118 }