vxe-pc-ui 3.3.44 → 3.3.46

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.
Files changed (57) hide show
  1. package/es/color-picker/src/color-picker.js +81 -28
  2. package/es/color-picker/style.css +41 -15
  3. package/es/color-picker/style.min.css +1 -1
  4. package/es/form/render/index.js +26 -1
  5. package/es/icon/style.css +1 -1
  6. package/es/number-input/src/number-input.js +35 -5
  7. package/es/rate/src/rate.js +7 -0
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/ui/index.js +3 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-color-picker/style.css +41 -15
  13. package/es/vxe-color-picker/style.min.css +1 -1
  14. package/lib/color-picker/src/color-picker.js +62 -8
  15. package/lib/color-picker/src/color-picker.min.js +1 -1
  16. package/lib/color-picker/style/style.css +41 -15
  17. package/lib/color-picker/style/style.min.css +1 -1
  18. package/lib/form/render/index.js +28 -1
  19. package/lib/form/render/index.min.js +1 -1
  20. package/lib/icon/style/style.css +1 -1
  21. package/lib/icon/style/style.min.css +1 -1
  22. package/lib/index.umd.js +151 -19
  23. package/lib/index.umd.min.js +1 -1
  24. package/lib/number-input/src/number-input.js +47 -5
  25. package/lib/number-input/src/number-input.min.js +1 -1
  26. package/lib/rate/src/rate.js +6 -0
  27. package/lib/rate/src/rate.min.js +1 -1
  28. package/lib/style.css +1 -1
  29. package/lib/style.min.css +1 -1
  30. package/lib/ui/index.js +3 -1
  31. package/lib/ui/index.min.js +1 -1
  32. package/lib/ui/src/log.js +1 -1
  33. package/lib/ui/src/log.min.js +1 -1
  34. package/lib/vxe-color-picker/style/style.css +41 -15
  35. package/lib/vxe-color-picker/style/style.min.css +1 -1
  36. package/package.json +2 -2
  37. package/packages/color-picker/src/color-picker.ts +83 -28
  38. package/packages/form/render/index.ts +26 -1
  39. package/packages/number-input/src/number-input.ts +39 -10
  40. package/packages/rate/src/rate.ts +6 -0
  41. package/packages/ui/index.ts +2 -0
  42. package/styles/components/color-picker.scss +31 -11
  43. package/types/components/color-picker.d.ts +1 -1
  44. package/types/components/icon-picker.d.ts +1 -1
  45. package/types/components/number-input.d.ts +2 -0
  46. /package/es/icon/{iconfont.1734950846147.ttf → iconfont.1735027679703.ttf} +0 -0
  47. /package/es/icon/{iconfont.1734950846147.woff → iconfont.1735027679703.woff} +0 -0
  48. /package/es/icon/{iconfont.1734950846147.woff2 → iconfont.1735027679703.woff2} +0 -0
  49. /package/es/{iconfont.1734950846147.ttf → iconfont.1735027679703.ttf} +0 -0
  50. /package/es/{iconfont.1734950846147.woff → iconfont.1735027679703.woff} +0 -0
  51. /package/es/{iconfont.1734950846147.woff2 → iconfont.1735027679703.woff2} +0 -0
  52. /package/lib/icon/style/{iconfont.1734950846147.ttf → iconfont.1735027679703.ttf} +0 -0
  53. /package/lib/icon/style/{iconfont.1734950846147.woff → iconfont.1735027679703.woff} +0 -0
  54. /package/lib/icon/style/{iconfont.1734950846147.woff2 → iconfont.1735027679703.woff2} +0 -0
  55. /package/lib/{iconfont.1734950846147.ttf → iconfont.1735027679703.ttf} +0 -0
  56. /package/lib/{iconfont.1734950846147.woff → iconfont.1735027679703.woff} +0 -0
  57. /package/lib/{iconfont.1734950846147.woff2 → iconfont.1735027679703.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -10774,7 +10774,7 @@ var es_function_name = __webpack_require__(2010);
10774
10774
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
10775
10775
  var es_object_assign = __webpack_require__(9085);
10776
10776
  ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/core.js
10777
- var coreVersion = "3.0.20";
10777
+ var coreVersion = "3.0.21";
10778
10778
  var VxeCore = {
10779
10779
  coreVersion: coreVersion,
10780
10780
  uiVersion: '',
@@ -11447,7 +11447,7 @@ function createLog(type, name) {
11447
11447
  return msg;
11448
11448
  };
11449
11449
  }
11450
- var version = "3.0.20";
11450
+ var version = "3.0.21";
11451
11451
  var log = {
11452
11452
  create: createLog,
11453
11453
  warn: createLog('warn', "v".concat(version)),
@@ -11956,9 +11956,12 @@ var sizeMixin = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend({
11956
11956
  }
11957
11957
  },
11958
11958
  provide: function provide() {
11959
+ var _this = this;
11959
11960
  return {
11960
11961
  $xeSizeInfo: {
11961
- size: this.computeSize
11962
+ getSize: function getSize() {
11963
+ return _this.computeSize;
11964
+ }
11962
11965
  }
11963
11966
  };
11964
11967
  },
@@ -11966,7 +11969,7 @@ var sizeMixin = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend({
11966
11969
  computeSize: function computeSize() {
11967
11970
  var size = this.size;
11968
11971
  var $xeSizeInfo = this.$xeSizeInfo;
11969
- return size || ($xeSizeInfo ? $xeSizeInfo.size : null);
11972
+ return size || ($xeSizeInfo ? $xeSizeInfo.getSize() : null);
11970
11973
  }
11971
11974
  }
11972
11975
  });
@@ -12871,7 +12874,7 @@ function handleBooleanDefaultValue(value) {
12871
12874
  }
12872
12875
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
12873
12876
 
12874
- var log_version = "ui v".concat("3.3.44");
12877
+ var log_version = "ui v".concat("3.3.46");
12875
12878
  var warnLog = log.create('warn', log_version);
12876
12879
  var errLog = log.create('error', log_version);
12877
12880
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
@@ -12879,7 +12882,7 @@ var errLog = log.create('error', log_version);
12879
12882
 
12880
12883
 
12881
12884
 
12882
- var ui_version = "3.3.44";
12885
+ var ui_version = "3.3.46";
12883
12886
  index_esm_VxeUI.version = ui_version;
12884
12887
  index_esm_VxeUI.uiVersion = ui_version;
12885
12888
  index_esm_VxeUI.tableVersion = '';
@@ -12949,6 +12952,7 @@ setConfig({
12949
12952
  countdown: {},
12950
12953
  colorPicker: {
12951
12954
  type: 'hex',
12955
+ clearable: true,
12952
12956
  showAlpha: true,
12953
12957
  clickToCopy: true,
12954
12958
  showColorExtractor: true,
@@ -13095,6 +13099,7 @@ setConfig({
13095
13099
  // size: null,
13096
13100
  // transfer: false
13097
13101
  digits: 2,
13102
+ autoFill: true,
13098
13103
  controls: true
13099
13104
  },
13100
13105
  optgroup: {},
@@ -22524,7 +22529,12 @@ function toFloatValueFixed(inputValue, digitsValue) {
22524
22529
  props: {
22525
22530
  value: String,
22526
22531
  placeholder: String,
22527
- clearable: Boolean,
22532
+ clearable: {
22533
+ type: Boolean,
22534
+ default: function _default() {
22535
+ return getConfig().colorPicker.clearable;
22536
+ }
22537
+ },
22528
22538
  type: {
22529
22539
  type: String,
22530
22540
  default: function _default() {
@@ -22583,6 +22593,30 @@ function toFloatValueFixed(inputValue, digitsValue) {
22583
22593
  default: null
22584
22594
  }
22585
22595
  },
22596
+ inject: {
22597
+ $xeModal: {
22598
+ default: null
22599
+ },
22600
+ $xeDrawer: {
22601
+ default: null
22602
+ },
22603
+ $xeTable: {
22604
+ default: null
22605
+ },
22606
+ $xeForm: {
22607
+ default: null
22608
+ },
22609
+ formItemInfo: {
22610
+ from: 'xeFormItemInfo',
22611
+ default: null
22612
+ }
22613
+ },
22614
+ provide: function provide() {
22615
+ var $xeColorPicker = this;
22616
+ return {
22617
+ $xeColorPicker: $xeColorPicker
22618
+ };
22619
+ },
22586
22620
  data: function data() {
22587
22621
  var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
22588
22622
  var reactData = {
@@ -22646,7 +22680,7 @@ function toFloatValueFixed(inputValue, digitsValue) {
22646
22680
  var $xeForm = $xeColorPicker.$xeForm;
22647
22681
  var transfer = props.transfer;
22648
22682
  if (transfer === null) {
22649
- var globalTransfer = getConfig().iconPicker.transfer;
22683
+ var globalTransfer = getConfig().colorPicker.transfer;
22650
22684
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
22651
22685
  return globalTransfer;
22652
22686
  }
@@ -22916,6 +22950,21 @@ function toFloatValueFixed(inputValue, digitsValue) {
22916
22950
  value: selectValue
22917
22951
  }, evnt);
22918
22952
  },
22953
+ focusEvent: function focusEvent() {
22954
+ var $xeColorPicker = this;
22955
+ var reactData = $xeColorPicker.reactData;
22956
+ var isDisabled = $xeColorPicker.computeIsDisabled;
22957
+ if (!isDisabled) {
22958
+ if (!reactData.visiblePanel) {
22959
+ $xeColorPicker.showOptionPanel();
22960
+ }
22961
+ }
22962
+ },
22963
+ blurEvent: function blurEvent() {
22964
+ var $xeColorPicker = this;
22965
+ var reactData = $xeColorPicker.reactData;
22966
+ reactData.isActivated = false;
22967
+ },
22919
22968
  clearEvent: function clearEvent(evnt) {
22920
22969
  var $xeColorPicker = this;
22921
22970
  $xeColorPicker.clearValueEvent(evnt, null);
@@ -23422,14 +23471,26 @@ function toFloatValueFixed(inputValue, digitsValue) {
23422
23471
  return h('div', {
23423
23472
  ref: 'refElem',
23424
23473
  class: ['vxe-color-picker--readonly', className]
23425
- }, 'x');
23474
+ }, [h('div', {
23475
+ class: 'vxe-color-picker--readonly-color',
23476
+ style: {
23477
+ backgroundColor: value
23478
+ }
23479
+ })]);
23426
23480
  }
23427
23481
  return h('div', {
23428
23482
  ref: 'refElem',
23429
23483
  class: ['vxe-color-picker', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
23430
23484
  $colorPicker: $xeColorPicker
23431
23485
  }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--selected', !!value), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--active', isActivated)]
23432
- }, [h('div', {
23486
+ }, [h('input', {
23487
+ ref: 'refInput',
23488
+ class: 'vxe-color-picker--input',
23489
+ on: {
23490
+ focus: $xeColorPicker.focusEvent,
23491
+ blur: $xeColorPicker.blurEvent
23492
+ }
23493
+ }), h('div', {
23433
23494
  class: 'vxe-color-picker--inner',
23434
23495
  on: {
23435
23496
  click: $xeColorPicker.clickEvent
@@ -23450,8 +23511,6 @@ function toFloatValueFixed(inputValue, digitsValue) {
23450
23511
  style: reactData.panelStyle
23451
23512
  }, [initialized && (visiblePanel || isAniVisible) ? h('div', {
23452
23513
  class: 'vxe-color-picker--panel-wrapper'
23453
- }, [h('div', {
23454
- class: ''
23455
23514
  }, [$xeColorPicker.renderColorWrapper(h), $xeColorPicker.renderColorBar(h), $xeColorPicker.renderQuickWrapper(h), h('div', {
23456
23515
  class: 'vxe-color-picker--footer-wrapper'
23457
23516
  }, [clearable ? h(src_button, {
@@ -23471,7 +23530,7 @@ function toFloatValueFixed(inputValue, digitsValue) {
23471
23530
  on: {
23472
23531
  click: $xeColorPicker.confirmEvent
23473
23532
  }
23474
- })])])]) : renderEmptyElement($xeColorPicker)])]);
23533
+ })])]) : renderEmptyElement($xeColorPicker)])]);
23475
23534
  }
