File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 5
5
@mouseout =" hover = false"
6
6
>
7
7
<input
8
+ id =" main-input-define"
8
9
ref =" input"
9
10
v-model =" cmp"
10
11
class =" flex-1 rounded-none border-none shadow-2xl p-1"
30
31
import { useEntity } from ' @/use/entity'
31
32
import { useFormat } from ' @/use/format'
32
33
import { useInput } from ' @/use/input'
33
- import { ref , computed , watch } from ' vue'
34
+ import { ref , computed , watch , onMounted } from ' vue'
34
35
import { useI18n } from ' vue-i18n'
35
36
import { useStore } from ' vuex'
36
37
48
49
const input = ref (null as any )
49
50
const paste = ref <boolean >(false )
50
51
52
+ onMounted (() => {
53
+ useInput ().prevent (input .value )
54
+ })
55
+
51
56
const cmp = computed ({
52
57
get() {
53
58
return props .modelValue
Original file line number Diff line number Diff line change @@ -7,5 +7,12 @@ export const useInput: Callback<any> = () => {
7
7
return arr . filter ( ( data : string ) => data !== '' )
8
8
}
9
9
10
- return { pasteText }
10
+ const prevent = ( input : HTMLInputElement ) => {
11
+ input . addEventListener ( 'keydown' , ( event : Event ) => {
12
+ // TODO: Edge and IE11 insert in a / event
13
+ // event.stopPropagation()
14
+ } )
15
+ }
16
+
17
+ return { pasteText, prevent }
11
18
}
Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ export const usePDF: Callback<any> = () => {
72
72
73
73
const content = ( store : Store < any > ) : Array < any > => {
74
74
const pages : Array < ContextState > = store . state . project . pages
75
- console . log ( pages )
76
75
const arr : Array < any > = [ ]
77
76
78
77
pages . forEach ( ( page : ContextState ) => {
@@ -93,8 +92,6 @@ export const usePDF: Callback<any> = () => {
93
92
} )
94
93
} )
95
94
96
- console . log ( arr )
97
-
98
95
return arr
99
96
}
100
97
You can’t perform that action at this time.
0 commit comments