vxe-pc-ui 4.15.20 → 4.15.21

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 (51) hide show
  1. package/dist/all.esm.js +102 -54
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/checkbox/src/button.js +9 -1
  5. package/es/checkbox/src/checkbox.js +27 -7
  6. package/es/icon/style.css +1 -1
  7. package/es/radio/src/button.js +27 -15
  8. package/es/radio/src/radio.js +27 -15
  9. package/es/style.css +1 -1
  10. package/es/style.min.css +1 -1
  11. package/es/ui/index.js +1 -1
  12. package/es/ui/src/log.js +1 -1
  13. package/lib/checkbox/src/button.js +10 -0
  14. package/lib/checkbox/src/button.min.js +1 -1
  15. package/lib/checkbox/src/checkbox.js +37 -10
  16. package/lib/checkbox/src/checkbox.min.js +1 -1
  17. package/lib/icon/style/style.css +1 -1
  18. package/lib/icon/style/style.min.css +1 -1
  19. package/lib/index.umd.js +111 -62
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/radio/src/button.js +31 -25
  22. package/lib/radio/src/button.min.js +1 -1
  23. package/lib/radio/src/radio.js +31 -25
  24. package/lib/radio/src/radio.min.js +1 -1
  25. package/lib/style.css +1 -1
  26. package/lib/style.min.css +1 -1
  27. package/lib/ui/index.js +1 -1
  28. package/lib/ui/index.min.js +1 -1
  29. package/lib/ui/src/log.js +1 -1
  30. package/lib/ui/src/log.min.js +1 -1
  31. package/package.json +1 -1
  32. package/packages/checkbox/src/button.ts +11 -1
  33. package/packages/checkbox/src/checkbox.ts +30 -7
  34. package/packages/radio/src/button.ts +30 -15
  35. package/packages/radio/src/radio.ts +30 -15
  36. package/types/components/checkbox-button.d.ts +3 -0
  37. package/types/components/checkbox.d.ts +6 -1
  38. package/types/components/radio-button.d.ts +3 -1
  39. package/types/components/radio.d.ts +6 -1
  40. /package/es/icon/{iconfont.1782978164206.ttf → iconfont.1783046335286.ttf} +0 -0
  41. /package/es/icon/{iconfont.1782978164206.woff → iconfont.1783046335286.woff} +0 -0
  42. /package/es/icon/{iconfont.1782978164206.woff2 → iconfont.1783046335286.woff2} +0 -0
  43. /package/es/{iconfont.1782978164206.ttf → iconfont.1783046335286.ttf} +0 -0
  44. /package/es/{iconfont.1782978164206.woff → iconfont.1783046335286.woff} +0 -0
  45. /package/es/{iconfont.1782978164206.woff2 → iconfont.1783046335286.woff2} +0 -0
  46. /package/lib/icon/style/{iconfont.1782978164206.ttf → iconfont.1783046335286.ttf} +0 -0
  47. /package/lib/icon/style/{iconfont.1782978164206.woff → iconfont.1783046335286.woff} +0 -0
  48. /package/lib/icon/style/{iconfont.1782978164206.woff2 → iconfont.1783046335286.woff2} +0 -0
  49. /package/lib/{iconfont.1782978164206.ttf → iconfont.1783046335286.ttf} +0 -0
  50. /package/lib/{iconfont.1782978164206.woff → iconfont.1783046335286.woff} +0 -0
  51. /package/lib/{iconfont.1782978164206.woff2 → iconfont.1783046335286.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4657,7 +4657,7 @@ function checkDynamic() {
4657
4657
  const {
4658
4658
  log: log_log
4659
4659
  } = VxeUI;
4660
- const uiVersion = `ui v${"4.15.20"}`;
4660
+ const uiVersion = `ui v${"4.15.21"}`;
4661
4661
  function createComponentLog(name) {
4662
4662
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
4663
4663
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -4675,7 +4675,7 @@ const errLog = log_log.create('error', uiVersion);
4675
4675
 
4676
4676
 
4677
4677
 
4678
- const ui_version = "4.15.20";
4678
+ const ui_version = "4.15.21";
4679
4679
  VxeUI.uiVersion = ui_version;
4680
4680
  VxeUI.dynamicApp = dynamicApp;
4681
4681
  function config(options) {
@@ -18711,10 +18711,18 @@ const Cascader = VxeCascader;
18711
18711
 
18712
18712
 
18713
18713
 
18714
+
18715
+ const {
18716
+ warnLog: checkbox_warnLog
18717
+ } = createComponentLog('checkbox');
18714
18718
  /* harmony default export */ var src_checkbox = (defineVxeComponent({
18715
18719
  name: 'VxeCheckbox',
18716
18720
  props: {
18717
18721
  modelValue: [String, Number, Boolean],
18722
+ /**
18723
+ * 已废弃,被 checkedValue 替换
18724
+ * @deprecated
18725
+ */
18718
18726
  label: {
18719
18727
  type: [String, Number],
18720
18728
  default: null
@@ -18760,9 +18768,17 @@ const Cascader = VxeCascader;
18760
18768
  const {
18761
18769
  computeSize
18762
18770
  } = useSize(props);
18771
+ const computeCheckValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
18772
+ const {
18773
+ checkedValue,
18774
+ label
18775
+ } = props;
18776
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
18777
+ });
18763
18778
  const computeIsChecked = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
18779
+ const checkValue = computeCheckValue.value;
18764
18780
  if ($xeCheckboxGroup) {
18765
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes($xeCheckboxGroup.props.modelValue, props.label);
18781
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes($xeCheckboxGroup.props.modelValue, checkValue);
18766
18782
  }
18767
18783
  return props.modelValue === props.checkedValue;
18768
18784
  });
@@ -18788,21 +18804,27 @@ const Cascader = VxeCascader;
18788
18804
  });
18789
18805
  const changeEvent = evnt => {
18790
18806
  const {
18791
- checkedValue,
18792
18807
  uncheckedValue
18793
18808
  } = props;
18794
18809
  const isDisabled = computeIsDisabled.value;
18810
+ const checkValue = computeCheckValue.value;
18795
18811
  if (!isDisabled) {
18796
18812
  const checked = evnt.target.checked;
18797
- const value = checked ? checkedValue : uncheckedValue;
18798
- const params = {
18799
- checked,
18800
- value,
18801
- label: props.label
18802
- };
18803
18813
  if ($xeCheckboxGroup) {
18814
+ const value = checkValue;
18815
+ const params = {
18816
+ checked,
18817
+ value,
18818
+ label: value
18819
+ };
18804
18820
  $xeCheckboxGroup.handleChecked(params, evnt);
18805
18821
  } else {
18822
+ const value = checked ? checkValue : uncheckedValue;
18823
+ const params = {
18824
+ checked,
18825
+ value,
18826
+ label: value
18827
+ };
18806
18828
  emit('update:modelValue', value);
18807
18829
  checkboxMethods.dispatchEvent('change', params, evnt);
18808
18830
  // 自动更新校验状态
@@ -18823,12 +18845,12 @@ const Cascader = VxeCascader;
18823
18845
  Object.assign($xeCheckbox, checkboxMethods);
18824
18846
  const renderVN = () => {
18825
18847
  const {
18826
- label,
18827
18848
  content
18828
18849
  } = props;
18829
18850
  const vSize = computeSize.value;
18830
18851
  const isDisabled = computeIsDisabled.value;
18831
18852
  const isChecked = computeIsChecked.value;
18853
+ const checkValue = computeCheckValue.value;
18832
18854
  const indeterminate = !isChecked && props.indeterminate;
18833
18855
  const defaultSlot = slots.default;
18834
18856
  if ($xeCheckboxGroup) {
@@ -18851,7 +18873,7 @@ const Cascader = VxeCascader;
18851
18873
  }
18852
18874
  }
18853
18875
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('label', {
18854
- key: label,
18876
+ key: `${checkValue}`,
18855
18877
  class: ['vxe-checkbox vxe-checkbox--default', {
18856
18878
  [`size--${vSize}`]: vSize,
18857
18879
  'is--indeterminate': indeterminate,
@@ -18871,6 +18893,11 @@ const Cascader = VxeCascader;
18871
18893
  class: 'vxe-checkbox--label'
18872
18894
  }, defaultSlot ? defaultSlot({}) : getFuncText(content))]);
18873
18895
  };
18896
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
18897
+ if (props.label !== null) {
18898
+ checkbox_warnLog('vxe.error.delProp', ['label', 'checked-value']);
18899
+ }
18900
+ });
18874
18901
  $xeCheckbox.renderVN = renderVN;
18875
18902
  return $xeCheckbox;
18876
18903
  },
@@ -18898,12 +18925,17 @@ const Checkbox = VxeCheckbox;
18898
18925
 
18899
18926
 
18900
18927
 
18928
+
18929
+ const {
18930
+ warnLog: src_button_warnLog
18931
+ } = createComponentLog('checkbox-button');
18901
18932
  /* harmony default export */ var checkbox_src_button = (defineVxeComponent({
18902
18933
  name: 'VxeCheckboxButton',
18903
18934
  props: {
18904
18935
  modelValue: [String, Number, Boolean],
18905
18936
  /**
18906
18937
  * 已废弃,被 checkedValue 替换
18938
+ * @deprecated
18907
18939
  */
18908
18940
  label: {
18909
18941
  type: [String, Number, Boolean],
@@ -19084,6 +19116,11 @@ const Checkbox = VxeCheckbox;
19084
19116
  class: 'vxe-checkbox--button-content'
19085
19117
  }, getFuncText(content)) : renderEmptyElement($xeCheckboxButton)])]);
19086
19118
  };
