forked from bootstrap-vue/bootstrap-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform-selection.js
49 lines (49 loc) · 1.46 KB
/
form-selection.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// @vue/component
export default {
computed: {
selectionStart: {
// Expose selectionStart for formatters, etc
cache: false,
get() /* istanbul ignore next */ {
return this.$refs.input.selectionStart
},
set(val) /* istanbul ignore next */ {
this.$refs.input.selectionStart = val
}
},
selectionEnd: {
// Expose selectionEnd for formatters, etc
cache: false,
get() /* istanbul ignore next */ {
return this.$refs.input.selectionEnd
},
set(val) /* istanbul ignore next */ {
this.$refs.input.selectionEnd = val
}
},
selectionDirection: {
// Expose selectionDirection for formatters, etc
cache: false,
get() /* istanbul ignore next */ {
return this.$refs.input.selectionDirection
},
set(val) /* istanbul ignore next */ {
this.$refs.input.selectionDirection = val
}
}
},
methods: {
select() /* istanbul ignore next */ {
// For external handler that may want a select() method
this.$refs.input.select(...arguments)
},
setSelectionRange() /* istanbul ignore next */ {
// For external handler that may want a setSelectionRange(a,b,c) method
this.$refs.input.setSelectionRange(...arguments)
},
setRangeText() /* istanbul ignore next */ {
// For external handler that may want a setRangeText(a,b,c) method
this.$refs.input.setRangeText(...arguments)
}
}
}