dlt-for-react 1.0.2 → 1.0.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/README.md +3 -1
- package/assets/components/KyInputPicker/index.less +8 -0
- package/assets/components/KyModal/index.less +21 -0
- package/assets/components/KyPreview/index.less +38 -0
- package/assets/components/KyUpload/index.less +41 -0
- package/lib/components/DragM/index.js +127 -0
- package/lib/components/KyInputPicker/edit-page.js +585 -0
- package/lib/components/KyInputPicker/index.js +220 -0
- package/lib/components/KyInputPicker/input-const.js +134 -0
- package/lib/components/KyInputPicker/render.js +2480 -0
- package/lib/components/KyInputPicker/setting-checkbox.js +850 -0
- package/lib/components/KyInputPicker/setting-datepicker.js +430 -0
- package/lib/components/KyInputPicker/setting-datetimepicker.js +443 -0
- package/lib/components/KyInputPicker/setting-input.js +555 -0
- package/lib/components/KyInputPicker/setting-inputNumber.js +612 -0
- package/lib/components/KyInputPicker/setting-monthpicker.js +434 -0
- package/lib/components/KyInputPicker/setting-multiSelect.js +532 -0
- package/lib/components/KyInputPicker/setting-nhcascader.js +584 -0
- package/lib/components/KyInputPicker/setting-old-upload.js +428 -0
- package/lib/components/KyInputPicker/setting-radio.js +468 -0
- package/lib/components/KyInputPicker/setting-rangepicker.js +466 -0
- package/lib/components/KyInputPicker/setting-select.js +534 -0
- package/lib/components/KyInputPicker/setting-stu-selector.js +507 -0
- package/lib/components/KyInputPicker/setting-switch.js +274 -0
- package/lib/components/KyInputPicker/setting-tea-selector.js +507 -0
- package/lib/components/KyInputPicker/setting-textarea.js +619 -0
- package/lib/components/KyInputPicker/setting-timepicker.js +437 -0
- package/lib/components/KyInputPicker/setting-upload.js +766 -0
- package/lib/components/KyModal/buildTitle.js +81 -0
- package/lib/components/KyModal/dragM.js +127 -0
- package/lib/components/KyModal/index.js +321 -0
- package/lib/components/KyPreview/index.js +209 -0
- package/lib/components/KyUpload/index.js +1156 -0
- package/lib/index.js +84 -31
- package/lib/layouts/Login/index.js +522 -458
- package/lib/layouts/Login/lyPassword.js +8 -10
- package/lib/layouts/Top/index.js +308 -254
- package/lib/layouts/TopMenu/index.js +270 -265
- package/lib/layouts/mixTop/index.js +274 -243
- package/package.json +10 -4
|
@@ -168,8 +168,6 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
168
168
|
}
|
|
169
169
|
var onChange = _this3.props.onChange;
|
|
170
170
|
var value = _this3.state.value;
|
|
171
|
-
// console.log('old', value)
|
|
172
|
-
// console.log('now', e.target.value)
|
|
173
171
|
|
|
174
172
|
var _getEncrypt = _this3.getEncrypt(e.target.value, value, e.nativeEvent.type, e.nativeEvent.inputType),
|
|
175
173
|
newValue = _getEncrypt.newValue,
|
|
@@ -187,18 +185,18 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
187
185
|
var nowValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
188
186
|
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
189
187
|
var type = arguments[2];
|
|
190
|
-
var inputType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] :
|
|
188
|
+
var inputType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
191
189
|
var encryptMark = _this3.props.encryptMark;
|
|
192
190
|
|
|
193
|
-
if (type ===
|
|
191
|
+
if (type === 'compositionend') {
|
|
194
192
|
// 输入中文与手动输入的处理方法一致
|
|
195
|
-
inputType =
|
|
193
|
+
inputType = 'insertText';
|
|
196
194
|
}
|
|
197
195
|
var lastEncryptMarkIndex = nowValue.lastIndexOf(encryptMark);
|
|
198
|
-
if (inputType ===
|
|
196
|
+
if (inputType === 'insertFromPaste') {
|
|
199
197
|
// 粘贴
|
|
200
|
-
value =
|
|
201
|
-
} else if (inputType ===
|
|
198
|
+
value = '';
|
|
199
|
+
} else if (inputType === 'deleteContentBackward') {
|
|
202
200
|
// 删除
|
|
203
201
|
value = value.slice(0, value.length - 1);
|
|
204
202
|
}
|
|
@@ -208,8 +206,8 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
208
206
|
var retainText = value.slice(0, lastEncryptMarkIndex + 1);
|
|
209
207
|
// const newValue = retainText + changeText
|
|
210
208
|
|
|
211
|
-
var newValue =
|
|
212
|
-
if (value.length >= nowValue.length && inputType ===
|
|
209
|
+
var newValue = '';
|
|
210
|
+
if (value.length >= nowValue.length && inputType === 'insertText') {
|
|
213
211
|
// 全选后输入一个字符的情况
|
|
214
212
|
newValue = nowValue;
|
|
215
213
|
} else {
|