19119
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
19120
+ if (props.label !== null) {
19121
+ src_button_warnLog('vxe.error.delProp', ['label', 'checked-value']);
19122
+ }
19123
+ });
19087
19124
  $xeCheckboxButton.renderVN = renderVN;
19088
19125
  return renderVN;
19089
19126
  }
@@ -41922,6 +41959,10 @@ const Pulldown = VxePulldown;
41922
41959
 
41923
41960
 
41924
41961
 
41962
+
41963
+ const {
41964
+ warnLog: radio_warnLog
41965
+ } = createComponentLog('radio');
41925
41966
  /* harmony default export */ var src_radio = (defineVxeComponent({
41926
41967
  name: 'VxeRadio',
41927
41968
  props: {
@@ -41947,6 +41988,7 @@ const Pulldown = VxePulldown;
41947
41988
  },
41948
41989
  /**
41949
41990
  * 已废弃,被 checkedValue 替换
41991
+ * @deprecated
41950
41992
  */
41951
41993
  label: {
41952
41994
  type: [String, Number, Boolean],
@@ -41973,6 +42015,13 @@ const Pulldown = VxePulldown;
41973
42015
  const {
41974
42016
  computeSize
41975
42017
  } = useSize(props);
42018
+ const computeCheckValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42019
+ const {
42020
+ checkedValue,
42021
+ label
42022
+ } = props;
42023
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42024
+ });
41976
42025
  const computeIsDisabled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
41977
42026
  const {
41978
42027
  disabled
@@ -41996,13 +42045,12 @@ const Pulldown = VxePulldown;
41996
42045
  const computeStrict = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
41997
42046
  return $xeRadioGroup ? $xeRadioGroup.props.strict : props.strict;
41998
42047
  });
41999
- const computeChecked = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42000
- const {
42001
- label,
42002
- checkedValue
42003
- } = props;
42004
- const radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42005
- return $xeRadioGroup ? $xeRadioGroup.props.modelValue === radioValue : props.modelValue === radioValue;
42048
+ const computeIsChecked = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42049
+ const checkValue = computeCheckValue.value;
42050
+ if ($xeRadioGroup) {
42051
+ return $xeRadioGroup.props.modelValue === checkValue;
42052
+ }
42053
+ return props.modelValue === checkValue;
42006
42054
  });
