File tree 3 files changed +24
-7
lines changed
3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 56
56
"karma-spec-reporter" : " ^0.0.31" ,
57
57
"karma-webpack" : " ^2.0.4" ,
58
58
"mocha" : " ^3.5.0" ,
59
+ "phantomjs-polyfill-object-assign" : " 0.0.2" ,
59
60
"phantomjs-prebuilt" : " ^2.1.15" ,
60
61
"sinon" : " ^3.2.1" ,
61
62
"sinon-chai" : " ^2.13.0" ,
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<input
3
- :placeholder =" placeholder"
4
- @blur =" onBlurHandler"
5
- @input =" onInputHandler"
6
- @focus =" onFocusHandler"
3
+ v-if =" !readOnly"
7
4
ref =" numeric"
8
- type =" tel"
9
5
v-model =" amount"
10
- v-if =" !readOnly"
6
+ :placeholder =" placeholder"
7
+ type =" tel"
8
+ v-on =" inputListeners"
11
9
>
12
10
<span
13
11
v-else
@@ -195,6 +193,21 @@ export default {
195
193
return ' ,'
196
194
},
197
195
196
+ /**
197
+ * Define listeners to attach to the input
198
+ */
199
+ inputListeners () {
200
+ var vm = this ;
201
+ return Object .assign ({},
202
+ this .$listeners ,
203
+ {
204
+ blur: vm .onBlurHandler ,
205
+ input: vm .onInputHandler ,
206
+ focus: vm .onFocusHandler ,
207
+ }
208
+ );
209
+ },
210
+
198
211
/**
199
212
* Define thousand separator based on separator props.
200
213
* @return {String} '.' or ','
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ module.exports = config => {
7
7
browsers : [ 'PhantomJS' ] ,
8
8
frameworks : [ 'mocha' , 'sinon-chai' ] ,
9
9
reporters : [ 'spec' , 'coverage' ] ,
10
- files : [ 'specs/*.spec.js' ] ,
10
+ files : [
11
+ '../node_modules/phantomjs-polyfill-object-assign/object-assign-polyfill.js' ,
12
+ 'specs/*.spec.js'
13
+ ] ,
11
14
preprocessors : {
12
15
'./specs/*.spec.js' : [ 'webpack' , 'sourcemap' ]
13
16
} ,
You can’t perform that action at this time.
0 commit comments