stellar-ui-v2 1.39.1 → 1.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,25 +6,53 @@
6
6
  </view>
7
7
  <view class="input-box">
8
8
  <template v-if="type == 'textarea'">
9
- <textarea class="ste-input-input textarea" :type="type" :focus="focus" v-model="dataValue"
10
- :disabled="disabled || readonly" :placeholder="placeholder" :placeholder-style="placeholderStyle"
11
- :placeholder-class="placeholderClass" :confirm-type="confirmType" :cursor-spacing="cursorSpacing"
12
- @input="onInput" @focus="onFocus" @blur="onBlur" @confirm="onConfirm" />
13
- <!-- #ifdef H5 || MP-WEIXIN -->
14
- <text class="count-text" :style="{
9
+ <textarea
10
+ class="ste-input-input textarea"
11
+ :type="type"
12
+ :focus="focus"
13
+ v-model="dataValue"
14
+ :disabled="disabled || readonly"
15
+ :placeholder="placeholder"
16
+ :placeholder-style="placeholderStyle"
17
+ :placeholder-class="placeholderClass"
18
+ :confirm-type="confirmType"
19
+ :cursor-spacing="cursorSpacing"
20
+ @input="onInput"
21
+ @focus="onFocus"
22
+ @blur="onBlur"
23
+ @confirm="onConfirm"
24
+ />
25
+ <!-- #ifdef H5 || MP-WEIXIN || APP -->
26
+ <text
27
+ class="count-text"
28
+ :style="{
15
29
  'background-color': 'transparent',
16
- }" v-if="showWordLimit && maxlength > 0">
30
+ }"
31
+ v-if="showWordLimit && maxlength > 0"
32
+ >
17
33
  {{ tmpDataValue.length }}/{{ maxlength }}
18
34
  </text>
19
35
  <!-- #endif -->
20
36
  </template>
21
37
  <template v-else>
22
- <input class="ste-input-input" :type="type" :focus="focused" v-model="dataValue"
23
- :disabled="disabled || readonly" :placeholder="placeholder" :placeholder-style="placeholderStyle"
24
- :placeholder-class="placeholderClass" :confirm-type="confirmType" @input="onInput" @focus="onFocus"
25
- @blur="onBlur" @confirm="onConfirm"
38
+ <input
39
+ class="ste-input-input"
40
+ :type="type"
41
+ :focus="focused"
42
+ v-model="dataValue"
43
+ :disabled="disabled || readonly"
44
+ :placeholder="placeholder"
45
+ :placeholder-style="placeholderStyle"
46
+ :placeholder-class="placeholderClass"
47
+ :confirm-type="confirmType"
48
+ @input="onInput"
49
+ @focus="onFocus"
50
+ @blur="onBlur"
51
+ @confirm="onConfirm"
26
52
  :style="[{ width: cmpShowClear ? 'calc(100% - 48rpx)' : 'calc(100% - 8rpx)' }]"
27
- :cursor-spacing="cursorSpacing" :cursor="cursorNumber" />
53
+ :cursor-spacing="cursorSpacing"
54
+ :cursor="cursorNumber"
55
+ />
28
56
  <view v-if="cmpShowClear" class="clear-icon" @click="onClear">
29
57
  <ste-icon code="&#xe694;" color="#bbbbbb" size="34" />
30
58
  </view>
@@ -39,422 +67,422 @@
39
67
  </template>
40
68
 
41
69
  <script>
