@dataloop-ai/components 0.13.5 → 0.13.7
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.
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
/>
|
|
13
13
|
<div
|
|
14
14
|
class="dialog-wrapper"
|
|
15
|
-
:style="{ maxWidth: `${width}px` }"
|
|
15
|
+
:style="{ maxWidth: Number(width) ? `${width}px` : width }"
|
|
16
16
|
:class="{ 'dialog-wrapper--fullscreen': fullscreen }"
|
|
17
17
|
>
|
|
18
18
|
<div
|
|
@@ -49,7 +49,7 @@ export default defineComponent({
|
|
|
49
49
|
event: 'update:modelValue'
|
|
50
50
|
},
|
|
51
51
|
props: {
|
|
52
|
-
width: { type: Number, default: 400 },
|
|
52
|
+
width: { type: [Number, String], default: 400 },
|
|
53
53
|
fullscreen: Boolean,
|
|
54
54
|
modelValue: Boolean,
|
|
55
55
|
volatile: { type: Boolean, default: false }
|
|
@@ -455,10 +455,18 @@ export default defineComponent({
|
|
|
455
455
|
this.$emit('input', e.target.value, e)
|
|
456
456
|
this.$emit('update:model-value', e.target.value)
|
|
457
457
|
},
|
|
458
|
+
focus(): void {
|
|
459
|
+
const inputRef = this.$refs.input as HTMLInputElement
|
|
460
|
+
inputRef.focus()
|
|
461
|
+
},
|
|
458
462
|
onFocus(e: InputEvent): void {
|
|
459
463
|
this.focused = true
|
|
460
464
|
this.$emit('focus', e)
|
|
461
465
|
},
|
|
466
|
+
blur(): void {
|
|
467
|
+
const inputRef = this.$refs.input as HTMLInputElement
|
|
468
|
+
inputRef.blur()
|
|
469
|
+
},
|
|
462
470
|
onBlur(e: InputEvent): void {
|
|
463
471
|
this.focused = false
|
|
464
472
|
this.$emit('blur', e)
|
|
@@ -485,8 +493,7 @@ export default defineComponent({
|
|
|
485
493
|
inputRef.value = item
|
|
486
494
|
},
|
|
487
495
|
onMenuShow(): void {
|
|
488
|
-
|
|
489
|
-
inputRef.focus()
|
|
496
|
+
this.focus()
|
|
490
497
|
},
|
|
491
498
|
getSuggestWords(
|
|
492
499
|
item: string,
|