vxe-pc-ui 4.4.11 → 4.4.12

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 (45) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/list/src/list.js +2 -1
  3. package/es/number-input/src/number-input.js +31 -17
  4. package/es/select/src/select.js +24 -10
  5. package/es/style.css +1 -1
  6. package/es/style.min.css +1 -1
  7. package/es/ui/index.js +9 -6
  8. package/es/ui/src/log.js +1 -1
  9. package/lib/icon/style/style.css +1 -1
  10. package/lib/icon/style/style.min.css +1 -1
  11. package/lib/index.umd.js +74 -35
  12. package/lib/index.umd.min.js +1 -1
  13. package/lib/list/src/list.js +2 -1
  14. package/lib/list/src/list.min.js +1 -1
  15. package/lib/number-input/src/number-input.js +33 -19
  16. package/lib/number-input/src/number-input.min.js +1 -1
  17. package/lib/select/src/select.js +29 -8
  18. package/lib/select/src/select.min.js +1 -1
  19. package/lib/style.css +1 -1
  20. package/lib/style.min.css +1 -1
  21. package/lib/ui/index.js +9 -6
  22. package/lib/ui/index.min.js +1 -1
  23. package/lib/ui/src/log.js +1 -1
  24. package/lib/ui/src/log.min.js +1 -1
  25. package/package.json +1 -1
  26. package/packages/list/src/list.ts +2 -1
  27. package/packages/number-input/src/number-input.ts +31 -17
  28. package/packages/select/src/select.ts +24 -10
  29. package/packages/ui/index.ts +8 -5
  30. package/types/components/list.d.ts +30 -0
  31. package/types/components/number-input.d.ts +3 -0
  32. package/types/components/select.d.ts +68 -3
  33. package/types/components/table.d.ts +8 -0
  34. /package/es/icon/{iconfont.1741830156438.ttf → iconfont.1741852097093.ttf} +0 -0
  35. /package/es/icon/{iconfont.1741830156438.woff → iconfont.1741852097093.woff} +0 -0
  36. /package/es/icon/{iconfont.1741830156438.woff2 → iconfont.1741852097093.woff2} +0 -0
  37. /package/es/{iconfont.1741830156438.ttf → iconfont.1741852097093.ttf} +0 -0
  38. /package/es/{iconfont.1741830156438.woff → iconfont.1741852097093.woff} +0 -0
  39. /package/es/{iconfont.1741830156438.woff2 → iconfont.1741852097093.woff2} +0 -0
  40. /package/lib/icon/style/{iconfont.1741830156438.ttf → iconfont.1741852097093.ttf} +0 -0
  41. /package/lib/icon/style/{iconfont.1741830156438.woff → iconfont.1741852097093.woff} +0 -0
  42. /package/lib/icon/style/{iconfont.1741830156438.woff2 → iconfont.1741852097093.woff2} +0 -0
  43. /package/lib/{iconfont.1741830156438.ttf → iconfont.1741852097093.ttf} +0 -0
  44. /package/lib/{iconfont.1741830156438.woff → iconfont.1741852097093.woff} +0 -0
  45. /package/lib/{iconfont.1741830156438.woff2 → iconfont.1741852097093.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4152,14 +4152,14 @@ function checkDynamic() {
4152
4152
  }
4153
4153
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
4154
4154
 
4155
- const log_version = `ui v${"4.4.11"}`;
4155
+ const log_version = `ui v${"4.4.12"}`;
4156
4156
  const warnLog = log.create('warn', log_version);
4157
4157
  const errLog = log.create('error', log_version);
4158
4158
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
4159
4159
 
4160
4160
 
4161
4161
 
4162
- const ui_version = "4.4.11";
4162
+ const ui_version = "4.4.12";
4163
4163
  index_esm_VxeUI.uiVersion = ui_version;
4164
4164
  index_esm_VxeUI.dynamicApp = dynamicApp;
4165
4165
  function config(options) {
@@ -4330,7 +4330,7 @@ setConfig({
4330
4330
  listView: {},
4331
4331
  list: {
4332
4332
  // size: null,
4333
- scrollY: {
4333
+ virtualYConfig: {
4334
4334
  enabled: true,
4335
4335
  gt: 100
4336
4336
  // oSize: 0
@@ -4416,7 +4416,11 @@ setConfig({
4416
4416
  row: {},
4417
4417
  select: {
4418
4418
  multiCharOverflow: 8,
4419
- scrollY: {
4419
+ remoteConfig: {
4420
+ enabled: true,
4421
+ autoLoad: true
4422
+ },
4423
+ virtualYConfig: {
4420
4424
  enabled: true,
4421
4425
  gt: 100,
4422
4426
  oSize: 2
@@ -4437,12 +4441,11 @@ setConfig({
4437
4441
  rowConfig: {
4438
4442
  isHover: true
4439
4443
  },
4440
- scrollX: {
4444
+ virtualXConfig: {
4441
4445
  enabled: true,
4442
4446
  gt: 0
4443
4447
  },
4444
- scrollY: {
4445
- mode: 'wheel',
4448
+ virtualYConfig: {
4446
4449
  enabled: true,
4447
4450
  gt: 0
4448
4451
  }
@@ -24172,12 +24175,15 @@ function getOptUniqueId() {
24172
24175
  filterable: Boolean,
24173
24176
  filterMethod: Function,
24174
24177
  remote: Boolean,
24178
+ // 已废弃,被 remote-config.queryMethod 替换
24175
24179
  remoteMethod: Function,
24180
+ remoteConfig: Object,
24176
24181
  emptyText: String,
24177
24182
  transfer: {
24178
24183
  type: Boolean,
24179
24184
  default: null
24180
24185
  },
24186
+ virtualYConfig: Object,
24181
24187
  scrollY: Object,
24182
24188
  // 已废弃,被 option-config.keyField 替换
24183
24189
  optionId: {
@@ -24347,7 +24353,10 @@ function getOptUniqueId() {
24347
24353
  return false;
24348
24354
  });
24349
24355
  const computeSYOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24350
- return Object.assign({}, getConfig().select.scrollY, props.scrollY);
24356
+ return Object.assign({}, getConfig().select.virtualYConfig || getConfig().select.scrollY, props.virtualYConfig || props.scrollY);
24357
+ });
24358
+ const computeRemoteOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24359
+ return Object.assign({}, getConfig().select.remoteConfig, props.remoteConfig);
24351
24360
  });
24352
24361
  const computeOptionOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
24353
24362
  return Object.assign({}, getConfig().select.optionConfig, props.optionConfig);
@@ -24459,6 +24468,7 @@ function getOptUniqueId() {
24459
24468
  */
24460
24469
  const handleOption = () => {
24461
24470
  const {
24471
+ modelValue,
24462
24472
  filterable,
24463
24473
  filterMethod
24464
24474
  } = props;
@@ -24475,9 +24485,11 @@ function getOptUniqueId() {
24475
24485
  let avList = [];
24476
24486
  if (filterable && filterMethod) {
24477
24487
  avList = fullData.filter(option => isOptionVisible(option) && filterMethod({
24488
+ $select: $xeSelect,
24478
24489
  group: null,
24479
24490
  option,
24480
- searchValue: searchStr
24491
+ searchValue: searchStr,
24492
+ value: modelValue
24481
24493
  }));
24482
24494
  } else if (filterable) {
24483
24495
  avList = fullData.filter(option => isOptionVisible(option) && (!searchStr || `${option[labelField]}`.toLowerCase().indexOf(searchStr) > -1));
@@ -24585,12 +24597,15 @@ function getOptUniqueId() {
24585
24597
  const showOptionPanel = () => {
24586
24598
  const {
24587
24599
  loading,
24588
- filterable
24600
+ filterable,
24601
+ remote
24589
24602
  } = props;
24590
24603
  const {
24604
+ fullData,
24591
24605
  hpTimeout
24592
24606
  } = internalData;
24593
24607
  const isDisabled = computeIsDisabled.value;
24608
+ const remoteOpts = computeRemoteOpts.value;
24594
24609
  if (!loading && !isDisabled) {
24595
24610
  if (hpTimeout) {
24596
24611
  clearTimeout(hpTimeout);
@@ -24602,8 +24617,12 @@ function getOptUniqueId() {
24602
24617
  reactData.isActivated = true;
24603
24618
  reactData.isAniVisible = true;
24604
24619
  if (filterable) {
24605
- handleOption();
24606
- updateYData();
24620
+ if (remote && remoteOpts.enabled && remoteOpts.autoLoad && !fullData.length) {
24621
+ handleSearchEvent();
24622
+ } else {
24623
+ handleOption();
24624
+ updateYData();
24625
+ }
24607
24626
  }
24608
24627
  setTimeout(() => {
24609
24628
  reactData.visiblePanel = true;
@@ -24898,16 +24917,21 @@ function getOptUniqueId() {
24898
24917
  };
24899
24918
  const handleSearchEvent = () => {
24900
24919
  const {
24920
+ modelValue,
24901
24921
  remote,
24902
24922
  remoteMethod
24903
24923
  } = props;
24904
24924
  const {
24905
24925
  searchValue
24906
24926
  } = reactData;
24907
- if (remote && remoteMethod) {
24927
+ const remoteOpts = computeRemoteOpts.value;
24928
+ const queryMethod = remoteOpts.queryMethod || remoteMethod;
24929
+ if (remote && queryMethod && remoteOpts.enabled) {
24908
24930
  reactData.searchLoading = true;
24909
- Promise.resolve(remoteMethod({
24910
- searchValue
24931
+ Promise.resolve(queryMethod({
24932
+ $select: $xeSelect,
24933
+ searchValue,
24934
+ value: modelValue
24911
24935
  })).then(() => (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)()).catch(() => (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)()).finally(() => {
24912
24936
  reactData.searchLoading = false;
24913
24937
  handleOption();
@@ -29817,7 +29841,6 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
29817
29841
  type: String,
29818
29842
  default: () => getConfig().numberInput.size || getConfig().size
29819
29843
  },
29820
- multiple: Boolean,
29821
29844
  // number、integer、float
29822
29845
  min: {
29823
29846
  type: [String, Number],
@@ -29854,6 +29877,10 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
29854
29877
  type: Boolean,
29855
29878
  default: () => getConfig().numberInput.autoFill
29856
29879
  },
29880
+ editable: {
29881
+ type: Boolean,
29882
+ default: true
29883
+ },
29857
29884
  prefixIcon: String,
29858
29885
  suffixIcon: String,
29859
29886
  // 已废弃
@@ -29963,10 +29990,10 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
29963
29990
  });
29964
29991
  const computeInputReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
29965
29992
  const {
29966
- multiple
29993
+ editable
29967
29994
  } = props;
29968
29995
  const formReadonly = computeFormReadonly.value;
29969
- return formReadonly || multiple;
29996
+ return formReadonly || !editable;
29970
29997
  });
29971
29998
  const computeInpPlaceholder = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
29972
29999
  const {
@@ -30147,13 +30174,16 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30147
30174
  }
30148
30175
  };
30149
30176
  const focusEvent = evnt => {
30150
- const {
30151
- inputValue
30152
- } = reactData;
30153
- reactData.inputValue = eqEmptyValue(inputValue) ? '' : `${external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue)}`;
30154
- reactData.isFocus = true;
30155
- reactData.isActivated = true;
30156
- triggerEvent(evnt);
30177
+ const inputReadonly = computeInputReadonly.value;
30178
+ if (!inputReadonly) {
30179
+ const {
30180
+ inputValue
30181
+ } = reactData;
30182
+ reactData.inputValue = eqEmptyValue(inputValue) ? '' : `${external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue)}`;
30183
+ reactData.isFocus = true;
30184
+ reactData.isActivated = true;
30185
+ triggerEvent(evnt);
30186
+ }
30157
30187
  };
30158
30188
  const clickPrefixEvent = evnt => {
30159
30189
  const isDisabled = computeIsDisabled.value;
@@ -30383,6 +30413,7 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30383
30413
  exponential,
30384
30414
  controls
30385
30415
  } = props;
30416
+ const inputReadonly = computeInputReadonly.value;
30386
30417
  const isCtrlKey = evnt.ctrlKey;
30387
30418
  const isShiftKey = evnt.shiftKey;
30388
30419
  const isAltKey = evnt.altKey;
@@ -30396,7 +30427,7 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30396
30427
  if (isEsc) {
30397
30428
  afterCheckValue();
30398
30429
  } else if (isUpArrow || isDwArrow) {
30399
- if (controls) {
30430
+ if (controls && !inputReadonly) {
30400
30431
  numberKeydownEvent(evnt);
30401
30432
  }
30402
30433
  }
@@ -30440,7 +30471,8 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30440
30471
  }
30441
30472
  };
30442
30473
  const wheelEvent = evnt => {
30443
- if (props.controls) {
30474
+ const inputReadonly = computeInputReadonly.value;
30475
+ if (props.controls && !inputReadonly) {
30444
30476
  if (reactData.isActivated) {
30445
30477
  evnt.stopPropagation();
30446
30478
  evnt.preventDefault();
@@ -30465,8 +30497,9 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30465
30497
  const el = refElem.value;
30466
30498
  const panelElem = refInputPanel.value;
30467
30499
  const isDisabled = computeIsDisabled.value;
30500
+ const inputReadonly = computeInputReadonly.value;
30468
30501
  const inpImmediate = computeInpImmediate.value;
30469
- if (!isDisabled && isActivated) {
30502
+ if (!isDisabled && !inputReadonly && isActivated) {
30470
30503
  reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
30471
30504
  if (!reactData.isActivated) {
30472
30505
  if (!inpImmediate) {
@@ -30485,7 +30518,8 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30485
30518
  clearable
30486
30519
  } = props;
30487
30520
  const isDisabled = computeIsDisabled.value;
30488
- if (!isDisabled) {
30521
+ const inputReadonly = computeInputReadonly.value;
30522
+ if (!isDisabled && !inputReadonly) {
30489
30523
  const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
30490
30524
  const isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
30491
30525
  let isActivated = reactData.isActivated;
@@ -30582,7 +30616,8 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30582
30616
  const {
30583
30617
  controls
30584
30618
  } = props;
30585
- if (controls) {
30619
+ const inputReadonly = computeInputReadonly.value;
30620
+ if (controls && !inputReadonly) {
30586
30621
  return renderNumberIcon();
30587
30622
  }
30588
30623
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)();
@@ -30595,9 +30630,12 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30595
30630
  numberInputMethods = {
30596
30631
  dispatchEvent,
30597
30632
  focus() {
30598
- const inputElem = refInputTarget.value;
30599
- reactData.isActivated = true;
30600
- inputElem.focus();
30633
+ const inputReadonly = computeInputReadonly.value;
30634
+ if (!inputReadonly) {
30635
+ const inputElem = refInputTarget.value;
30636
+ reactData.isActivated = true;
30637
+ inputElem.focus();
30638
+ }
30601
30639
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
30602
30640
  },
30603
30641
  blur() {
@@ -30650,7 +30688,7 @@ const WidgetVxeNumberInputFormComponent = (0,external_commonjs_vue_commonjs2_vue
30650
30688
  class: ['vxe-number-input', `type--${type}`, className, {
30651
30689
  [`size--${vSize}`]: vSize,
30652
30690
  [`is--${align}`]: align,
30653
- 'is--controls': controls,
30691
+ 'is--controls': controls && !inputReadonly,
30654
30692
  'is--prefix': !!prefix,
30655
30693
  'is--suffix': !!suffix,
30656
30694
  'is--disabled': isDisabled,
@@ -41337,6 +41375,7 @@ const ListView = VxeListView;
41337
41375
  default: () => getConfig().list.autoResize
41338
41376
  },
41339
41377
  syncResize: [Boolean, String, Number],
41378
+ virtualYConfig: Object,
41340
41379
  scrollY: Object
41341
41380
  },
41342
41381
  emits: ['scroll'],
@@ -41386,7 +41425,7 @@ const ListView = VxeListView;
41386
41425
  getRefMaps: () => refMaps
41387
41426
  };
41388
41427
  const computeSYOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
41389
- return Object.assign({}, getConfig().list.scrollY, props.scrollY);
41428
+ return Object.assign({}, getConfig().list.virtualYConfig || getConfig().list.scrollY, props.virtualYConfig || props.scrollY);
41390
41429
  });
41391
41430
  const computeStyles = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
41392
41431
  const {