42007
42055
  const handleValue = (checkedValue, evnt) => {
42008
42056
  const {
@@ -42031,24 +42079,16 @@ const Pulldown = VxePulldown;
42031
42079
  const changeEvent = evnt => {
42032
42080
  const isDisabled = computeIsDisabled.value;
42033
42081
  if (!isDisabled) {
42034
- const {
42035
- label,
42036
- checkedValue
42037
- } = props;
42038
- const radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42039
- handleValue(radioValue, evnt);
42082
+ const checkValue = computeCheckValue.value;
42083
+ handleValue(checkValue, evnt);
42040
42084
  }
42041
42085
  };
42042
42086
  const clickEvent = evnt => {
42043
42087
  const isDisabled = computeIsDisabled.value;
42044
42088
  const isStrict = computeStrict.value;
42045
42089
  if (!isDisabled && !isStrict) {
42046
- const {
42047
- label,
42048
- checkedValue
42049
- } = props;
42050
- const radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42051
- if (radioValue === ($xeRadioGroup ? $xeRadioGroup.props.modelValue : props.modelValue)) {
42090
+ const isChecked = computeIsChecked.value;
42091
+ if (isChecked) {
42052
42092
  handleValue(null, evnt);
42053
42093
  }
42054
42094
  }
@@ -42065,15 +42105,13 @@ const Pulldown = VxePulldown;
42065
42105
  Object.assign($xeRadio, radioMethods, radioPrivateMethods);
42066
42106
  const renderVN = () => {
42067
42107
  const {
42068
- label,
42069
- content,
42070
- checkedValue
42108
+ content
42071
42109
  } = props;
42072
- const radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42073
42110
  const vSize = computeSize.value;
42074
42111
  const isDisabled = computeIsDisabled.value;
42075
42112
  const name = computeName.value;
42076
- const isChecked = computeChecked.value;
42113
+ const isChecked = computeIsChecked.value;
42114
+ const checkValue = computeCheckValue.value;
42077
42115
  const defaultSlot = slots.default;
42078
42116
  if ($xeRadioGroup) {
42079
42117
  const {
@@ -42095,7 +42133,7 @@ const Pulldown = VxePulldown;
42095
42133
  }
42096
42134
  }
42097
42135
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('label', {
42098
- key: radioValue,
42136
+ key: `${checkValue}`,
42099
42137
  class: ['vxe-radio vxe-radio--default', {
42100
42138
  [`size--${vSize}`]: vSize,
42101
42139
  'is--checked': isChecked,
@@ -42116,6 +42154,11 @@ const Pulldown = VxePulldown;
42116
42154
  class: 'vxe-radio--label'
42117
42155
  }, defaultSlot ? defaultSlot({}) : getFuncText(content))]);
42118
42156
  };
42157
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
42158
+ if (props.label !== null) {
42159
+ radio_warnLog('vxe.error.delProp', ['label', 'checked-value']);
42160
+ }
42161
+ });
42119
42162
  $xeRadio.renderVN = renderVN;
42120
42163
  return $xeRadio;
42121
42164
  },
@@ -42142,6 +42185,10 @@ const Radio = VxeRadio;
42142
42185
 
42143
42186
 
42144
42187
 
42188
+
42189
+ const {
42190
+ warnLog: radio_src_button_warnLog
42191
+ } = createComponentLog('radio-button');
42145
42192
  /* harmony default export */ var radio_src_button = (defineVxeComponent({
42146
42193
  name: 'VxeRadioButton',
42147
42194
  props: {
@@ -42167,6 +42214,7 @@ const Radio = VxeRadio;
42167
42214
  },
42168
42215
  /**
42169
42216
  * 已废弃,被 checkedValue 替换
42217
+ * @deprecated
42170
42218
  */
42171
42219
  label: {
42172
42220
  type: [String, Number, Boolean],
@@ -42193,6 +42241,13 @@ const Radio = VxeRadio;
42193
42241
  context,
42194
42242
  reactData
42195
42243
  };
42244
+ const computeCheckValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42245
+ const {
42246
+ checkedValue,
42247
+ label
42248
+ } = props;
42249
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42250
+ });
42196
42251
  const computeIsDisabled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42197
42252
  const {
42198
42253
  disabled
@@ -42216,13 +42271,12 @@ const Radio = VxeRadio;
42216
42271
  const computeStrict = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42217
42272
  return $xeRadioGroup ? $xeRadioGroup.props.strict : props.strict;
42218
42273
  });
42219
- const computeChecked = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42220
- const {
42221
- label,
42222
- checkedValue
42223
- } = props;
42224
- const radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42225
- return $xeRadioGroup ? $xeRadioGroup.props.modelValue === radioValue : props.modelValue === radioValue;
42274
+ const computeIsChecked = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42275
+ const checkValue = computeCheckValue.value;
42276
+ if ($xeRadioGroup) {
42277
+ return $xeRadioGroup.props.modelValue === checkValue;
42278
+ }
42279
+ return props.modelValue === checkValue;
42226
42280
  });
42227
42281
  const dispatchEvent = (type, params, evnt) => {
42228
42282
  emit(type, createEvent(evnt, {
@@ -42261,40 +42315,30 @@ const Radio = VxeRadio;
42261
42315
  const changeEvent = evnt => {
42262
42316
  const isDisabled = computeIsDisabled.value;
42263
42317
  if (!isDisabled) {
42264
- const {
42265
- label,
42266
- checkedValue
42267
- } = props;
42268
- const radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42269
- handleValue(radioValue, evnt);
42318
+ const checkValue = computeCheckValue.value;
42319
+ handleValue(checkValue, evnt);
42270
42320
  }
42271
42321
  };
42272
42322
  const clickEvent = evnt => {
42273
42323
  const isDisabled = computeIsDisabled.value;
42274
42324
  const isStrict = computeStrict.value;
42275
42325
  if (!isDisabled && !isStrict) {
42276
- const {
42277
- label,
42278
- checkedValue
42279
- } = props;
42280
- const radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42281
- if (radioValue === ($xeRadioGroup ? $xeRadioGroup.props.modelValue : props.modelValue)) {
42326
+ const isChecked = computeIsChecked.value;
42327
+ if (isChecked) {
42282
42328
  handleValue(null, evnt);
42283
42329
  }
42284
42330
  }
42285
42331
  };
42286
42332
  const renderVN = () => {
42287
42333
  const {
42288
- label,
42289
42334
  icon,
42290
- content,
42291
- checkedValue
42335
+ content
42292
42336
  } = props;
42293
- const radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
42294
42337
  const vSize = computeSize.value;
42295
42338
  const isDisabled = computeIsDisabled.value;
42296
42339
  const name = computeName.value;
42297
- const isChecked = computeChecked.value;
42340
+ const isChecked = computeIsChecked.value;
42341
+ const checkValue = computeCheckValue.value;
42298
42342
  const defaultSlot = slots.default;
42299
42343
  if ($xeRadioGroup) {
42300
42344
  const {
@@ -42322,7 +42366,7 @@ const Radio = VxeRadio;
42322
42366
  }
42323
42367
  }
42324
42368
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('label', {
42325
- key: radioValue,
42369
+ key: `${checkValue}`,
42326
42370
  class: ['vxe-radio vxe-radio--button', {
42327
42371
  [`size--${vSize}`]: vSize,
42328
42372
  'is--disabled': isDisabled
@@ -42348,6 +42392,11 @@ const Radio = VxeRadio;
42348
42392
  class: 'vxe-radio--button-content'
42349
42393
  }, getFuncText(content)) : renderEmptyElement($xeRadioButton)])]);
42350
42394
  };
42395
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
42396
+ if (props.label !== null) {
42397
+ radio_src_button_warnLog('vxe.error.delProp', ['label', 'checked-value']);
42398
+ }
42399
+ });
42351
42400
  $xeRadioButton.renderVN = renderVN;
42352
42401
  return renderVN;
42353
42402
  }