@tarojs/components 2.2.17 → 2.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1430,7 +1430,7 @@ if(false) {
|
|
|
1430
1430
|
|
|
1431
1431
|
exports = module.exports = __webpack_require__(3)(false);
|
|
1432
1432
|
// Module
|
|
1433
|
-
exports.push([module.i, "img[src=\"\"] {\n opacity: 0;\n}\n\n.taro-img {\n display: inline-block;\n overflow: hidden;\n position: relative;\n font-size: 0;\n width: 320px;\n height: 240px;\n}\n\n.taro-img.taro-img__widthfix {\n height: 100%;\n}\n\n.taro-img__mode-scaletofill {\n object-fit:
|
|
1433
|
+
exports.push([module.i, "img[src=\"\"] {\n opacity: 0;\n}\n\n.taro-img {\n display: inline-block;\n overflow: hidden;\n position: relative;\n font-size: 0;\n width: 320px;\n height: 240px;\n}\n\n.taro-img.taro-img__widthfix {\n height: 100%;\n}\n\n.taro-img__mode-scaletofill {\n object-fit: fill;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfit {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfill {\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-widthfix {\n width: 100%;\n}\n\n.taro-img__mode-top {\n width: 100%;\n}\n\n.taro-img__mode-bottom {\n width: 100%;\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-left {\n height: 100%;\n}\n\n.taro-img__mode-right {\n position: absolute;\n height: 100%;\n right: 0;\n}\n\n.taro-img__mode-topright {\n position: absolute;\n right: 0;\n}\n\n.taro-img__mode-bottomleft {\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-bottomright {\n position: absolute;\n right: 0;\n bottom: 0;\n}\n", ""]);
|
|
1434
1434
|
|
|
1435
1435
|
|
|
1436
1436
|
|
|
@@ -2903,6 +2903,7 @@ var Input = /*#__PURE__*/function (_Nerv$Component) {
|
|
|
2903
2903
|
|
|
2904
2904
|
_this = _super.apply(this, arguments);
|
|
2905
2905
|
_this.onInput = _this.onInput.bind(_assertThisInitialized(_this));
|
|
2906
|
+
_this.onPaste = _this.onPaste.bind(_assertThisInitialized(_this));
|
|
2906
2907
|
_this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));
|
|
2907
2908
|
_this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
|
|
2908
2909
|
_this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));
|
|
@@ -2973,6 +2974,19 @@ var Input = /*#__PURE__*/function (_Nerv$Component) {
|
|
|
2973
2974
|
if (onInput) return onInput(e);
|
|
2974
2975
|
}
|
|
2975
2976
|
}
|
|
2977
|
+
}, {
|
|
2978
|
+
key: "onPaste",
|
|
2979
|
+
value: function onPaste(e) {
|
|
2980
|
+
var onPaste = this.props.onPaste;
|
|
2981
|
+
this.onInputExcuted = false;
|
|
2982
|
+
Object.defineProperty(e, 'detail', {
|
|
2983
|
+
enumerable: true,
|
|
2984
|
+
value: {
|
|
2985
|
+
value: e.target.value
|
|
2986
|
+
}
|
|
2987
|
+
});
|
|
2988
|
+
onPaste && onPaste(e);
|
|
2989
|
+
}
|
|
2976
2990
|
}, {
|
|
2977
2991
|
key: "onFocus",
|
|
2978
2992
|
value: function onFocus(e) {
|
|
@@ -3068,6 +3082,7 @@ var Input = /*#__PURE__*/function (_Nerv$Component) {
|
|
|
3068
3082
|
disabled: disabled,
|
|
3069
3083
|
maxlength: maxLength,
|
|
3070
3084
|
onInput: this.onInput,
|
|
3085
|
+
onPaste: this.onPaste,
|
|
3071
3086
|
onFocus: this.onFocus,
|
|
3072
3087
|
onBlur: this.onBlur,
|
|
3073
3088
|
autofocus: focus,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main:h5": "src/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
|
|
50
50
|
"@babel/plugin-transform-react-jsx": "^7.0.0",
|
|
51
51
|
"@babel/preset-env": "^7.1.5",
|
|
52
|
-
"@tarojs/taro-h5": "2.2.
|
|
52
|
+
"@tarojs/taro-h5": "2.2.19",
|
|
53
53
|
"@types/react": "^16.4.6",
|
|
54
54
|
"@types/urijs": "^1.15.38",
|
|
55
55
|
"babel-core": "^7.0.0-bridge.0",
|
|
56
56
|
"babel-eslint": "10.0.1",
|
|
57
57
|
"babel-jest": "^22.4.4",
|
|
58
58
|
"babel-loader": "^8.0.5",
|
|
59
|
-
"babel-plugin-transform-taroapi": "2.2.
|
|
59
|
+
"babel-plugin-transform-taroapi": "2.2.19",
|
|
60
60
|
"css-loader": "^2.1.1",
|
|
61
61
|
"file-loader": "^3.0.1",
|
|
62
62
|
"jest": "^22.4.4",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"webpack-cli": "^1.0.12",
|
|
68
68
|
"webpack-dev-server": "^3.1.14"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "64d57843cb01f25d9dc738ad26765e7c52cae8e6"
|
|
71
71
|
}
|
|
@@ -27,6 +27,7 @@ class Input extends Nerv.Component {
|
|
|
27
27
|
constructor () {
|
|
28
28
|
super(...arguments)
|
|
29
29
|
this.onInput = this.onInput.bind(this)
|
|
30
|
+
this.onPaste = this.onPaste.bind(this)
|
|
30
31
|
this.onFocus = this.onFocus.bind(this)
|
|
31
32
|
this.onBlur = this.onBlur.bind(this)
|
|
32
33
|
this.onKeyDown = this.onKeyDown.bind(this)
|
|
@@ -90,6 +91,18 @@ class Input extends Nerv.Component {
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
onPaste(e) {
|
|
95
|
+
const { onPaste } = this.props
|
|
96
|
+
this.onInputExcuted = false
|
|
97
|
+
Object.defineProperty(e, 'detail', {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
value: {
|
|
100
|
+
value: e.target.value
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
onPaste && onPaste(e)
|
|
104
|
+
}
|
|
105
|
+
|
|
93
106
|
onFocus (e) {
|
|
94
107
|
const { onFocus } = this.props
|
|
95
108
|
this.onInputExcuted = false
|
|
@@ -181,6 +194,7 @@ class Input extends Nerv.Component {
|
|
|
181
194
|
disabled={disabled}
|
|
182
195
|
maxlength={maxLength}
|
|
183
196
|
onInput={this.onInput}
|
|
197
|
+
onPaste={this.onPaste}
|
|
184
198
|
onFocus={this.onFocus}
|
|
185
199
|
onBlur={this.onBlur}
|
|
186
200
|
autofocus={focus}
|