94
94
maxBtnObj.disabled
95
95
? 'disabled--text no-pointer-events'
96
96
: 'textDarkWhite--text',
97
- 'rounded-lg mt-n2 mew-caption font-weight-medium'
97
+ 'rounded-lg mt-n2 mew-caption font-weight-medium',
98
98
]"
99
99
min-width =" 40"
100
100
min-height =" 40"
101
101
height =" 40"
102
102
width =" 40"
103
103
depressed
104
+ :loading =" maxBtnObj.loading"
104
105
color =" maxButton"
105
106
@click =" maxBtnObj.method"
106
107
>
@@ -120,85 +121,85 @@ export default {
120
121
name: ' MewInput' ,
121
122
components: {
122
123
MewBlockie,
123
- MewTokenContainer
124
+ MewTokenContainer,
124
125
},
125
126
props: {
126
127
/**
127
128
* Error messages to display at the bottom of the input.
128
129
*/
129
130
errorMessages: {
130
131
type: [String , Array ],
131
- default: ' '
132
+ default: ' ' ,
132
133
},
133
134
/**
134
135
* Input becomes read only.
135
136
*/
136
137
isReadOnly: {
137
138
type: Boolean ,
138
- default: false
139
+ default: false ,
139
140
},
140
141
/**
141
142
* Prepends the blockie to the beginning of the input.
142
143
*/
143
144
showBlockie: {
144
145
type: Boolean ,
145
- default: false
146
+ default: false ,
146
147
},
147
148
/**
148
149
* Removes the input border and adds a box shadow.
149
150
*/
150
151
hasNoBorder: {
151
152
type: Boolean ,
152
- default: false
153
+ default: false ,
153
154
},
154
155
/**
155
156
* Disables the input.
156
157
*/
157
158
disabled: {
158
159
type: Boolean ,
159
- default: false
160
+ default: false ,
160
161
},
161
162
/**
162
163
* The input label.
163
164
*/
164
165
label: {
165
166
type: String ,
166
- default: ' '
167
+ default: ' ' ,
167
168
},
168
169
/**
169
170
* The input placeholder.
170
171
*/
171
172
placeholder: {
172
173
type: String ,
173
- default: ' '
174
+ default: ' ' ,
174
175
},
175
176
/**
176
177
* The input value.
177
178
*/
178
179
value: {
179
180
type: String ,
180
- default: ' '
181
+ default: ' ' ,
181
182
},
182
183
/**
183
184
* The input id.
184
185
*/
185
186
id: {
186
187
type: Number ,
187
- default: null
188
+ default: null ,
188
189
},
189
190
/**
190
191
* Displays text on the right inner side of the input.
191
192
*/
192
193
rightLabel: {
193
194
type: String ,
194
- default: ' '
195
+ default: ' ' ,
195
196
},
196
197
/**
197
198
* Hides input clear functionality. Clear symbol will be displayed on the right side.
198
199
*/
199
200
hideClearBtn: {
200
201
type: Boolean ,
201
- default: false
202
+ default: false ,
202
203
},
203
204
/**
204
205
* For validating your input - accepts an array of functions that take an input value as an argument and returns either true / false
@@ -208,81 +209,81 @@ export default {
208
209
type: Array ,
209
210
default : () => {
210
211
return [];
211
- }
212
+ },
212
213
},
213
214
/**
214
215
* The resolved address.
215
216
*/
216
217
resolvedAddr: {
217
218
type: String ,
218
- default: ' '
219
+ default: ' ' ,
219
220
},
220
221
/**
221
222
* Enables persistent hint.
222
223
*/
223
224
persistentHint: {
224
225
type: Boolean ,
225
- default: false
226
+ default: false ,
226
227
},
227
228
/**
228
229
* Hint text (will be displayed at the bottom of the input).
229
230
*/
230
231
hint: {
231
232
type: String ,
232
- default: ' '
233
+ default: ' ' ,
233
234
},
234
235
/**
235
236
* Sets input type.
236
237
*/
237
238
type: {
238
239
type: String ,
239
- default: ' text'
240
+ default: ' text' ,
240
241
},
241
242
/**
242
243
* Prepends an image to the beginning of the input.
243
244
*/
244
245
image: {
245
246
type: String ,
246
- default: ' '
247
+ default: ' ' ,
247
248
},
248
249
/**
249
250
* Adds a "Buy more" string to the end of the first index of the errorMessages prop.
250
251
*/
251
252
buyMoreStr: {
252
253
type: String ,
253
- default: ' '
254
+ default: ' ' ,
254
255
},
255
256
/**
256
257
* Displays a button to the right inner side of the input.
257
258
* Takes an object.
258
- * i.e. {title: 'Max', disabled: false, method: () => {}}.
259
+ * i.e. {title: 'Max', disabled: false, method: () => {}, loading: false }.
259
260
*/
260
261
maxBtnObj: {
261
262
type: Object ,
262
263
default : () => {
263
264
return {};
264
- }
265
+ },
265
266
},
266
267
/**
267
268
* Autofocuses the input.
268
269
*/
269
270
autofocus: {
270
271
type: Boolean ,
271
- default: false
272
+ default: false ,
272
273
},
273
274
/**
274
275
* Hides the toggle show password icon on the right
275
276
* when input type is password.
276
277
*/
277
278
hidePasswordIcon: {
278
279
type: Boolean ,
279
- default: false
280
- }
280
+ default: false ,
281
+ },
281
282
},
282
283
data () {
283
284
return {
284
285
inputValue: ' ' ,
285
- showPassword: false
286
+ showPassword: false ,
286
287
};
287
288
},
288
289
computed: {
@@ -300,7 +301,7 @@ export default {
300
301
return types[1 ];
301
302
}
302
303
return this .type ;
303
- }
304
+ },
304
305
},
305
306
watch: {
306
307
inputValue (newVal , oldVal ) {
@@ -312,7 +313,7 @@ export default {
312
313
if (newVal !== oldVal) {
313
314
this .inputValue = newVal;
314
315
}
315
- }
316
+ },
316
317
},
317
318
mounted () {
318
319
this .inputValue = this .value ;
@@ -328,13 +329,13 @@ export default {
328
329
},
329
330
/* eslint-disable */
330
331
clear (val ) {
331
- this .inputValue = val ? val : ' ' ;
332
+ this .inputValue = val ? val : " " ;
332
333
},
333
334
/* eslint-enable */
334
335
preventCharE (e ) {
335
336
if (this .type === ' number' && e .key === ' e' ) e .preventDefault ();
336
- }
337
- }
337
+ },
338
+ },
338
339
};
339
340
</script >
340
341
1 commit comments
github-actions[bot] commentedon May 24, 2023
Copy of this build can be found at
https://mewcomponents.mewbuilds.com/9b64fae0375c3847e652d95466c7ad6e4bda4c16/index.html
https://www.cloudflare-ipfs.com/ipfs/
Virus Total analysis
https://www.virustotal.com/gui/file/ecfe1e695e47b46619cbf9df748224d5f218c6d04df4cdf410235dbbc4f88b14