@kdcloudjs/kdesign 1.8.26 → 1.8.27

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/kdesign.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/kdesign v1.8.26
3
+ * @kdcloudjs/kdesign v1.8.27
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -9916,8 +9916,8 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
9916
9916
  setInputColorValue(formatInputValue);
9917
9917
  setCorrectColorValue(formatCorrectValue);
9918
9918
  setColTypeArr(formatArr);
9919
+ setClickedPresetColorIndex(index);
9919
9920
  }
9920
- setClickedPresetColorIndex(index);
9921
9921
  onChange === null || onChange === void 0 ? void 0 : onChange(formatInputValue, formatArr);
9922
9922
  };
9923
9923
  var historicalColorClick = function historicalColorClick(index, colorValue) {
@@ -9932,8 +9932,8 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
9932
9932
  setInputColorValue(formatInputValue);
9933
9933
  setCorrectColorValue(formatCorrectValue);
9934
9934
  setColTypeArr(formatArr);
9935
+ setClickedHistoricalColorIndex(index);
9935
9936
  }
9936
- setClickedHistoricalColorIndex(index);
9937
9937
  onChange === null || onChange === void 0 ? void 0 : onChange(formatInputValue, formatArr);
9938
9938
  };
9939
9939
  var handleTypeChange = function handleTypeChange(selectValue) {
@@ -9953,7 +9953,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
9953
9953
  })) === null || _colTypeArr$find3 === void 0 ? void 0 : _colTypeArr$find3.value, colTypeArr);
9954
9954
  }
9955
9955
  };
9956
- var handleAlphaChange = function handleAlphaChange(e) {
9956
+ var handleAlphaBlur = function handleAlphaBlur(e) {
9957
9957
  var regPercentage = /^(0|[1-9][0-9]?|100)%$/;
9958
9958
  var regDot = /^(0(\.\d+)?|1(\.0+)?)$/;
9959
9959
  var val = e.target.value;
@@ -9979,17 +9979,6 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
9979
9979
  formatArr = _getColorFormat.formatArr,
9980
9980
  outValue = _getColorFormat.outValue,
9981
9981
  innerInput = _getColorFormat.innerInput;
9982
- if (value === undefined) {
9983
- setAlphaNoVerifyVal(val);
9984
- setPanelState(formatArr, innerInput, outValue, alphaValue);
9985
- setClickColorIndex(formatArr[0].value);
9986
- }
9987
- onChange === null || onChange === void 0 ? void 0 : onChange(outValue, formatArr);
9988
- };
9989
- var handleAlphaBlur = function handleAlphaBlur(e) {
9990
- var regPercentage = /^(0|[1-9][0-9]?|100)%$/;
9991
- var regDot = /^(0(\.\d+)?|1(\.0+)?)$/;
9992
- var val = e.target.value;
9993
9982
  if (regPercentage.test(val)) {
9994
9983
  setAlphaNoVerifyVal(val);
9995
9984
  } else if (regDot.test(val)) {
@@ -9997,6 +9986,17 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
9997
9986
  } else {
9998
9987
  setAlphaNoVerifyVal('100%');
9999
9988
  }
9989
+ if (value === undefined) {
9990
+ setPanelState(formatArr, innerInput, outValue, alphaValue);
9991
+ setClickColorIndex(formatArr[0].value);
9992
+ }
9993
+ onChange === null || onChange === void 0 ? void 0 : onChange(outValue, formatArr);
9994
+ };
9995
+ var handleAlphaChange = function handleAlphaChange(e) {
9996
+ if (value !== undefined && onChange === undefined) {
9997
+ return;
9998
+ }
9999
+ setAlphaNoVerifyVal(e.target.value);
10000
10000
  };
10001
10001
  var handleHEXInputChange = function handleHEXInputChange(e) {
10002
10002
  setCorrectColorValue(e.target.value);