Skip to content

Commit 64886e1

Browse files
committed
remove unused function
1 parent 5a375bf commit 64886e1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/component.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default Vue.extend({
113113
input(event: Event) {
114114
const { target } = event as CustomInputEvent
115115
this.maskedValue = target.value
116-
this.unmaskedValue = target.unmaskedValue
116+
this.unmaskedValue = target.unmasked
117117
this.$emit('input', this.emittedValue)
118118
},
119119
change() {

src/core.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface Config {
2323
options: Options
2424
oldValue: Input
2525
masked: Input
26-
unmaskedValue: Input
26+
unmasked: Input
2727
}
2828

2929
export class CustomInputEvent<T = any> extends CustomEvent<T> {
@@ -32,7 +32,7 @@ export class CustomInputEvent<T = any> extends CustomEvent<T> {
3232
export interface CustomInputElement extends HTMLInputElement {
3333
options: Options
3434
masked?: Input
35-
unmaskedValue?: Input
35+
unmasked?: Input
3636
oldValue?: Input
3737
cleanup: () => void
3838
}
@@ -45,11 +45,11 @@ export function cloneDeep(data: object) {
4545
}
4646

4747
/**
48-
* Creates a CustomEvent('input') with detail = { facade: true }
49-
* used as a way to identify our own input event
48+
* Creates a CustomEvent with detail = { facade: true }
49+
* used as a way to identify our own event
5050
*/
51-
export function InputEvent(type: string) {
52-
return new CustomEvent(type, {
51+
export function InputEvent(event: string) {
52+
return new CustomEvent(event, {
5353
bubbles: true,
5454
cancelable: true,
5555
detail: { facade: true }
@@ -113,7 +113,7 @@ export function updateValue(el: CustomInputElement, vnode: VNode | null, { emit
113113
}
114114

115115
el.oldValue = masked
116-
el.unmaskedValue = unmasked
116+
el.unmasked = unmasked
117117

118118
// safari makes the cursor jump to the end if el.value gets assign even if to the same value
119119
if (el.value !== masked) {

0 commit comments

Comments
 (0)