23476
23535
  },
23477
23536
  watch: {
@@ -23484,7 +23543,7 @@ function toFloatValueFixed(inputValue, digitsValue) {
23484
23543
  var $xeColorPicker = this;
23485
23544
  var props = $xeColorPicker;
23486
23545
  var reactData = $xeColorPicker.reactData;
23487
- reactData.selectColor = props.value;
23546
+ reactData.selectColor = "".concat(props.value || '');
23488
23547
  $xeColorPicker.updateMode();
23489
23548
  globalEvents.on($xeColorPicker, 'mousewheel', $xeColorPicker.handleGlobalMousewheelEvent);
23490
23549
  globalEvents.on($xeColorPicker, 'mousedown', $xeColorPicker.handleGlobalMousedownEvent);
@@ -29305,8 +29364,35 @@ renderer.mixin({
29305
29364
  })];
29306
29365
  }
29307
29366
  },
29367
+ VxeColorPicker: {
29368
+ formItemAutoFocus: 'input',
29369
+ renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
29370
+ var data = params.data,
29371
+ field = params.field;
29372
+ var options = renderOpts.options;
29373
+ var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
29374
+ return [h(getDefaultComponent(renderOpts), {
29375
+ props: getComponentFormItemProps(renderOpts, params, itemValue, {
29376
+ colors: options
29377
+ }),
29378
+ on: getItemOns(renderOpts, params)
29379
+ })];
29380
+ }
29381
+ },
29308
29382
  VxeIconPicker: {
29309
- renderFormItemContent: defaultFormItemRender
29383
+ formItemAutoFocus: 'input',
29384
+ renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
29385
+ var data = params.data,
29386
+ field = params.field;
29387
+ var options = renderOpts.options;
29388
+ var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
29389
+ return [h(getDefaultComponent(renderOpts), {
29390
+ props: getComponentFormItemProps(renderOpts, params, itemValue, {
29391
+ icons: options
29392
+ }),
29393
+ on: getItemOns(renderOpts, params)
29394
+ })];
29395
+ }
29310
29396
  },
