Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vue-masked-input
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Barabash
vue-masked-input
Commits
cc3f31a6
Commit
cc3f31a6
authored
Sep 10, 2020
by
VladBarabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'focus' and 'blur' event
parent
3d9d8b50
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
12 deletions
+26
-12
.gitignore
.gitignore
+1
-0
dist/demo.js
dist/demo.js
+4
-10
dist/demo.js.map
dist/demo.js.map
+1
-1
dist/maskedInput.js
dist/maskedInput.js
+10
-1
src/MaskedInput.js
src/MaskedInput.js
+10
-0
No files found.
.gitignore
View file @
cc3f31a6
...
...
@@ -2,3 +2,4 @@
.DS_Store
node_modules/
npm-debug.log
package-lock.json
dist/demo.js
View file @
cc3f31a6
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/demo.js.map
View file @
cc3f31a6
This diff is collapsed.
Click to expand it.
dist/maskedInput.js
View file @
cc3f31a6
...
...
@@ -25,7 +25,9 @@ export default {
focusout
:
this
.
focusOut
,
cut
:
this
.
cut
,
copy
:
this
.
copy
,
paste
:
this
.
paste
paste
:
this
.
paste
,
focus
:
this
.
focus
,
blur
:
this
.
blur
}
});
},
...
...
@@ -128,6 +130,7 @@ export default {
}
}
}
/* eslint-enable */
});
}
[].
concat
(
_toConsumableArray
(
this
.
$refs
.
input
.
value
)).
reduce
(
function
(
memo
,
item
)
{
...
...
@@ -305,6 +308,12 @@ export default {
if
(
this
.
maskCore
===
null
)
return
true
;
return
this
.
maskCore
.
getValue
()
===
this
.
maskCore
.
emptyValue
;
},
focus
:
function
focus
(
e
)
{
this
.
$emit
(
'
focus
'
,
e
);
},
blur
:
function
blur
(
e
)
{
this
.
$emit
(
'
blur
'
,
e
);
},
focusOut
:
function
focusOut
()
{
if
(
this
.
isEmpty
())
{
this
.
$refs
.
input
.
value
=
''
;
...
...
src/MaskedInput.js
View file @
cc3f31a6
...
...
@@ -24,6 +24,8 @@ export default {
cut
:
this
.
cut
,
copy
:
this
.
copy
,
paste
:
this
.
paste
,
focus
:
this
.
focus
,
blur
:
this
.
blur
},
});
},
...
...
@@ -281,6 +283,14 @@ export default {
return
this
.
maskCore
.
getValue
()
===
this
.
maskCore
.
emptyValue
;
},
focus
(
e
)
{
this
.
$emit
(
'
focus
'
,
e
);
},
blur
(
e
)
{
this
.
$emit
(
'
blur
'
,
e
);
},
focusOut
()
{
if
(
this
.
isEmpty
())
{
this
.
$refs
.
input
.
value
=
''
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment