tplus-components-touch 3.28.2 → 3.28.3
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/components/acCitySelect/CitySelect.js +541 -0
- package/dist/components/acCitySelect/CitySelect.js.map +1 -0
- package/dist/components/acCitySelect/CitySelect.less +10 -0
- package/dist/components/acCitySelect/citys.js +1270 -0
- package/dist/components/acCitySelect/citys.js.map +1 -0
- package/dist/components/acCitySelect/index.js +18 -0
- package/dist/components/acCitySelect/index.js.map +1 -0
- package/dist/components/acCitySelect/provinceData.js +40 -0
- package/dist/components/acCitySelect/provinceData.js.map +1 -0
- package/dist/components/addLog/AddLogProcessor.js +49 -0
- package/dist/components/addLog/AddLogProcessor.js.map +1 -0
- package/dist/components/addLog/OperationLogApi.js +125 -0
- package/dist/components/addLog/OperationLogApi.js.map +1 -0
- package/dist/components/autoComplete/index.js +245 -0
- package/dist/components/autoComplete/index.js.map +1 -0
- package/dist/components/autoComplete/index.less +89 -0
- package/dist/components/autoComplete/option.js +75 -0
- package/dist/components/autoComplete/option.js.map +1 -0
- package/dist/components/autoCompleteWithKeyboard/index.js +231 -0
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -0
- package/dist/components/autoCompleteWithKeyboard/index.less +8 -0
- package/dist/components/billSearch/api.js +465 -0
- package/dist/components/billSearch/api.js.map +1 -0
- package/dist/components/billSearch/index.js +2201 -0
- package/dist/components/billSearch/index.js.map +1 -0
- package/dist/components/billSearch/index.less +376 -0
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +568 -0
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -0
- package/dist/components/cloudPrint/api.js +391 -0
- package/dist/components/cloudPrint/api.js.map +1 -0
- package/dist/components/cloudPrint/index.js +727 -0
- package/dist/components/cloudPrint/index.js.map +1 -0
- package/dist/components/cloudPrint/printDispatch.js +324 -0
- package/dist/components/cloudPrint/printDispatch.js.map +1 -0
- package/dist/components/commonForm/addressPicker/index.js +232 -0
- package/dist/components/commonForm/addressPicker/index.js.map +1 -0
- package/dist/components/commonForm/addressPicker/style.less +11 -0
- package/dist/components/commonForm/autoComplete/index.js +241 -0
- package/dist/components/commonForm/autoComplete/index.js.map +1 -0
- package/dist/components/commonForm/autoComplete/style.less +3 -0
- package/dist/components/commonForm/datePicker/index.js +89 -0
- package/dist/components/commonForm/datePicker/index.js.map +1 -0
- package/dist/components/commonForm/datePicker/style.less +5 -0
- package/dist/components/commonForm/formControl/index.js +143 -0
- package/dist/components/commonForm/formControl/index.js.map +1 -0
- package/dist/components/commonForm/formControl/style.less +0 -0
- package/dist/components/commonForm/index.js +225 -0
- package/dist/components/commonForm/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/index.js +272 -0
- package/dist/components/commonForm/inputNumber/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/style.less +11 -0
- package/dist/components/commonForm/radio/index.js +132 -0
- package/dist/components/commonForm/radio/index.js.map +1 -0
- package/dist/components/commonForm/radio/style.less +0 -0
- package/dist/components/commonForm/style.less +2 -0
- package/dist/components/deliverySearch/api.js +355 -0
- package/dist/components/deliverySearch/api.js.map +1 -0
- package/dist/components/deliverySearch/index.js +1218 -0
- package/dist/components/deliverySearch/index.js.map +1 -0
- package/dist/components/deliverySearch/index.less +554 -0
- package/dist/components/form/index.js +310 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/hardwareAPI/index.js +181 -0
- package/dist/components/hardwareAPI/index.js.map +1 -0
- package/dist/components/hotKey/config.js +306 -0
- package/dist/components/hotKey/config.js.map +1 -0
- package/dist/components/hotKey/hotKeyModal.js +479 -0
- package/dist/components/hotKey/hotKeyModal.js.map +1 -0
- package/dist/components/hotKey/index.js +785 -0
- package/dist/components/hotKey/index.js.map +1 -0
- package/dist/components/hotKey/localConfig.js +1021 -0
- package/dist/components/hotKey/localConfig.js.map +1 -0
- package/dist/components/hotKey/style.less +96 -0
- package/dist/components/hotKey/utils.js +135 -0
- package/dist/components/hotKey/utils.js.map +1 -0
- package/dist/components/input/index.js +251 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/scanInput.js +98 -0
- package/dist/components/input/scanInput.js.map +1 -0
- package/dist/components/input/scanInput.less +28 -0
- package/dist/components/input/style.less +99 -0
- package/dist/components/input/tplusInput/index.js +81 -0
- package/dist/components/input/tplusInput/index.js.map +1 -0
- package/dist/components/input/tplusInput/inputContent.js +128 -0
- package/dist/components/input/tplusInput/inputContent.js.map +1 -0
- package/dist/components/input/tplusInput/inputs.js +151 -0
- package/dist/components/input/tplusInput/inputs.js.map +1 -0
- package/dist/components/input/tplusInput/style.less +132 -0
- package/dist/components/input/utils/index.js +26 -0
- package/dist/components/input/utils/index.js.map +1 -0
- package/dist/components/inventorySearch/api.js +214 -0
- package/dist/components/inventorySearch/api.js.map +1 -0
- package/dist/components/inventorySearch/index.js +303 -0
- package/dist/components/inventorySearch/index.js.map +1 -0
- package/dist/components/inventorySearch/index.less +120 -0
- package/dist/components/inventorySearch/store.js +363 -0
- package/dist/components/inventorySearch/store.js.map +1 -0
- package/dist/components/inventorySearch/tab.js +273 -0
- package/dist/components/inventorySearch/tab.js.map +1 -0
- package/dist/components/keyboard/index.js +255 -0
- package/dist/components/keyboard/index.js.map +1 -0
- package/dist/components/keyboard/index.less +470 -0
- package/dist/components/keyboard/letterKeyboard.js +210 -0
- package/dist/components/keyboard/letterKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboard.js +459 -0
- package/dist/components/keyboard/numKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboardScan.js +195 -0
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -0
- package/dist/components/keyboard/numberButton_input.js +303 -0
- package/dist/components/keyboard/numberButton_input.js.map +1 -0
- package/dist/components/keyboard/numkeyboardPassword.js +460 -0
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -0
- package/dist/components/keyboard/onlyKeyboard.js +90 -0
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton.js +187 -0
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.js +235 -0
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.less +162 -0
- package/dist/components/keyboard/onlyNumberButton.js +128 -0
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -0
- package/dist/components/keyboard/onlyNumberButton2.js +115 -0
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -0
- package/dist/components/keyboard/textKeyboard.js +50 -0
- package/dist/components/keyboard/textKeyboard.js.map +1 -0
- package/dist/components/layout/hamburger.js +29 -0
- package/dist/components/layout/hamburger.js.map +1 -0
- package/dist/components/layout/index.js +31 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/layout.js +182 -0
- package/dist/components/layout/layout.js.map +1 -0
- package/dist/components/layout/sider.js +165 -0
- package/dist/components/layout/sider.js.map +1 -0
- package/dist/components/layout/style.less +82 -0
- package/dist/components/loading/index.js +198 -0
- package/dist/components/loading/index.js.map +1 -0
- package/dist/components/loading/loadingContent.js +185 -0
- package/dist/components/loading/loadingContent.js.map +1 -0
- package/dist/components/loading/style.less +70 -0
- package/dist/components/loading/utils.js +29 -0
- package/dist/components/loading/utils.js.map +1 -0
- package/dist/components/message/index.js +311 -0
- package/dist/components/message/index.js.map +1 -0
- package/dist/components/message/index.less +101 -0
- package/dist/components/modal/index.js +93 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/modal/index.less +19 -0
- package/dist/components/modalVertical/index.js +325 -0
- package/dist/components/modalVertical/index.js.map +1 -0
- package/dist/components/modalVertical/style.less +60 -0
- package/dist/components/modalWraper/index.js +470 -0
- package/dist/components/modalWraper/index.js.map +1 -0
- package/dist/components/modalWraper/style.less +257 -0
- package/dist/components/modalWraper/utils.js +48 -0
- package/dist/components/modalWraper/utils.js.map +1 -0
- package/dist/components/notification/index.js +119 -0
- package/dist/components/notification/index.js.map +1 -0
- package/dist/components/notification/index.less +52 -0
- package/dist/components/overflowTip/index.js +269 -0
- package/dist/components/overflowTip/index.js.map +1 -0
- package/dist/components/overflowTip/style.less +66 -0
- package/dist/components/page/index.js +49 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/components/page/index.less +22 -0
- package/dist/components/product/detail.js +148 -0
- package/dist/components/product/detail.js.map +1 -0
- package/dist/components/product/getCard.js +145 -0
- package/dist/components/product/getCard.js.map +1 -0
- package/dist/components/product/index.less +128 -0
- package/dist/components/progressState/EmptyAndErrorView.js +143 -0
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -0
- package/dist/components/progressState/ProgressState.js +157 -0
- package/dist/components/progressState/ProgressState.js.map +1 -0
- package/dist/components/progressState/index.js +14 -0
- package/dist/components/progressState/index.js.map +1 -0
- package/dist/components/progressState/style.less +65 -0
- package/dist/components/scan/index.js +219 -0
- package/dist/components/scan/index.js.map +1 -0
- package/dist/components/scan/index.less +34 -0
- package/dist/components/select/index.js +28 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/index.less +12 -0
- package/dist/components/settlement/asyncModal.js +204 -0
- package/dist/components/settlement/asyncModal.js.map +1 -0
- package/dist/components/settlement/index.js +16 -0
- package/dist/components/settlement/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/index.js +349 -0
- package/dist/components/settlement/prototypeTable/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/style.less +59 -0
- package/dist/components/settlement/prototypeTable/utils.js +14 -0
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -0
- package/dist/components/settlement/settlement.js +5474 -0
- package/dist/components/settlement/settlement.js.map +1 -0
- package/dist/components/settlement/settlement.less +1595 -0
- package/dist/components/settlement/settlementStore.js +2117 -0
- package/dist/components/settlement/settlementStore.js.map +1 -0
- package/dist/components/settlement/utils.js +249 -0
- package/dist/components/settlement/utils.js.map +1 -0
- package/dist/components/socket/index.js +221 -0
- package/dist/components/socket/index.js.map +1 -0
- package/dist/components/spin/index.js +95 -0
- package/dist/components/spin/index.js.map +1 -0
- package/dist/components/spin/spin-style.less +436 -0
- package/dist/components/test/index.js +330 -0
- package/dist/components/test/index.js.map +1 -0
- package/dist/components/ticon/iconfont/demo.css +539 -0
- package/dist/components/ticon/iconfont/demo_index.html +5202 -0
- package/dist/components/ticon/iconfont/iconfont.css +887 -0
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +35 -0
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -0
- package/dist/components/ticon/iconfont/iconfont.json +1535 -0
- package/dist/components/ticon/iconfont/iconfont.svg +593 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/ticon/index.js +60 -0
- package/dist/components/ticon/index.js.map +1 -0
- package/dist/components/touchScroll/index.js +182 -0
- package/dist/components/touchScroll/index.js.map +1 -0
- package/dist/components/touchTable/AuthProcess.js +42 -0
- package/dist/components/touchTable/AuthProcess.js.map +1 -0
- package/dist/components/touchTable/generateWater.js +59 -0
- package/dist/components/touchTable/generateWater.js.map +1 -0
- package/dist/components/touchTable/index.js +1110 -0
- package/dist/components/touchTable/index.js.map +1 -0
- package/dist/components/touchTable/index.less +370 -0
- package/dist/components/touchTable/utils.js +14 -0
- package/dist/components/touchTable/utils.js.map +1 -0
- package/dist/demo/PopOverDemo.js +126 -0
- package/dist/demo/PopOverDemo.js.map +1 -0
- package/dist/index.js +266 -0
- package/dist/index.js.map +1 -0
- package/dist/util/tools.js +200 -0
- package/dist/util/tools.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = undefined;
|
|
7
|
+
|
|
8
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
9
|
+
|
|
10
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
15
|
+
|
|
16
|
+
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
|
17
|
+
|
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
|
19
|
+
|
|
20
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
21
|
+
|
|
22
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
23
|
+
|
|
24
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
25
|
+
|
|
26
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
27
|
+
|
|
28
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
29
|
+
|
|
30
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
31
|
+
|
|
32
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
33
|
+
|
|
34
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
35
|
+
|
|
36
|
+
var _select = require('antd/es/select');
|
|
37
|
+
|
|
38
|
+
var _select2 = _interopRequireDefault(_select);
|
|
39
|
+
|
|
40
|
+
var _class, _temp; /*
|
|
41
|
+
field{
|
|
42
|
+
Title:'' title
|
|
43
|
+
State:'' input状态
|
|
44
|
+
SingleShow:boolean input如何显示 (带框还是只是展示)
|
|
45
|
+
}
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
require('antd/es/select/style');
|
|
49
|
+
|
|
50
|
+
var _react = require('react');
|
|
51
|
+
|
|
52
|
+
var _react2 = _interopRequireDefault(_react);
|
|
53
|
+
|
|
54
|
+
var _propTypes = require('prop-types');
|
|
55
|
+
|
|
56
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
57
|
+
|
|
58
|
+
var _mutantsUtil = require('mutants-util');
|
|
59
|
+
|
|
60
|
+
var _tplusInput = require('./tplusInput');
|
|
61
|
+
|
|
62
|
+
var _tplusInput2 = _interopRequireDefault(_tplusInput);
|
|
63
|
+
|
|
64
|
+
var _ticon = require('../ticon');
|
|
65
|
+
|
|
66
|
+
var _ticon2 = _interopRequireDefault(_ticon);
|
|
67
|
+
|
|
68
|
+
var _scan = require('../scan');
|
|
69
|
+
|
|
70
|
+
var _scan2 = _interopRequireDefault(_scan);
|
|
71
|
+
|
|
72
|
+
var _numKeyboard = require('../keyboard/numKeyboard');
|
|
73
|
+
|
|
74
|
+
var _numKeyboard2 = _interopRequireDefault(_numKeyboard);
|
|
75
|
+
|
|
76
|
+
require('./style.less');
|
|
77
|
+
|
|
78
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
79
|
+
|
|
80
|
+
var Option = _select2.default.Option;
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
var map = {
|
|
84
|
+
'error': 'inputerror ',
|
|
85
|
+
'tip': 'inputtip '
|
|
86
|
+
};
|
|
87
|
+
var defaultClass = 'input-wrapper-2 ';
|
|
88
|
+
|
|
89
|
+
var Input = (_temp = _class = function (_Component) {
|
|
90
|
+
(0, _inherits3.default)(Input, _Component);
|
|
91
|
+
|
|
92
|
+
function Input(props, context) {
|
|
93
|
+
(0, _classCallCheck3.default)(this, Input);
|
|
94
|
+
|
|
95
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, (Input.__proto__ || (0, _getPrototypeOf2.default)(Input)).call(this, props, context));
|
|
96
|
+
|
|
97
|
+
_this.state = {};
|
|
98
|
+
|
|
99
|
+
_this.onFocus = function (e) {
|
|
100
|
+
var onFocus = _this.props.onFocus;
|
|
101
|
+
|
|
102
|
+
onFocus(e);
|
|
103
|
+
_this.setState({ inputFocus: true });
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
_this.onBlur = function (e) {
|
|
107
|
+
var onBlur = _this.props.onBlur;
|
|
108
|
+
|
|
109
|
+
onBlur(e);
|
|
110
|
+
_this.setState({ inputFocus: false });
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
_this.changeScanProduct = function () {
|
|
114
|
+
if (_this.scanObj) _this.scanObj.startScan();
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
_this.onScanResult = function (val) {
|
|
118
|
+
var _this$props = _this.props,
|
|
119
|
+
handleChange = _this$props.handleChange,
|
|
120
|
+
handleOk = _this$props.handleOk;
|
|
121
|
+
|
|
122
|
+
handleChange && handleChange(val);
|
|
123
|
+
handleOk && handleOk();
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
var _ref = _mutantsUtil.platform || {},
|
|
127
|
+
isHorizontalPad = _ref.isHorizontalPad;
|
|
128
|
+
|
|
129
|
+
_this.isMobileEnvironment = !!isHorizontalPad;
|
|
130
|
+
return _this;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
//移动端:扫描商品
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
(0, _createClass3.default)(Input, [{
|
|
137
|
+
key: 'render',
|
|
138
|
+
value: function render() {
|
|
139
|
+
var _this2 = this;
|
|
140
|
+
|
|
141
|
+
var _props = this.props,
|
|
142
|
+
className = _props.className,
|
|
143
|
+
State = _props.State,
|
|
144
|
+
Label = _props.Label,
|
|
145
|
+
Title = _props.Title,
|
|
146
|
+
IsScan = _props.IsScan,
|
|
147
|
+
Value = _props.Value,
|
|
148
|
+
SingleShow = _props.SingleShow,
|
|
149
|
+
Style = _props.Style,
|
|
150
|
+
InputStyle = _props.InputStyle,
|
|
151
|
+
tplusInput = _props.tplusInput,
|
|
152
|
+
onFocus = _props.onFocus,
|
|
153
|
+
onBlur = _props.onBlur,
|
|
154
|
+
ControlType = _props.ControlType,
|
|
155
|
+
type = _props.type,
|
|
156
|
+
type1 = _props.type1,
|
|
157
|
+
precisionLength = _props.precisionLength,
|
|
158
|
+
maxLength = _props.maxLength,
|
|
159
|
+
_props$inputClassName = _props.inputClassName,
|
|
160
|
+
inputClassName = _props$inputClassName === undefined ? '' : _props$inputClassName,
|
|
161
|
+
props = (0, _objectWithoutProperties3.default)(_props, ['className', 'State', 'Label', 'Title', 'IsScan', 'Value', 'SingleShow', 'Style', 'InputStyle', 'tplusInput', 'onFocus', 'onBlur', 'ControlType', 'type', 'type1', 'precisionLength', 'maxLength', 'inputClassName']);
|
|
162
|
+
var inputFocus = this.state.inputFocus;
|
|
163
|
+
//解决浏览器自动填充密码的问题
|
|
164
|
+
|
|
165
|
+
if ('password' === type) {
|
|
166
|
+
props.autocomplete = "new-password";
|
|
167
|
+
props.type = 'password';
|
|
168
|
+
}
|
|
169
|
+
if (tplusInput) {
|
|
170
|
+
return _react2.default.createElement(_tplusInput2.default, (0, _extends3.default)({
|
|
171
|
+
className: className,
|
|
172
|
+
onFocus: onFocus,
|
|
173
|
+
onBlur: onBlur,
|
|
174
|
+
type: type
|
|
175
|
+
}, props));
|
|
176
|
+
}
|
|
177
|
+
className = defaultClass + (map[State] || '') + className;
|
|
178
|
+
var isShowScan = this.isMobileEnvironment && IsScan == true ? true : false;
|
|
179
|
+
return _react2.default.createElement(
|
|
180
|
+
'div',
|
|
181
|
+
{ className: className },
|
|
182
|
+
_react2.default.createElement(
|
|
183
|
+
'div',
|
|
184
|
+
null,
|
|
185
|
+
SingleShow ? _react2.default.createElement(
|
|
186
|
+
'span',
|
|
187
|
+
(0, _extends3.default)({ className: 'value value-singleshow', style: Style }, props),
|
|
188
|
+
Value
|
|
189
|
+
) : ControlType !== 'NumTextBox' ? _react2.default.createElement(
|
|
190
|
+
'div',
|
|
191
|
+
{ className: isShowScan ? 'curInput pad' : 'curInput' },
|
|
192
|
+
_react2.default.createElement('input', (0, _extends3.default)({
|
|
193
|
+
className: 'value ' + inputClassName + ' ' + (inputFocus ? 'b-theme' : 'inputBlurColor'),
|
|
194
|
+
style: InputStyle,
|
|
195
|
+
value: Value,
|
|
196
|
+
maxLength: maxLength ? maxLength : "",
|
|
197
|
+
onFocus: this.onFocus,
|
|
198
|
+
onBlur: this.onBlur
|
|
199
|
+
}, props)),
|
|
200
|
+
isShowScan && _react2.default.createElement(
|
|
201
|
+
'div',
|
|
202
|
+
{ className: 'curScan' },
|
|
203
|
+
_react2.default.createElement(_ticon2.default, { type: 'saomiao1', className: 'icon', onClick: this.changeScanProduct }),
|
|
204
|
+
_react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
|
205
|
+
return _this2.scanObj = scan;
|
|
206
|
+
}, onChange: function onChange(value) {
|
|
207
|
+
return _this2.onScanResult(value);
|
|
208
|
+
} })
|
|
209
|
+
)
|
|
210
|
+
) : _react2.default.createElement(_numKeyboard2.default, (0, _extends3.default)({
|
|
211
|
+
inputClassName: 'value ' + inputClassName + ' ' + (inputFocus ? 'b-theme' : ''),
|
|
212
|
+
type: type1,
|
|
213
|
+
defaultValue: Value,
|
|
214
|
+
onFocus: this.onFocus,
|
|
215
|
+
onBlur: this.onBlur,
|
|
216
|
+
precisionLength: precisionLength,
|
|
217
|
+
maxLength: maxLength
|
|
218
|
+
}, props))
|
|
219
|
+
)
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
}]);
|
|
223
|
+
return Input;
|
|
224
|
+
}(_react.Component), _class.propTypes = {
|
|
225
|
+
className: _propTypes2.default.string, //外层元素类名
|
|
226
|
+
State: _propTypes2.default.string, //input 状态 (错误error /提示tip)
|
|
227
|
+
Label: _propTypes2.default.string, //提示信息:label
|
|
228
|
+
Title: _propTypes2.default.string, //左侧title
|
|
229
|
+
Value: _propTypes2.default.string, //值
|
|
230
|
+
SingleShow: _propTypes2.default.bool, //input 或者 展示文字
|
|
231
|
+
Style: _propTypes2.default.object, //展示文字的 style
|
|
232
|
+
InputStyle: _propTypes2.default.object, //input的style
|
|
233
|
+
ControlType: _propTypes2.default.string, //空间类型:字符型
|
|
234
|
+
type1: _propTypes2.default.string //:数字取值范围 (正负)
|
|
235
|
+
}, _class.defaultProps = {
|
|
236
|
+
className: '',
|
|
237
|
+
State: '',
|
|
238
|
+
Label: '',
|
|
239
|
+
Title: '',
|
|
240
|
+
Value: '',
|
|
241
|
+
SingleShow: false,
|
|
242
|
+
Style: {},
|
|
243
|
+
InputStyle: {},
|
|
244
|
+
onFocus: function onFocus() {},
|
|
245
|
+
onBlur: function onBlur() {}
|
|
246
|
+
}, _temp);
|
|
247
|
+
exports.default = Input;
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
Input.Option = Option; //Select.Option
|
|
251
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/input/index.js"],"names":["Option","map","defaultClass","Input","props","context","state","onFocus","e","setState","inputFocus","onBlur","changeScanProduct","scanObj","startScan","onScanResult","val","handleChange","handleOk","platform","isHorizontalPad","isMobileEnvironment","className","State","Label","Title","IsScan","Value","SingleShow","Style","InputStyle","tplusInput","ControlType","type","type1","precisionLength","maxLength","inputClassName","autocomplete","isShowScan","scan","value","Component","propTypes","PropTypes","string","bool","object","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;;;;;;;;AAQA;;;;AACA;;;;AAEA;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;IAEOA,M,oBAAAA,M;;;AAEP,IAAMC,MAAM;AACR,aAAS,aADD;AAER,WAAO;AAFC,CAAZ;AAIA,IAAMC,eAAe,kBAArB;;IAEqBC,K;;;AACjB,mBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,wIAClBD,KADkB,EACXC,OADW;;AAAA,cAgC5BC,KAhC4B,GAgCpB,EAhCoB;;AAAA,cAkC5BC,OAlC4B,GAkClB,UAACC,CAAD,EAAO;AAAA,gBACRD,OADQ,G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AAM,CAAE;AAVA,C;kBApBHR,K;;;AA4HrBA,MAAMH,MAAN,GAAeA,MAAf,C,CAAuB","file":"index.js","sourcesContent":["/*\n field{\n Title:'' title\n State:'' input状态\n SingleShow:boolean input如何显示 (带框还是只是展示)\n }\n*/\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Select } from 'antd';\nimport { platform } from 'mutants-util';\nimport TplusInput from './tplusInput';\nimport Ticon from '../ticon';\nimport Scan from '../scan';\nimport NumKeyboard from '../keyboard/numKeyboard';\nimport './style.less';\n\nconst {Option} = Select;\n\nconst map = {\n 'error': 'inputerror ',\n 'tip': 'inputtip ',\n}\nconst defaultClass = 'input-wrapper-2 '\n\nexport default class Input extends Component {\n constructor(props, context) {\n super(props, context)\n const { isHorizontalPad } = platform || {};\n this.isMobileEnvironment = !!isHorizontalPad;\n }\n\n static propTypes={\n className:PropTypes.string,//外层元素类名\n State:PropTypes.string,//input 状态 (错误error /提示tip)\n Label:PropTypes.string,//提示信息:label\n Title:PropTypes.string,//左侧title\n Value:PropTypes.string,//值\n SingleShow:PropTypes.bool,//input 或者 展示文字\n Style:PropTypes.object,//展示文字的 style\n InputStyle:PropTypes.object,//input的style\n ControlType:PropTypes.string,//空间类型:字符型\n type1:PropTypes.string//:数字取值范围 (正负)\n }\n\n static defaultProps={\n className:'',\n State:'',\n Label:'',\n Title:'',\n Value:'',\n SingleShow:false,\n Style:{},\n InputStyle:{},\n onFocus: () => {},\n onBlur: () => {},\n }\n\n state = {};\n\n onFocus = (e) => {\n const {onFocus} = this.props;\n onFocus(e);\n this.setState({inputFocus: true});\n }\n\n onBlur = (e) => {\n const {onBlur} = this.props;\n onBlur(e);\n this.setState({inputFocus: false});\n }\n\n //移动端:扫描商品\n changeScanProduct = () => {\n if (this.scanObj) this.scanObj.startScan()\n }\n onScanResult = (val) => {\n const { handleChange, handleOk } = this.props;\n handleChange && handleChange(val);\n handleOk && handleOk();\n }\n\n render(){\n let { className, State, Label, Title,IsScan, Value, SingleShow, Style, InputStyle, tplusInput, onFocus, onBlur, ControlType, type, type1, precisionLength, maxLength, inputClassName = '', ...props } = this.props;\n const { inputFocus } = this.state;\n //解决浏览器自动填充密码的问题\n if ('password' === type) {\n props.autocomplete = \"new-password\";\n props.type = 'password';\n }\n if (tplusInput) {\n return <TplusInput\n className={className}\n onFocus={onFocus}\n onBlur={onBlur}\n type={type}\n {...props}\n />\n }\n className = defaultClass + (map[State] || '') + className;\n let isShowScan = (this.isMobileEnvironment && IsScan == true) ? true : false;\n return (\n <div className={className}>\n {/*{*/}\n {/* !!Title.length &&*/}\n {/* <label>{Title}:</label>*/}\n {/*}*/}\n <div>\n {\n SingleShow ? <span className='value value-singleshow' style={Style} {...props}>{Value}</span> :\n ControlType !== 'NumTextBox' ?\n <div className={isShowScan ? 'curInput pad' : 'curInput'}>\n <input\n className={`value ${inputClassName} ${inputFocus ? 'b-theme' : 'inputBlurColor'}`}\n style={InputStyle}\n value={Value}\n maxLength={maxLength ? maxLength : \"\"}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n {...props}\n />\n {\n isShowScan &&\n <div className='curScan'>\n <Ticon type='saomiao1' className='icon' onClick={this.changeScanProduct} />\n <Scan ref={scan => this.scanObj = scan} onChange={value => this.onScanResult(value)} />\n </div>\n }\n </div>\n\n :\n <NumKeyboard\n inputClassName={`value ${inputClassName} ${inputFocus ? 'b-theme' : ''}`}\n type={type1}\n defaultValue={Value}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n precisionLength={precisionLength}\n maxLength={maxLength}\n {...props}\n />\n }\n </div>\n </div>\n\n )\n }\n}\n\nInput.Option = Option; //Select.Option\n"]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = undefined;
|
|
7
|
+
|
|
8
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
9
|
+
|
|
10
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
15
|
+
|
|
16
|
+
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
|
17
|
+
|
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
|
19
|
+
|
|
20
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
21
|
+
|
|
22
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
23
|
+
|
|
24
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
25
|
+
|
|
26
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
27
|
+
|
|
28
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
29
|
+
|
|
30
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
31
|
+
|
|
32
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
33
|
+
|
|
34
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
35
|
+
|
|
36
|
+
var _react = require('react');
|
|
37
|
+
|
|
38
|
+
var _react2 = _interopRequireDefault(_react);
|
|
39
|
+
|
|
40
|
+
var _mutantsUtil = require('mutants-util');
|
|
41
|
+
|
|
42
|
+
require('./scanInput.less');
|
|
43
|
+
|
|
44
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
|
+
|
|
46
|
+
var SInput = function (_Component) {
|
|
47
|
+
(0, _inherits3.default)(SInput, _Component);
|
|
48
|
+
|
|
49
|
+
function SInput(props, context) {
|
|
50
|
+
(0, _classCallCheck3.default)(this, SInput);
|
|
51
|
+
|
|
52
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, (SInput.__proto__ || (0, _getPrototypeOf2.default)(SInput)).call(this, props, context));
|
|
53
|
+
|
|
54
|
+
_this.getIput = function () {
|
|
55
|
+
return _this.input;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var _ref = _mutantsUtil.platform || {},
|
|
59
|
+
isHorizontalPad = _ref.isHorizontalPad;
|
|
60
|
+
|
|
61
|
+
_this.isMobileEnvironment = !!isHorizontalPad;
|
|
62
|
+
return _this;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
(0, _createClass3.default)(SInput, [{
|
|
66
|
+
key: 'render',
|
|
67
|
+
value: function render() {
|
|
68
|
+
var _this2 = this;
|
|
69
|
+
|
|
70
|
+
var _props = this.props,
|
|
71
|
+
ref = _props.ref,
|
|
72
|
+
className = _props.className,
|
|
73
|
+
suffix = _props.suffix,
|
|
74
|
+
props = (0, _objectWithoutProperties3.default)(_props, ['ref', 'className', 'suffix']);
|
|
75
|
+
|
|
76
|
+
return _react2.default.createElement(
|
|
77
|
+
'div',
|
|
78
|
+
{ className: 'productSearchInput ' + (className || '') },
|
|
79
|
+
_react2.default.createElement(
|
|
80
|
+
'div',
|
|
81
|
+
{ className: 'input' },
|
|
82
|
+
_react2.default.createElement('input', (0, _extends3.default)({ ref: function ref(el) {
|
|
83
|
+
return _this2.input = el;
|
|
84
|
+
} }, props))
|
|
85
|
+
),
|
|
86
|
+
_react2.default.createElement(
|
|
87
|
+
'div',
|
|
88
|
+
{ className: 'icon' },
|
|
89
|
+
suffix
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
}]);
|
|
94
|
+
return SInput;
|
|
95
|
+
}(_react.Component);
|
|
96
|
+
|
|
97
|
+
exports.default = SInput;
|
|
98
|
+
//# sourceMappingURL=scanInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/input/scanInput.js"],"names":["SInput","props","context","getIput","input","platform","isHorizontalPad","isMobileEnvironment","ref","className","suffix","el","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;;;IAEqBA,M;;;AAEjB,oBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,0IAClBD,KADkB,EACXC,OADW;;AAAA,cAM5BC,OAN4B,GAMlB,YAAI;AACV,mBAAO,MAAKC,KAAZ;AACH,SAR2B;;AAAA,mBAEIC,yBAAY,EAFhB;AAAA,YAEhBC,eAFgB,QAEhBA,eAFgB;;AAGxB,cAAKC,mBAAL,GAA2B,CAAC,CAACD,eAA7B;AAHwB;AAI3B;;;;iCAMQ;AAAA;;AAAA,yBACsC,KAAKL,KAD3C;AAAA,gBACCO,GADD,UACCA,GADD;AAAA,gBACMC,SADN,UACMA,SADN;AAAA,gBACiBC,MADjB,UACiBA,MADjB;AAAA,gBAC4BT,KAD5B;;AAEL,mBACI;AAAA;AAAA,kBAAK,oCAAiCQ,aAAa,EAA9C,CAAL;AACI;AAAA;AAAA,sBAAK,WAAU,OAAf;AACI,oFAAO,KAAK;AAAA,mCAAM,OAAKL,KAAL,GAAaO,EAAnB;AAAA,yBAAZ,IAAuCV,KAAvC;AADJ,iBADJ;AAII;AAAA;AAAA,sBAAK,WAAU,MAAf;AAEQS;AAFR;AAJJ,aADJ;AAYH;;;EA1B+BE,gB;;kBAAfZ,M","file":"scanInput.js","sourcesContent":["import React, { Component } from 'react';\nimport { platform } from 'mutants-util';\nimport './scanInput.less';\n\nexport default class SInput extends Component {\n\n constructor(props, context) {\n super(props, context)\n const { isHorizontalPad } = platform || {};\n this.isMobileEnvironment = !!isHorizontalPad;\n }\n\n getIput = ()=>{\n return this.input;\n }\n\n render() {\n let { ref, className, suffix, ...props } = this.props;\n return (\n <div className={`productSearchInput ${className || ''}`}>\n <div className='input'>\n <input ref={el => this.input = el} {...props} />\n </div>\n <div className='icon'>\n {\n suffix\n }\n </div>\n </div>\n )\n }\n}"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.productSearchInput{
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
border: 1px solid #a49f9f;
|
|
6
|
+
border-radius: 3px;
|
|
7
|
+
min-width: 300px;
|
|
8
|
+
|
|
9
|
+
.input{
|
|
10
|
+
width: 90%;
|
|
11
|
+
input {
|
|
12
|
+
width: 100%;
|
|
13
|
+
font-size: 15px;
|
|
14
|
+
height: 32px;
|
|
15
|
+
line-height: 32px;
|
|
16
|
+
border: 0;
|
|
17
|
+
padding: 3px 5px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.icon{
|
|
21
|
+
width: 10%;
|
|
22
|
+
text-align: right;
|
|
23
|
+
padding-right: 5px;
|
|
24
|
+
i{
|
|
25
|
+
font-size: 20px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
|
|
2
|
+
.input-wrapper-2{
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width:100%;
|
|
5
|
+
text-align: left;
|
|
6
|
+
label{
|
|
7
|
+
display:inline-block;
|
|
8
|
+
text-align: right;
|
|
9
|
+
line-height: 32px;
|
|
10
|
+
padding-right:12px;
|
|
11
|
+
vertical-align: top;
|
|
12
|
+
width:100px;
|
|
13
|
+
font-size:14px!important;
|
|
14
|
+
}
|
|
15
|
+
>div{
|
|
16
|
+
display: inline-block;
|
|
17
|
+
input:focus{
|
|
18
|
+
outline: #d6d6db
|
|
19
|
+
}
|
|
20
|
+
input[disabled]{
|
|
21
|
+
background: #eaebed
|
|
22
|
+
}
|
|
23
|
+
input{
|
|
24
|
+
position: relative;
|
|
25
|
+
display: inline-block;
|
|
26
|
+
padding: 5px 12px;
|
|
27
|
+
width: 253px;
|
|
28
|
+
cursor: text;
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
color: #424242;
|
|
31
|
+
background-color: #fff;
|
|
32
|
+
background-image: none;
|
|
33
|
+
border-radius: 3px;
|
|
34
|
+
-webkit-transition: all .3s;
|
|
35
|
+
transition: all .3s;
|
|
36
|
+
}
|
|
37
|
+
.value.value-singleshow{
|
|
38
|
+
border:none!important;
|
|
39
|
+
}
|
|
40
|
+
.value{
|
|
41
|
+
//display: inline-block!important;
|
|
42
|
+
//line-height: 32px!important;
|
|
43
|
+
//height: 32px!important;
|
|
44
|
+
//font-size: 14px!important;
|
|
45
|
+
width:253px!important;
|
|
46
|
+
//border: 1px solid #C8C8CD!important;
|
|
47
|
+
&.inputBlurColor {
|
|
48
|
+
border: 1px solid #C8C8CD !important;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.curInput {
|
|
54
|
+
display : flex;
|
|
55
|
+
align-items : center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
|
|
58
|
+
.curScan {
|
|
59
|
+
margin-left : -25px;
|
|
60
|
+
margin-bottom: 5px;
|
|
61
|
+
z-index : 1;
|
|
62
|
+
|
|
63
|
+
i {
|
|
64
|
+
font-size: 20px;
|
|
65
|
+
color : #666666
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.pad input {
|
|
71
|
+
padding-right: 28px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.input-wrapper-2.inputerror{
|
|
75
|
+
>div{
|
|
76
|
+
input{
|
|
77
|
+
background:white;
|
|
78
|
+
outline: red;
|
|
79
|
+
border:1px red solid;
|
|
80
|
+
}
|
|
81
|
+
span{
|
|
82
|
+
color:red
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
.input-wrapper-2.inputtip{
|
|
88
|
+
>div{
|
|
89
|
+
input{
|
|
90
|
+
background:white;
|
|
91
|
+
outline: red;
|
|
92
|
+
border:1px red solid;
|
|
93
|
+
}
|
|
94
|
+
span{
|
|
95
|
+
color:#777
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = TplusInput;
|
|
7
|
+
|
|
8
|
+
var _react = require('react');
|
|
9
|
+
|
|
10
|
+
var _react2 = _interopRequireDefault(_react);
|
|
11
|
+
|
|
12
|
+
var _propTypes = require('prop-types');
|
|
13
|
+
|
|
14
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
15
|
+
|
|
16
|
+
var _inputContent = require('./inputContent');
|
|
17
|
+
|
|
18
|
+
var _inputContent2 = _interopRequireDefault(_inputContent);
|
|
19
|
+
|
|
20
|
+
require('./style.less');
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Created by hzy on 2019/4/26.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* @style style
|
|
29
|
+
* @className className
|
|
30
|
+
* @tplusInput Boolean 指定为tplusInput输入框
|
|
31
|
+
* @bottomLine Boolean 是否为单行输入框
|
|
32
|
+
* @type Sting 输入框类型 native | select 不传默认为bee FormControl组件
|
|
33
|
+
* @value Sting 输入框value值
|
|
34
|
+
* @prefix Sting || element 输入框左侧icon,可以为iconfont字体class,或者自定义react node
|
|
35
|
+
* @suffix Sting || element 输入框右侧icon,可以为iconfont字体class,或者自定义react node
|
|
36
|
+
* @onClick: Func 点击输入框触发的click事件
|
|
37
|
+
* @title: Sting 输入框标题
|
|
38
|
+
* @error: Sting 输入框校验错误状态下文字内容
|
|
39
|
+
* @placeholder: Sting 输入框placeholder
|
|
40
|
+
* @inputRef: Func 获取输入框实例 ex: <Input tplusInput ref={ref => this.inputRef = ref} />
|
|
41
|
+
* @vertical: Boolean 启用竖屏中样式覆盖
|
|
42
|
+
*
|
|
43
|
+
* @htmlType Sting native类型下的html input类型
|
|
44
|
+
* @noAutocomplete Boolean native类型下: 是否禁用自动填充
|
|
45
|
+
* @disabled Boolean native类型下: 是否禁用输入
|
|
46
|
+
* @size Sting native类型下: 适配 bee FormControl组件的输入框尺寸样式,可选值 sm | 默认 | lg
|
|
47
|
+
* @onChange: Func native类型下: 输入框内容变化时的回调
|
|
48
|
+
* @onFocus: Func native类型下: 输入框获取焦点时的回调
|
|
49
|
+
*
|
|
50
|
+
* @selectPlaceholder Boolean select类型下: 是否在select前显示占位层级(会阻止触发onChange)
|
|
51
|
+
* @arrowPlaceholder Boolean select类型下: 会用一块空的div遮挡arrow icon(触发事件冒泡)
|
|
52
|
+
* @arrowPlaceholderClass String className
|
|
53
|
+
*
|
|
54
|
+
* 其他参数为对应bee组件参数
|
|
55
|
+
*/
|
|
56
|
+
function TplusInput(props) {
|
|
57
|
+
return _react2.default.createElement(_inputContent2.default, props);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
TplusInput.propTypes = {
|
|
61
|
+
style: _propTypes2.default.object,
|
|
62
|
+
className: _propTypes2.default.string,
|
|
63
|
+
placeholder: _propTypes2.default.string,
|
|
64
|
+
bottomLine: _propTypes2.default.bool,
|
|
65
|
+
disabled: _propTypes2.default.bool,
|
|
66
|
+
vertical: _propTypes2.default.bool,
|
|
67
|
+
prefix: (0, _propTypes.oneOfType)([_propTypes2.default.string, _propTypes2.default.element]),
|
|
68
|
+
suffix: (0, _propTypes.oneOfType)([_propTypes2.default.string, _propTypes2.default.element]),
|
|
69
|
+
htmlType: _propTypes2.default.string,
|
|
70
|
+
type: _propTypes2.default.string,
|
|
71
|
+
noAutocomplete: _propTypes2.default.bool,
|
|
72
|
+
inputRef: _propTypes2.default.func,
|
|
73
|
+
value: (0, _propTypes.oneOfType)([_propTypes2.default.string, _propTypes2.default.number]),
|
|
74
|
+
selectPlaceholder: _propTypes2.default.bool,
|
|
75
|
+
placeholderClick: _propTypes2.default.func,
|
|
76
|
+
size: _propTypes2.default.string,
|
|
77
|
+
onClick: _propTypes2.default.func,
|
|
78
|
+
onChange: _propTypes2.default.func,
|
|
79
|
+
onFocus: _propTypes2.default.func
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/input/tplusInput/index.js"],"names":["TplusInput","props","propTypes","style","PropTypes","object","className","string","placeholder","bottomLine","bool","disabled","vertical","prefix","element","suffix","htmlType","type","noAutocomplete","inputRef","func","value","number","selectPlaceholder","placeholderClick","size","onClick","onChange","onFocus"],"mappings":";;;;;kBAqCwBA,U;;AALxB;;;;AACA;;;;AACA;;;;AACA;;;;AAnCA;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCe,SAASA,UAAT,CAAoBC,KAApB,EAA2B;AACxC,SACE,8BAAC,sBAAD,EACMA,KADN,CADF;AAKD;;AAEDD,WAAWE,SAAX,GAAuB;AACrBC,SAAOC,oBAAUC,MADI;AAErBC,aAAWF,oBAAUG,MAFA;AAGrBC,eAAaJ,oBAAUG,MAHF;AAIrBE,cAAYL,oBAAUM,IAJD;AAKrBC,YAAUP,oBAAUM,IALC;AAMrBE,YAAUR,oBAAUM,IANC;AAOrBG,UAAQ,0BAAU,CAChBT,oBAAUG,MADM,EAEhBH,oBAAUU,OAFM,CAAV,CAPa;AAWrBC,UAAQ,0BAAU,CAChBX,oBAAUG,MADM,EAEhBH,oBAAUU,OAFM,CAAV,CAXa;AAerBE,YAAUZ,oBAAUG,MAfC;AAgBrBU,QAAMb,oBAAUG,MAhBK;AAiBrBW,kBAAgBd,oBAAUM,IAjBL;AAkBrBS,YAAUf,oBAAUgB,IAlBC;AAmBrBC,SAAO,0BAAU,CACfjB,oBAAUG,MADK,EAEfH,oBAAUkB,MAFK,CAAV,CAnBc;AAuBrBC,qBAAmBnB,oBAAUM,IAvBR;AAwBrBc,oBAAkBpB,oBAAUgB,IAxBP;AAyBrBK,QAAMrB,oBAAUG,MAzBK;AA0BrBmB,WAAStB,oBAAUgB,IA1BE;AA2BrBO,YAAUvB,oBAAUgB,IA3BC;AA4BrBQ,WAASxB,oBAAUgB;AA5BE,CAAvB","file":"index.js","sourcesContent":["/**\n * Created by hzy on 2019/4/26.\n */\n/**\n * @style style\n * @className className\n * @tplusInput Boolean 指定为tplusInput输入框\n * @bottomLine Boolean 是否为单行输入框\n * @type Sting 输入框类型 native | select 不传默认为bee FormControl组件\n * @value Sting 输入框value值\n * @prefix Sting || element 输入框左侧icon,可以为iconfont字体class,或者自定义react node\n * @suffix Sting || element 输入框右侧icon,可以为iconfont字体class,或者自定义react node\n * @onClick: Func 点击输入框触发的click事件\n * @title: Sting 输入框标题\n * @error: Sting 输入框校验错误状态下文字内容\n * @placeholder: Sting 输入框placeholder\n * @inputRef: Func 获取输入框实例 ex: <Input tplusInput ref={ref => this.inputRef = ref} />\n * @vertical: Boolean 启用竖屏中样式覆盖\n *\n * @htmlType Sting native类型下的html input类型\n * @noAutocomplete Boolean native类型下: 是否禁用自动填充\n * @disabled Boolean native类型下: 是否禁用输入\n * @size Sting native类型下: 适配 bee FormControl组件的输入框尺寸样式,可选值 sm | 默认 | lg\n * @onChange: Func native类型下: 输入框内容变化时的回调\n * @onFocus: Func native类型下: 输入框获取焦点时的回调\n *\n * @selectPlaceholder Boolean select类型下: 是否在select前显示占位层级(会阻止触发onChange)\n * @arrowPlaceholder Boolean select类型下: 会用一块空的div遮挡arrow icon(触发事件冒泡)\n * @arrowPlaceholderClass String className\n *\n * 其他参数为对应bee组件参数\n */\nimport React from 'react';\nimport PropTypes, {oneOfType} from 'prop-types';\nimport InputContent from './inputContent';\nimport './style.less';\n\nexport default function TplusInput(props) {\n return (\n <InputContent\n {...props}\n />\n );\n}\n\nTplusInput.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n placeholder: PropTypes.string,\n bottomLine: PropTypes.bool,\n disabled: PropTypes.bool,\n vertical: PropTypes.bool,\n prefix: oneOfType([\n PropTypes.string,\n PropTypes.element\n ]),\n suffix: oneOfType([\n PropTypes.string,\n PropTypes.element\n ]),\n htmlType: PropTypes.string,\n type: PropTypes.string,\n noAutocomplete: PropTypes.bool,\n inputRef: PropTypes.func,\n value: oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n selectPlaceholder: PropTypes.bool,\n placeholderClick: PropTypes.func,\n size: PropTypes.string,\n onClick: PropTypes.func,\n onChange: PropTypes.func,\n onFocus: PropTypes.func,\n};\n"]}
|