@dataloop-ai/components 0.19.42 → 0.19.43
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
|
@@ -343,7 +343,8 @@ import {
|
|
|
343
343
|
onMounted,
|
|
344
344
|
PropType,
|
|
345
345
|
ref,
|
|
346
|
-
toRefs
|
|
346
|
+
toRefs,
|
|
347
|
+
watch
|
|
347
348
|
} from 'vue-demi'
|
|
348
349
|
import { DlInfoErrorMessage, DlTooltip } from '../../shared'
|
|
349
350
|
import { DlListItem } from '../../basic'
|
|
@@ -734,6 +735,14 @@ export default defineComponent({
|
|
|
734
735
|
() => !modelValue.value || !String(modelValue.value)?.length
|
|
735
736
|
)
|
|
736
737
|
|
|
738
|
+
watch(modelValue, (value: string | number) => {
|
|
739
|
+
if (String(value ?? '').length) {
|
|
740
|
+
input.value.innerHTML = value
|
|
741
|
+
} else {
|
|
742
|
+
input.value.innerHTML = ''
|
|
743
|
+
}
|
|
744
|
+
})
|
|
745
|
+
|
|
737
746
|
onMounted(() => {
|
|
738
747
|
if (String(modelValue.value ?? '').length) {
|
|
739
748
|
input.value.innerHTML = modelValue.value
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<div>
|
|
4
|
+
<input v-model="textVal">
|
|
5
|
+
|
|
6
|
+
<div>This is to test v-model reactivity</div>
|
|
7
|
+
<dl-input
|
|
8
|
+
v-model="textVal"
|
|
9
|
+
placeholder="testestestset"
|
|
10
|
+
disabled
|
|
11
|
+
/>
|
|
12
|
+
<dl-input
|
|
13
|
+
v-model="textVal"
|
|
14
|
+
disabled
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
3
18
|
<dl-input
|
|
4
19
|
placeholder="placeholder input readonly"
|
|
5
20
|
readonly
|
|
@@ -267,8 +282,11 @@ export default defineComponent({
|
|
|
267
282
|
files.value = val
|
|
268
283
|
}
|
|
269
284
|
|
|
285
|
+
const textVal = ref<string>('test me')
|
|
286
|
+
|
|
270
287
|
return {
|
|
271
288
|
log: console.log,
|
|
289
|
+
textVal,
|
|
272
290
|
textInputValue,
|
|
273
291
|
passFieldValue,
|
|
274
292
|
warningFieldValue,
|