42
- import utils from '../../utils/utils.js';
43
- /**
44
- * ste-input 输入框
45
- * @description 输入框组件
46
- * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-input
47
- * @property {Number|String} value 初始内容,支持双向绑定
48
- * @property {String} type 输入框类型
49
- * @value text 纯文本输入 {String}
50
- * @value textarea 文本域 {String}
51
- * @value tel 电话输入 {String}
52
- * @value number 数字输入 {String}
53
- * @value idcard 身份证输入键盘 {String}
54
- * @value digit 小数点的数字键盘 {String}
55
- * @value password 密码类型 {String}
56
- * @value nickname 昵称输入(微信小程序) {String}
57
- * @value numberpad 仅支付宝小程序 {String}
58
- * @value digitpad 仅支付宝小程序 {String}
59
- * @value idcardpad 仅支付宝小程序 {String}
60
- * @property {String} placeholder 占位符
61
- * @property {String|Object} placeholderStyle 指定placeholder的样式
62
- * @property {String} placeholderClass 指定placeholder的类
63
- * @property {Boolean} disabled 是否禁用
64
- * @property {Boolean} clearable 是否有清空按钮
65
- * @property {Number} maxlength 最大长度
66
- * @property {Boolean} showWordLimit 是否显示字数统计
67
- * @property {String} confirmType 设置右下角按钮的文字
68
- * @value send 右下角按钮为"发送" {String}
69
- * @value search 右下角按钮为"搜索" {String}
70
- * @value next 右下角按钮为"下一个" {String}
71
- * @value go 右下角按钮为"前往" {String}
72
- * @value done 右下角按钮为"完成" {String}
73
- * @property {Boolean} focus 是否聚焦,支持双向绑定
74
- * @property {String} inputAlign 对齐方式
75
- * @value left 向左对齐 {String}
76
- * @value center 居中对齐 {String}
77
- * @value right 向右对齐{String}
78
- * @property {Number|String} fontSize 输入框字体大小,单位rpx
79
- * @property {String} fontColor 输入框字体颜色
80
- * @property {Boolean} readonly 是否只读,与禁用不同,只读不会置灰
81
- * @property {String} shape 输入框形状
82
- * @value square 方形 {String}
83
- * @value circle 圆形 {String}
84
- * @value line 线形 {String}
85
- * @property {Boolean} border 是否有边框
86
- * @property {String} borderColor 边框颜色
87
- * @property {String} background 输入框背景色
88
- * @property {String} rootClass 自定义输入框类名
89
- * @property {Number} cursorSpacing 指定光标与键盘的距离
90
- * @property {Boolean} allowSpace 是否允许输入空格
91
- * @event {Function} blur 输入框失去焦点时触发
92
- * @event {Function} focus 输入框聚焦时触发
93
- * @event {Function} confirm 输入键盘点击右下角触发
94
- * @event {Function} clear 输入框清空触发
95
- * @event {Function} input 输入框输入事件
96
- */
97
- export default {
98
- group: '表单组件',
99
- title: 'Input 输入框',
100
- name: 'ste-input',
101
- options: {
102
- virtualHost: true,
103
- },
104
- props: {
105
- value: {
106
- type: [String, Number, null],
107
- default: '',
108
- },
109
- type: {
110
- type: [String, null],
111
- default: 'text',
112
- },
113
- placeholder: {
114
- type: [String, null],
115
- default: '',
116
- },
117
- placeholderStyle: {
118
- type: [String, Object, null],
119
- default: 'color: #BBBBBB',
120
- },
121
- placeholderClass: {
122
- type: [String, null],
123
- default: 'ste-input-placeholder',
124
- },
125
- disabled: {
126
- type: [Boolean, null],
127
- default: false,
128
- },
129
- clearable: {
130
- type: [Boolean, null],
131
- default: true,
132
- },
133
- maxlength: {
134
- type: [Number, null],
135
- default: -1,
136
- },
137
- showWordLimit: {
138
- type: [Boolean, null],
139
- default: false,
140
- },
141
- confirmType: {
142
- type: [String, null],
143
- default: 'done',
144
- },
145
- focus: {
146
- type: [Boolean, null],
147
- default: false,
148
- },
149
- inputAlign: {
150
- type: [String, null],
151
- default: 'left',
152
- },
153
- fontSize: {
154
- type: [String, Number, null],
155
- default: 24,
156
- },
157
- fontColor: {
158
- type: [String, null],
159
- default: '#000000',
160
- },
161
- readonly: {
162
- type: [Boolean, null],
163
- default: false,
164
- },
165
- shape: {
166
- type: [String, null],
167
- default: 'square',
168
- },
169
- border: {
170
- type: [Boolean, null],
171
- default: false,
172
- },
173
- borderColor: {
174
- type: [String, null],
175
- default: '',
176
- },
177
- background: {
178
- type: [String, null],
179
- default: '',
180
- },
181
- rootClass: {
182
- type: [String, null],
183
- default: '',
184
- },
185
- cursorSpacing: {
186
- type: [Number, null],
187
- default: 20,
188
- },
189
- allowSpace: {
190
- type: [Boolean, null],
191
- default: true,
192
- },
193
- cursor: {
194
- type: [Number, null],
195
- default: 0,
196
- },
70
+ import utils from '../../utils/utils.js';
71
+ /**
72
+ * ste-input 输入框
73
+ * @description 输入框组件
74
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-input
75
+ * @property {Number|String} value 初始内容,支持双向绑定
76
+ * @property {String} type 输入框类型
77
+ * @value text 纯文本输入 {String}
78
+ * @value textarea 文本域 {String}
79
+ * @value tel 电话输入 {String}
80
+ * @value number 数字输入 {String}
81
+ * @value idcard 身份证输入键盘 {String}
82
+ * @value digit 小数点的数字键盘 {String}
83
+ * @value password 密码类型 {String}
84
+ * @value nickname 昵称输入(微信小程序) {String}
85
+ * @value numberpad 仅支付宝小程序 {String}
86
+ * @value digitpad 仅支付宝小程序 {String}
87
+ * @value idcardpad 仅支付宝小程序 {String}
88
+ * @property {String} placeholder 占位符
89
+ * @property {String|Object} placeholderStyle 指定placeholder的样式
90
+ * @property {String} placeholderClass 指定placeholder的类
91
+ * @property {Boolean} disabled 是否禁用
92
+ * @property {Boolean} clearable 是否有清空按钮
93
+ * @property {Number} maxlength 最大长度
94
+ * @property {Boolean} showWordLimit 是否显示字数统计
95
+ * @property {String} confirmType 设置右下角按钮的文字
96
+ * @value send 右下角按钮为"发送" {String}
97
+ * @value search 右下角按钮为"搜索" {String}
98
+ * @value next 右下角按钮为"下一个" {String}
99
+ * @value go 右下角按钮为"前往" {String}
100
+ * @value done 右下角按钮为"完成" {String}
101
+ * @property {Boolean} focus 是否聚焦,支持双向绑定
102
+ * @property {String} inputAlign 对齐方式
103
+ * @value left 向左对齐 {String}
104
+ * @value center 居中对齐 {String}
105
+ * @value right 向右对齐{String}
106
+ * @property {Number|String} fontSize 输入框字体大小,单位rpx
107
+ * @property {String} fontColor 输入框字体颜色
108
+ * @property {Boolean} readonly 是否只读,与禁用不同,只读不会置灰
109
+ * @property {String} shape 输入框形状
110
+ * @value square 方形 {String}
111
+ * @value circle 圆形 {String}
112
+ * @value line 线形 {String}
113
+ * @property {Boolean} border 是否有边框
114
+ * @property {String} borderColor 边框颜色
115
+ * @property {String} background 输入框背景色
116
+ * @property {String} rootClass 自定义输入框类名
117
+ * @property {Number} cursorSpacing 指定光标与键盘的距离
118
+ * @property {Boolean} allowSpace 是否允许输入空格
119
+ * @event {Function} blur 输入框失去焦点时触发
120
+ * @event {Function} focus 输入框聚焦时触发
121
+ * @event {Function} confirm 输入键盘点击右下角触发
122
+ * @event {Function} clear 输入框清空触发
123
+ * @event {Function} input 输入框输入事件
124
+ */
125
+ export default {
126
+ group: '表单组件',
127
+ title: 'Input 输入框',
128
+ name: 'ste-input',
129
+ options: {
130
+ virtualHost: true,
131
+ },
132
+ props: {
133
+ value: {
134
+ type: [String, Number, null],
135
+ default: '',
197
136
  },
198
- data() {
199
- return {
200
- dataValue: '',
201
- tmpDataValue: '', // 用于记录输入值,type="textarea"时显示字数长度(直接使用dataValue时某些情况可能出现输入延迟)
202
- focused: this.focus,
203
- cursorNumber: 0,
204
- };
137
+ type: {
138
+ type: [String, null],
139
+ default: 'text',
205
140
  },
206
- created() {},
207
- mounted() {},
208
- computed: {
209
- cmpRootClass() {
210
- let classStr = '';
211
- if (this.disabled) {
212
- classStr += 'ste-input-disabled ';
213
- }
214
- if (this.readonly) {
215
- classStr += 'ste-input-readonly ';
216
- }
141
+ placeholder: {
142
+ type: [String, null],
143
+ default: '',
144
+ },
145
+ placeholderStyle: {
146
+ type: [String, Object, null],
147
+ default: 'color: #BBBBBB',
148
+ },
149
+ placeholderClass: {
150
+ type: [String, null],
151
+ default: 'ste-input-placeholder',
152
+ },
153
+ disabled: {
154
+ type: [Boolean, null],
155
+ default: false,
156
+ },
157
+ clearable: {
158
+ type: [Boolean, null],
159
+ default: true,
160
+ },
161
+ maxlength: {
162
+ type: [Number, null],
163
+ default: -1,
164
+ },
165
+ showWordLimit: {
166
+ type: [Boolean, null],
167
+ default: false,
168
+ },
169
+ confirmType: {
170
+ type: [String, null],
171
+ default: 'done',
172
+ },
173
+ focus: {
174
+ type: [Boolean, null],
175
+ default: false,
176
+ },
177
+ inputAlign: {
178
+ type: [String, null],
179
+ default: 'left',
180
+ },
181
+ fontSize: {
182
+ type: [String, Number, null],
183
+ default: 24,
184
+ },
185
+ fontColor: {
186
+ type: [String, null],
187
+ default: '#000000',
188
+ },
189
+ readonly: {
190
+ type: [Boolean, null],
191
+ default: false,
192
+ },
193
+ shape: {
194
+ type: [String, null],
195
+ default: 'square',
196
+ },
197
+ border: {
198
+ type: [Boolean, null],
199
+ default: false,
200
+ },
201
+ borderColor: {
202
+ type: [String, null],
203
+ default: '',
204
+ },
205
+ background: {
206
+ type: [String, null],
207
+ default: '',
208
+ },
209
+ rootClass: {
210
+ type: [String, null],
211
+ default: '',
212
+ },
213
+ cursorSpacing: {
214
+ type: [Number, null],
215
+ default: 20,
216
+ },
217
+ allowSpace: {
218
+ type: [Boolean, null],
219
+ default: true,
220
+ },
221
+ cursor: {
222
+ type: [Number, null],
223
+ default: 0,
224
+ },
225
+ },
226
+ data() {
227
+ return {
228
+ dataValue: '',
229
+ tmpDataValue: '', // 用于记录输入值,type="textarea"时显示字数长度(直接使用dataValue时某些情况可能出现输入延迟)
230
+ focused: this.focus,
231
+ cursorNumber: 0,
232
+ };
233
+ },
234
+ created() {},
235
+ mounted() {},
236
+ computed: {
237
+ cmpRootClass() {
238
+ let classStr = '';
239
+ if (this.disabled) {
240
+ classStr += 'ste-input-disabled ';
241
+ }
242
+ if (this.readonly) {
243
+ classStr += 'ste-input-readonly ';
244
+ }
217
245
 
218
- classStr += `ste-input-${this.shape} `;
246
+ classStr += `ste-input-${this.shape} `;
219
247
 
220
- if (this.rootClass) {
221
- classStr += `${this.rootClass} `;
222
- }
248
+ if (this.rootClass) {
249
+ classStr += `${this.rootClass} `;
250
+ }
223
251
 
224
- if (this.type == 'textarea') {
225
- classStr += 'textarea-type ';
226
- }
252
+ if (this.type == 'textarea') {
253
+ classStr += 'textarea-type ';
254
+ }
227
255
 
228
- return classStr;
229
- },
230
- cmpRootStyle() {
231
- let style = utils.bg2style(this.background);
232
-
233
- switch (this.shape) {
234
- case 'circle':
235
- style.borderRadius = utils.formatPx(40);
236
- break;
237
- case 'square':
238
- style.borderRadius = utils.formatPx(16);
239
- break;
240
- default:
241
- break;
242
- }
243
- return style;
244
- },
245
- cmpRootCssVar() {
246
- let style = {
247
- '--input-font-size': utils.formatPx(this.fontSize),
248
- '--input-font-color': this.fontColor,
249
- '--input-text-align': this.inputAlign,
250
- '--input-line-color': this.borderColor || '#eeeeee',
251
- '--input-border-color': this.border ? this.borderColor : 'transparent',
252
- };
253
- return style;
254
- },
256
+ return classStr;
257
+ },
258
+ cmpRootStyle() {
259
+ let style = utils.bg2style(this.background);
260
+
261
+ switch (this.shape) {
262
+ case 'circle':
263
+ style.borderRadius = utils.formatPx(40);
264
+ break;
265
+ case 'square':
266
+ style.borderRadius = utils.formatPx(16);
267
+ break;
268
+ default:
269
+ break;
270
+ }
271
+ return style;
272
+ },
273
+ cmpRootCssVar() {
274
+ let style = {
275
+ '--input-font-size': utils.formatPx(this.fontSize),
276
+ '--input-font-color': this.fontColor,
277
+ '--input-text-align': this.inputAlign,
278
+ '--input-line-color': this.borderColor || '#eeeeee',
279
+ '--input-border-color': this.border ? this.borderColor : 'transparent',
280
+ };
281
+ return style;
282
+ },
255
283
 
256
- cmpShowClear() {
257
- return !this.disabled && !this.readonly && this.clearable && this.dataValue && this.focused;
258
- },
284
+ cmpShowClear() {
285
+ return !this.disabled && !this.readonly && this.clearable && this.dataValue && this.focused;
259
286
  },
260
- methods: {
261
- onInput(e) {
262
- let value = e?.detail?.value || ""
263
- if (!this.disabled && !this.readonly) {
264
- if (!this.allowSpace) {
265
- e.detail.value = value.replace(/\s*/g, '');
266
- }
267
- this.$nextTick(() => {
268
- if (this.maxlength > 0) {
269
- this.dataValue = value.substring(0, this.maxlength) || '';
270
- }
271
- this.tmpDataValue = this.dataValue;
272
- this.$emit('input', this.dataValue);
273
- });
287
+ },
288
+ methods: {
289
+ onInput(e) {
290
+ let value = e?.detail?.value || '';
291
+ if (!this.disabled && !this.readonly) {
292
+ if (!this.allowSpace) {
293
+ e.detail.value = value.replace(/\s*/g, '');
274
294
  }
275
- },
276
- onClear() {
277
- if (this.disabled && !this.readonly) return;
295
+ this.$nextTick(() => {
296
+ if (this.maxlength > 0) {
297
+ this.dataValue = value.substring(0, this.maxlength) || '';
298
+ }
299
+ this.tmpDataValue = this.dataValue;
300
+ this.$emit('input', this.dataValue);
301
+ });
302
+ }
303
+ },
304
+ onClear() {
305
+ if (this.disabled && !this.readonly) return;
278
306
 
279
- this.dataValue = '';
280
- this.$emit('input', this.dataValue);
281
- this.$emit('clear');
282
- },
283
- onFocus() {
284
- if (this.disabled && !this.readonly) return;
285
- this.focused = true;
286
- this.$emit('update:focus', true);
287
- this.$emit('focus', this.dataValue);
288
- },
289
- onBlur() {
307
+ this.dataValue = '';
308
+ this.$emit('input', this.dataValue);
309
+ this.$emit('clear');
310
+ },
311
+ onFocus() {
312
+ if (this.disabled && !this.readonly) return;
313
+ this.focused = true;
314
+ this.$emit('update:focus', true);
315
+ this.$emit('focus', this.dataValue);
316
+ },
317
+ onBlur() {
318
+ setTimeout(() => {
319
+ this.$emit('update:focus', false);
320
+ this.focused = false;
321
+ this.$emit('blur', this.dataValue);
322
+ }, 200);
323
+ },
324
+ onConfirm() {
325
+ this.$emit('confirm', this.dataValue);
326
+ },
327
+ inputClick() {
328
+ this.onFocus();
329
+ },
330
+ },
331
+ watch: {
332
+ value: {
333
+ handler(val) {
334
+ this.dataValue = val;
335
+ this.tmpDataValue = val;
336
+ },
337
+ immediate: true,
338
+ },
339
+ focus: {
340
+ handler(val) {
290
341
  setTimeout(() => {
291
- this.$emit('update:focus', false);
292
- this.focused = false;
293
- this.$emit('blur', this.dataValue);
294
- }, 200);
295
- },
296
- onConfirm() {
297
- this.$emit('confirm', this.dataValue);
298
- },
299
- inputClick() {
300
- this.onFocus();
342
+ this.focused = val;
343
+ }, 50);
301
344
  },
302
345
  },
303
- watch: {
304
- value: {
305
- handler(val) {
306
- this.dataValue = val;
307
- this.tmpDataValue = val;
308
- },
309
- immediate: true,
310
- },
311
- focus: {
312
- handler(val) {
313
- setTimeout(() => {
314
- this.focused = val;
315
- }, 50);
316
- },
317
- },
318
- cursor: {
319
- handler(val) {
320
- this.cursorNumber = val;
321
- },
322
- immediate: true,
346
+ cursor: {
347
+ handler(val) {
348
+ this.cursorNumber = val;
323
349
  },
350
+ immediate: true,
324
351
  },
325
- };
352
+ },
353
+ };
326
354
  </script>
327
355
 
328
356
  <style lang="scss" scoped>
329
- .ste-input-root {
330
- position: relative;
331
- box-sizing: border-box;
332
- border-width: 1rpx;
333
- border-style: solid;
334
- border-color: var(--input-border-color);
335
- background-color: #ffffff;
336
-
337
- .content {
357
+ .ste-input-root {
358
+ position: relative;
359
+ box-sizing: border-box;
360
+ border-width: 1rpx;
361
+ border-style: solid;
362
+ border-color: var(--input-border-color);
363
+ background-color: #ffffff;
364
+
365
+ .content {
366
+ display: flex;
367
+ align-items: center;
368
+ padding: 0 24rpx;
369
+
370
+ .suffix-box,
371
+ .prefix-box {
338
372
  display: flex;
339
- align-items: center;
340
- padding: 0 24rpx;
373
+ flex-direction: column;
374
+ flex-shrink: 0;
375
+ flex-grow: 0;
376
+ flex-basis: auto;
377
+ align-items: stretch;
341
378
 
342
- .suffix-box,
343
- .prefix-box {
344
- display: flex;
345
- flex-direction: column;
346
- flex-shrink: 0;
347
- flex-grow: 0;
348
- flex-basis: auto;
349
- align-items: stretch;
379
+ font-size: var(--input-font-size);
380
+ }
350
381
 
351
- font-size: var(--input-font-size);
382
+ .input-box {
383
+ position: relative;
384
+ width: 100%;
385
+
386
+ .clear-icon {
387
+ width: 48rpx;
388
+ height: 100%;
389
+ display: flex;
390
+ align-items: center;
391
+ justify-content: flex-end;
392
+ position: absolute;
393
+ right: 8rpx;
394
+ top: 50%;
395
+ z-index: 2;
396
+ transform: translateY(-50%);
352
397
  }
353
398
 
354
- .input-box {
355
- position: relative;
399
+ .ste-input-input {
400
+ outline: none;
401
+ border: none;
402
+ padding: 0;
403
+ margin: 0;
404
+ height: calc(var(--input-font-size) * 2.8);
356
405
  width: 100%;
357
406
 
358
- .clear-icon {
359
- width: 48rpx;
360
- height: 100%;
361
- display: flex;
362
- align-items: center;
363
- justify-content: flex-end;
364
- position: absolute;
365
- right: 8rpx;
366
- top: 50%;
367
- z-index: 2;
368
- transform: translateY(-50%);
369
- }
370
-
371
- .ste-input-input {
372
- outline: none;
373
- border: none;
374
- padding: 0;
375
- margin: 0;
376
- height: calc(var(--input-font-size) * 2.8);
377
- width: 100%;
378
-
379
- font-size: var(--input-font-size);
380
- color: var(--input-font-color);
407
+ font-size: var(--input-font-size);
408
+ color: var(--input-font-color);
381
409
 
382
- text-align: var(--input-text-align);
410
+ text-align: var(--input-text-align);
383
411
 
384
- background-color: transparent;
412
+ background-color: transparent;
385
413
 
386
- // letter-spacing: 10rpx;
414
+ // letter-spacing: 10rpx;
387
415
 
388
- &.textarea {
389
- height: 160rpx;
390
- }
416
+ &.textarea {
417
+ height: 160rpx;
391
418
  }
419
+ }
392
420
 
393
- .count-text {
394
- position: absolute;
395
- bottom: 0;
396
- right: 0;
397
- font-size: 24rpx;
398
- color: #bbbbbb;
399
- }
421
+ .count-text {
422
+ position: absolute;
423
+ bottom: 0;
424
+ right: 0;
425
+ font-size: 24rpx;
426
+ color: #bbbbbb;
400
427
  }
401
428
  }
429
+ }
402
430
 
403
- &.ste-input-readonly {
404
- cursor: not-allowed;
431
+ &.ste-input-readonly {
432
+ cursor: not-allowed;
405
433
 
406
- .ste-input-input {
407
- cursor: not-allowed;
408
- }
434
+ .ste-input-input {
435
+ cursor: not-allowed;
409
436
  }
437
+ }
410
438
 
411
- &.ste-input-disabled {
412
- cursor: not-allowed;
439
+ &.ste-input-disabled {
440
+ cursor: not-allowed;
413
441
 
414
- .ste-input-input {
415
- cursor: not-allowed;
416
- color: #cccccc !important;
417
- }
442
+ .ste-input-input {
443
+ cursor: not-allowed;
444
+ color: #cccccc !important;
418
445
  }
446
+ }
419
447
 
420
- &.ste-input-line {
421
- background-color: transparent;
422
- border: none;
423
- border-color: transparent;
448
+ &.ste-input-line {
449
+ background-color: transparent;
450
+ border: none;
451
+ border-color: transparent;
424
452
 
425
- .content {
426
- padding: 0 0;
427
- }
453
+ .content {
454
+ padding: 0 0;
455
+ }
428
456
 
429
- .line {
430
- border-bottom: 2rpx solid var(--input-line-color);
431
- }
457
+ .line {
458
+ border-bottom: 2rpx solid var(--input-line-color);
432
459
  }
460
+ }
433
461
 
434
- &.ste-search-input {
435
- height: 100%;
462
+ &.ste-search-input {
463
+ height: 100%;
436
464
 
437
- // #ifdef MP-ALIPAY
438
- background-color: rgba(0, 0, 0, 0);
439
- // #endif
465
+ // #ifdef MP-ALIPAY
466
+ background-color: rgba(0, 0, 0, 0);
467
+ // #endif
440
468
 
441
- .content {
442
- padding: 0;
443
- height: 100%;
444
- }
469
+ .content {
470
+ padding: 0;
471
+ height: 100%;
445
472
  }
473
+ }
446
474
 
447
- &.textarea-type {
475
+ &.textarea-type {
476
+ height: 100%;
477
+
478
+ .content {
479
+ padding: 20rpx 24rpx;
448
480
  height: 100%;
449
481
 
450
- .content {
451
- padding: 20rpx 24rpx;
482
+ .input-box {
452
483
  height: 100%;
453
-
454
- .input-box {
455
- height: 100%;
456
- }
457
484
  }
458
485
  }
459
486
  }
460
- </style>
487
+ }
488
+ </style>