29311
29397
  VxeRadio: {
29312
29398
  renderFormItemContent: defaultFormItemRender
@@ -35007,6 +35093,10 @@ var NoticeBar = VxeNoticeBar;
35007
35093
 
35008
35094
 
35009
35095
 
35096
+
35097
+
35098
+
35099
+
35010
35100
 
35011
35101
  var handleNumberString = function handleNumberString(val) {
35012
35102
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(val)) {
@@ -35102,6 +35192,12 @@ var handleNumberString = function handleNumberString(val) {
35102
35192
  type: [String, Number],
35103
35193
  default: null
35104
35194
  },
35195
+ autoFill: {
35196
+ type: Boolean,
35197
+ default: function _default() {
35198
+ return getConfig().numberInput.autoFill;
35199
+ }
35200
+ },
35105
35201
  prefixIcon: String,
35106
35202
  suffixIcon: String,
35107
35203
  // 已废弃
@@ -35251,13 +35347,24 @@ var handleNumberString = function handleNumberString(val) {
35251
35347
  var reactData = $xeNumberInput.reactData;
35252
35348
  var type = props.type,
35253
35349
  showCurrency = props.showCurrency,
35254
- currencySymbol = props.currencySymbol;
35350
+ currencySymbol = props.currencySymbol,
35351
+ autoFill = props.autoFill;
35255
35352
  var inputValue = reactData.inputValue;
35256
35353
  var digitsValue = $xeNumberInput.computeDigitsValue;
35257
35354
  if (type === 'amount') {
35258
35355
  var amountLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue), {
35259
35356
  digits: digitsValue
35260
35357
  });
35358
+ if (!autoFill) {
35359
+ var _amountLabel$split = amountLabel.split('.'),
35360
+ _amountLabel$split2 = _slicedToArray(_amountLabel$split, 2),
35361
+ iStr = _amountLabel$split2[0],
35362
+ dStr = _amountLabel$split2[1];
35363
+ if (dStr) {
35364
+ var dRest = dStr.replace(/0+$/, '');
35365
+ amountLabel = dRest ? [iStr, '.', dRest].join('') : iStr;
35366
+ }
35367
+ }
35261
35368
  if (showCurrency) {
35262
35369
  return "".concat(currencySymbol || getI18n('vxe.numberInput.currencySymbol') || '').concat(amountLabel);
35263
35370
  }
@@ -35338,11 +35445,20 @@ var handleNumberString = function handleNumberString(val) {
35338
35445
  getNumberValue: function getNumberValue(val) {
35339
35446
  var $xeNumberInput = this;
35340
35447
  var props = $xeNumberInput;
35341
- var exponential = props.exponential;
35448
+ var exponential = props.exponential,
35449
+ autoFill = props.autoFill;
35342
35450
  var inpMaxLength = $xeNumberInput.computeInpMaxLength;
35343
35451
  var digitsValue = $xeNumberInput.computeDigitsValue;
35344
35452
  var decimalsType = $xeNumberInput.computeDecimalsType;
35345
- var restVal = decimalsType ? toFloatValueFixed(val, digitsValue) : handleNumberString(val);
35453
+ var restVal = '';
35454
+ if (decimalsType) {
35455
+ restVal = toFloatValueFixed(val, digitsValue);
35456
+ if (!autoFill) {
35457
+ restVal = handleNumberString(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(restVal));
35458
+ }
35459
+ } else {
35460
+ restVal = handleNumberString(val);
35461
+ }
35346
35462
  if (exponential && (val === restVal || handleNumberString(val).toLowerCase() === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(restVal).toExponential())) {
35347
35463
  return val;
35348
35464
  }
@@ -35455,7 +35571,9 @@ var handleNumberString = function handleNumberString(val) {
35455
35571
  },
35456
35572
  updateModel: function updateModel(val) {
35457
35573
  var $xeNumberInput = this;
35574
+ var props = $xeNumberInput;
35458
35575
  var reactData = $xeNumberInput.reactData;
35576
+ var autoFill = props.autoFill;
35459
35577
  var inputValue = reactData.inputValue;
35460
35578
  var digitsValue = $xeNumberInput.computeDigitsValue;
35461
35579
  var decimalsType = $xeNumberInput.computeDecimalsType;
@@ -35464,6 +35582,9 @@ var handleNumberString = function handleNumberString(val) {
35464
35582
  var textValue = '';
35465
35583
  if (val) {
35466
35584
  textValue = toFloatValueFixed(val, digitsValue);
35585
+ if (!autoFill) {
35586
+ textValue = "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textValue));
35587
+ }
35467
35588
  }
35468
35589
  if (textValue !== inputValue) {
35469
35590
  reactData.inputValue = textValue;
@@ -35476,7 +35597,9 @@ var handleNumberString = function handleNumberString(val) {
35476
35597
  */
35477
35598
  initValue: function initValue() {
35478
35599
  var $xeNumberInput = this;
35600
+ var props = $xeNumberInput;
35479
35601
  var reactData = $xeNumberInput.reactData;
35602
+ var autoFill = props.autoFill;
35480
35603
  var inputValue = reactData.inputValue;
35481
35604
  var digitsValue = $xeNumberInput.computeDigitsValue;
35482
35605
  var decimalsType = $xeNumberInput.computeDecimalsType;
@@ -35486,7 +35609,10 @@ var handleNumberString = function handleNumberString(val) {
35486
35609
  var validValue = null;
35487
35610
  if (inputValue) {
35488
35611
  textValue = toFloatValueFixed(inputValue, digitsValue);
35489
- validValue = Number(textValue);
35612
+ validValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textValue);
35613
+ if (!autoFill) {
35614
+ textValue = "".concat(validValue);
35615
+ }
35490
35616
  }
35491
35617
  if (inputValue !== validValue) {
35492
35618
  $xeNumberInput.handleChange(validValue, textValue, {
@@ -40636,7 +40762,13 @@ var RadioGroup = VxeRadioGroup;
40636
40762
  },
40637
40763
  emitModel: function emitModel(value) {
40638
40764
  var $xeRate = this;
40765
+ var _events = $xeRate._events;
40639
40766
  $xeRate.$emit('input', value);
40767
+ if (_events && _events.modelValue) {
40768
+ $xeRate.$emit('modelValue', value);
40769
+ } else {
40770
+ $xeRate.$emit('model-value', value);
40771
+ }
40640
40772
  },
40641
40773
  mouseenterEvent: function mouseenterEvent(evnt, item) {
40642
40774
  var $xeRate = this;