File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
resources/js/JigComponents Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <textarea class =" border-gray-300 rounded-md shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" v-model = " value " ref =" txt" ></textarea >
2
+ <textarea :value = " modelValue " @input = " onInput " class =" border-gray-300 rounded-md shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" ref =" txt" ></textarea >
3
3
</template >
4
4
5
5
<script >
6
6
export default {
7
7
name: " JigTextarea" ,
8
- props: [' value ' ],
9
- emits: [' input ' ],
8
+ props: [' modelValue ' ],
9
+ emits: [' update:modelValue ' ],
10
10
model: {
11
- prop: ' value ' ,
12
- event : ' input '
11
+ prop: ' modelValue ' ,
12
+ event : ' update:modelValue '
13
13
},
14
14
methods: {
15
15
focus () {
16
16
this .$refs .txt .focus ()
17
+ },
18
+ onInput (e ) {
19
+ console .log (e);
20
+ this .$emit (' update:modelValue' ,e .target .value )
17
21
}
18
22
}
19
23
}
You can’t perform that action at this time.
0 commit comments