bkui-vue 0.0.1-beta.153 → 0.0.1-beta.156

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/dist/index.cjs.js +34 -34
  2. package/dist/index.esm.js +88 -65
  3. package/dist/index.umd.js +35 -35
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/checkbox/checkbox-group.d.ts +16 -0
  7. package/lib/checkbox/index.d.ts +11 -0
  8. package/lib/checkbox/index.js +1 -1
  9. package/lib/color-picker/color-picker.d.ts +16 -0
  10. package/lib/color-picker/index.d.ts +24 -1
  11. package/lib/color-picker/index.js +1 -1
  12. package/lib/date-picker/date-picker.d.ts +9 -0
  13. package/lib/date-picker/index.d.ts +20 -1
  14. package/lib/date-picker/index.js +1 -1
  15. package/lib/date-picker/props.d.ts +4 -0
  16. package/lib/form/form-item.d.ts +1 -1
  17. package/lib/form/form.css +6 -0
  18. package/lib/form/form.less +9 -0
  19. package/lib/form/form.variable.css +6 -0
  20. package/lib/form/index.d.ts +1 -1
  21. package/lib/form/index.js +1 -1
  22. package/lib/input/index.d.ts +27 -4
  23. package/lib/input/index.js +1 -1
  24. package/lib/input/input.d.ts +17 -1
  25. package/lib/process/index.js +1 -1
  26. package/lib/radio/index.d.ts +11 -0
  27. package/lib/radio/index.js +1 -1
  28. package/lib/radio/radio-group.d.ts +16 -0
  29. package/lib/rate/index.d.ts +24 -1
  30. package/lib/rate/index.js +1 -1
  31. package/lib/rate/rate.d.ts +11 -0
  32. package/lib/resize-layout/index.d.ts +4 -4
  33. package/lib/resize-layout/resize-layout.d.ts +1 -1
  34. package/lib/select/index.d.ts +48 -1
  35. package/lib/select/index.js +1 -1
  36. package/lib/select/option.d.ts +1 -0
  37. package/lib/select/select.css +4 -4
  38. package/lib/select/select.d.ts +22 -0
  39. package/lib/select/select.less +5 -5
  40. package/lib/select/select.variable.css +4 -4
  41. package/lib/select/type.d.ts +1 -0
  42. package/lib/switcher/index.d.ts +24 -1
  43. package/lib/switcher/index.js +1 -1
  44. package/lib/switcher/switcher.d.ts +11 -0
  45. package/lib/table/plugins/head-sort.css +22 -0
  46. package/lib/table/table.css +11 -4
  47. package/lib/table/table.less +12 -5
  48. package/lib/table/table.variable.css +11 -4
  49. package/lib/tag-input/index.d.ts +20 -1
  50. package/lib/tag-input/index.js +1 -1
  51. package/lib/tag-input/tag-input.d.ts +10 -1
  52. package/lib/tag-input/tag-props.d.ts +4 -0
  53. package/lib/tree/tree.css +2 -1
  54. package/lib/tree/tree.less +2 -1
  55. package/lib/tree/tree.variable.css +2 -1
  56. package/lib/upload/index.js +1 -1
  57. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -9205,7 +9205,8 @@ const inputType = {
9205
9205
  modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
9206
9206
  size: PropTypes.size(),
9207
9207
  rows: PropTypes.number,
9208
- selectReadonly: PropTypes.bool.def(false)
9208
+ selectReadonly: PropTypes.bool.def(false),
9209
+ withValidate: PropTypes.bool.def(true)
9209
9210
  };
9210
9211
  let EVENTS$2;
9211
9212
  (function(EVENTS2) {
@@ -9305,6 +9306,12 @@ var Component$x = defineComponent({
9305
9306
  const decControlCls = computed(() => classes({
9306
9307
  "is-disabled": props2.disabled || props2.modelValue <= props2.min
9307
9308
  }));
9309
+ watch(() => props2.modelValue, () => {
9310
+ var _a2;
9311
+ if (props2.withValidate) {
9312
+ (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change");
9313
+ }
9314
+ });
9308
9315
  ctx.expose({
9309
9316
  focus() {
9310
9317
  inputRef.value.focus();
@@ -9312,14 +9319,12 @@ var Component$x = defineComponent({
9312
9319
  clear
9313
9320
  });
9314
9321
  function clear() {
9315
- var _a2;
9316
9322
  if (props2.disabled)
9317
9323
  return;
9318
9324
  const resetVal = isNumberInput.value ? props2.min : "";
9319
9325
  ctx.emit(EVENTS$2.UPDATE, resetVal);
9320
9326
  ctx.emit(EVENTS$2.CHANGE, resetVal);
9321
9327
  ctx.emit(EVENTS$2.CLEAR);
9322
- (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change");
9323
9328
  }
9324
9329
  function handleFocus(e) {
9325
9330
  isFocused.value = true;
@@ -9338,7 +9343,6 @@ var Component$x = defineComponent({
9338
9343
  }
9339
9344
  function eventHandler(eventName) {
9340
9345
  return (e) => {
9341
- var _a2;
9342
9346
  e.stopPropagation();
9343
9347
  if (eventName === EVENTS$2.KEYDOWN && (e.code === "Enter" || e.key === "Enter" || e.keyCode === 13)) {
9344
9348
  ctx.emit(EVENTS$2.ENTER, e.target.value, e);
@@ -9349,9 +9353,6 @@ var Component$x = defineComponent({
9349
9353
  ctx.emit(EVENTS$2.UPDATE, isNumberInput.value ? +e.target.value : e.target.value);
9350
9354
  }
9351
9355
  ctx.emit(eventName, e.target.value, e);
9352
- if (eventName === EVENTS$2.INPUT) {
9353
- (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change");
9354
- }
9355
9356
  };
9356
9357
  }
9357
9358
  const [handleKeyup, handleKeydown, handleKeyPress, handlePaste, handleChange, handleInput] = [EVENTS$2.KEYUP, EVENTS$2.KEYDOWN, EVENTS$2.KEYPRESS, EVENTS$2.PASTE, EVENTS$2.CHANGE, EVENTS$2.INPUT].map(eventHandler);
@@ -9580,7 +9581,6 @@ const useCheckbox = () => {
9580
9581
  props: props2,
9581
9582
  emit
9582
9583
  } = currentInstance;
9583
- const formItem = useFormItem();
9584
9584
  const checkboxGroup = inject(checkboxGroupKey, EMPTY_OBJ);
9585
9585
  const isGroup = !isEmptyObj(checkboxGroup);
9586
9586
  const isChecked = ref(props2.checked);
@@ -9610,7 +9610,6 @@ const useCheckbox = () => {
9610
9610
  isChecked.value = value;
9611
9611
  };
9612
9612
  const handleChange = (event) => {
9613
- var _a;
9614
9613
  if (isDisabled.value) {
9615
9614
  return;
9616
9615
  }
@@ -9622,7 +9621,6 @@ const useCheckbox = () => {
9622
9621
  if (isGroup) {
9623
9622
  checkboxGroup.handleChange();
9624
9623
  }
9625
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
9626
9624
  nextTick(() => {
9627
9625
  if ($targetInput.checked !== isChecked.value) {
9628
9626
  $targetInput.checked = isChecked.value;
@@ -9710,13 +9708,15 @@ var Component$v = defineComponent({
9710
9708
  const checkboxGroupProps = {
9711
9709
  name: PropTypes.string.def(""),
9712
9710
  modelValue: PropTypes.array,
9713
- disabled: PropTypes.bool
9711
+ disabled: PropTypes.bool,
9712
+ withValidate: PropTypes.bool.def(true)
9714
9713
  };
9715
9714
  var BkCheckboxGroup = defineComponent({
9716
9715
  name: "CheckboxGroup",
9717
9716
  props: checkboxGroupProps,
9718
9717
  emits: ["change", "update:modelValue"],
9719
9718
  setup(props2, context) {
9719
+ const formItem = useFormItem();
9720
9720
  const checkboxInstanceList = [];
9721
9721
  const register = (checkboxContext) => {
9722
9722
  checkboxInstanceList.push(checkboxContext);
@@ -9744,6 +9744,12 @@ var BkCheckboxGroup = defineComponent({
9744
9744
  unregister,
9745
9745
  handleChange
9746
9746
  });
9747
+ watch(() => props2.modelValue, () => {
9748
+ var _a;
9749
+ if (props2.withValidate) {
9750
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
9751
+ }
9752
+ });
9747
9753
  onMounted(() => {
9748
9754
  const modelValue = props2.modelValue || [];
9749
9755
  checkboxInstanceList.forEach((checkboxInstance) => {
@@ -13303,7 +13309,6 @@ const useRadio = () => {
13303
13309
  props: props2,
13304
13310
  emit
13305
13311
  } = currentInstance;
13306
- const formItem = useFormItem();
13307
13312
  const radioGroup = inject(radioGroupKey, EMPTY_OBJ);
13308
13313
  const isGroup = !isEmptyObj(radioGroup);
13309
13314
  const isChecked = ref(false);
@@ -13333,7 +13338,6 @@ const useRadio = () => {
13333
13338
  isChecked.value = value;
13334
13339
  };
13335
13340
  const handleChange = (event) => {
13336
- var _a;
13337
13341
  if (isDisabled.value) {
13338
13342
  return;
13339
13343
  }
@@ -13345,7 +13349,6 @@ const useRadio = () => {
13345
13349
  if (isGroup) {
13346
13350
  radioGroup.handleChange(currentInstance.proxy);
13347
13351
  }
13348
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
13349
13352
  nextTick(() => {
13350
13353
  if ($targetInput.checked !== isChecked.value) {
13351
13354
  $targetInput.checked = isChecked.value;
@@ -13487,13 +13490,15 @@ var RadioButton = defineComponent({
13487
13490
  const radioGroupProps = {
13488
13491
  name: PropTypes.string.def(""),
13489
13492
  modelValue: PropTypes.oneOfType([String, Number, Boolean]),
13490
- disabled: PropTypes.bool
13493
+ disabled: PropTypes.bool,
13494
+ withValidate: PropTypes.bool.def(true)
13491
13495
  };
13492
13496
  var RadioGroup = defineComponent({
13493
13497
  name: "RadioGroup",
13494
13498
  props: radioGroupProps,
13495
13499
  emits: ["change", "update:modelValue"],
13496
13500
  setup(props2, context) {
13501
+ const formItem = useFormItem();
13497
13502
  const radioInstanceList = [];
13498
13503
  const register = (radioContext) => {
13499
13504
  radioInstanceList.push(radioContext);
@@ -13520,6 +13525,12 @@ var RadioGroup = defineComponent({
13520
13525
  unregister,
13521
13526
  handleChange
13522
13527
  });
13528
+ watch(() => props2.modelValue, () => {
13529
+ var _a;
13530
+ if (props2.withValidate) {
13531
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
13532
+ }
13533
+ });
13523
13534
  onMounted(() => {
13524
13535
  if (props2.modelValue === "") {
13525
13536
  return;
@@ -13607,7 +13618,8 @@ var Component$m = defineComponent({
13607
13618
  props: {
13608
13619
  modelValue: PropTypes.number.def(0),
13609
13620
  size: PropTypes.size(),
13610
- editable: PropTypes.bool.def(true)
13621
+ editable: PropTypes.bool.def(true),
13622
+ withValidate: PropTypes.bool.def(true)
13611
13623
  },
13612
13624
  emits: ["change", "update:modelValue"],
13613
13625
  setup(props2, {
@@ -13616,12 +13628,10 @@ var Component$m = defineComponent({
13616
13628
  const formItem = useFormItem();
13617
13629
  const hoverRate = ref(0);
13618
13630
  const chooseRate = (val) => {
13619
- var _a;
13620
13631
  if (!props2.editable)
13621
13632
  return;
13622
13633
  emit("update:modelValue", val);
13623
13634
  emit("change", val);
13624
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
13625
13635
  };
13626
13636
  const changeHover = (val) => {
13627
13637
  hoverRate.value = val;
@@ -13655,6 +13665,12 @@ var Component$m = defineComponent({
13655
13665
  width: rateSize.width,
13656
13666
  height: rateSize.height
13657
13667
  };
13668
+ watch(() => props2.modelValue, () => {
13669
+ var _a;
13670
+ if (props2.withValidate) {
13671
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
13672
+ }
13673
+ });
13658
13674
  return () => createVNode("p", {
13659
13675
  "class": rateClass
13660
13676
  }, [props2.editable ? createVNode(star, mergeProps({
@@ -13977,6 +13993,7 @@ var BkOption = defineComponent({
13977
13993
  });
13978
13994
  const multiple = computed(() => select2 == null ? void 0 : select2.multiple);
13979
13995
  const isHover = computed(() => (select2 == null ? void 0 : select2.activeOptionValue) === value.value);
13996
+ const showSelectedIcon = computed(() => select2 == null ? void 0 : select2.showSelectedIcon);
13980
13997
  const handleOptionClick = () => {
13981
13998
  if (disabled.value)
13982
13999
  return;
@@ -13997,6 +14014,7 @@ var BkOption = defineComponent({
13997
14014
  selected,
13998
14015
  multiple,
13999
14016
  isHover,
14017
+ showSelectedIcon,
14000
14018
  handleOptionClick,
14001
14019
  handleMouseEnter
14002
14020
  });
@@ -14017,11 +14035,11 @@ var BkOption = defineComponent({
14017
14035
  }, [(_c = (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) != null ? _c : createVNode("span", {
14018
14036
  "class": "bk-select-option-item",
14019
14037
  "title": this.label
14020
- }, [this.label, this.multiple && this.selected && createVNode(done, {
14021
- "class": "done-icon",
14038
+ }, [this.label]), this.multiple && this.selected && this.showSelectedIcon && createVNode(done, {
14039
+ "class": "bk-select-selected-icon",
14022
14040
  "width": 22,
14023
14041
  "height": 22
14024
- }, null)])]), [[vShow, this.visible]]);
14042
+ }, null)]), [[vShow, this.visible]]);
14025
14043
  }
14026
14044
  });
14027
14045
  var OptionGroup = defineComponent({
@@ -14287,7 +14305,9 @@ var Component$j = defineComponent({
14287
14305
  customContent: PropTypes.bool.def(false),
14288
14306
  list: PropTypes.array.def([]),
14289
14307
  idKey: PropTypes.string.def("value"),
14290
- displayKey: PropTypes.string.def("label")
14308
+ displayKey: PropTypes.string.def("label"),
14309
+ withValidate: PropTypes.bool.def(true),
14310
+ showSelectedIcon: PropTypes.bool.def(true)
14291
14311
  },
14292
14312
  emits: ["update:modelValue", "change", "toggle", "clear", "scroll-end", "focus", "blur"],
14293
14313
  setup(props2, {
@@ -14307,7 +14327,8 @@ var Component$j = defineComponent({
14307
14327
  showOnInit,
14308
14328
  multipleMode,
14309
14329
  allowCreate,
14310
- customContent
14330
+ customContent,
14331
+ showSelectedIcon
14311
14332
  } = toRefs(props2);
14312
14333
  const formItem = useFormItem();
14313
14334
  const inputRef = ref();
@@ -14319,7 +14340,11 @@ var Component$j = defineComponent({
14319
14340
  const selected = ref([]);
14320
14341
  const activeOptionValue = ref();
14321
14342
  watch(modelValue, () => {
14343
+ var _a;
14322
14344
  handleSetSelectedData();
14345
+ if (props2.withValidate) {
14346
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
14347
+ }
14323
14348
  }, {
14324
14349
  deep: true
14325
14350
  });
@@ -14414,12 +14439,10 @@ var Component$j = defineComponent({
14414
14439
  searchLoading
14415
14440
  } = useRemoteSearch(isRemoteSearch.value ? remoteMethod.value : defaultSearchMethod, initActiveOptionValue);
14416
14441
  const emitChange = (val) => {
14417
- var _a;
14418
14442
  if (val === modelValue.value)
14419
14443
  return;
14420
14444
  emit("change", val, modelValue.value);
14421
14445
  emit("update:modelValue", val, modelValue.value);
14422
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
14423
14446
  };
14424
14447
  const handleTogglePopover = () => {
14425
14448
  if (isDisabled.value)
@@ -14601,6 +14624,7 @@ var Component$j = defineComponent({
14601
14624
  multiple,
14602
14625
  selected,
14603
14626
  activeOptionValue,
14627
+ showSelectedIcon,
14604
14628
  register,
14605
14629
  unregister,
14606
14630
  registerGroup,
@@ -15077,7 +15101,8 @@ var Component$g = defineComponent({
15077
15101
  trueValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(true),
15078
15102
  falseValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(false),
15079
15103
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(false),
15080
- modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(false)
15104
+ modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(false),
15105
+ withValidate: PropTypes.bool.def(true)
15081
15106
  },
15082
15107
  emits: ["update:modelValue", "change"],
15083
15108
  setup(props2, {
@@ -15108,7 +15133,11 @@ var Component$g = defineComponent({
15108
15133
  return cls;
15109
15134
  });
15110
15135
  watch(() => props2.modelValue, () => {
15136
+ var _a;
15111
15137
  isModelValue.value = true;
15138
+ if (props2.withValidate) {
15139
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
15140
+ }
15112
15141
  });
15113
15142
  watch(() => props2.value, () => {
15114
15143
  isModelValue.value = false;
@@ -15122,10 +15151,8 @@ var Component$g = defineComponent({
15122
15151
  const lastValue = isChecked.value ? props2.falseValue : props2.trueValue;
15123
15152
  const lastChecked = !isChecked.value;
15124
15153
  const trigger = () => {
15125
- var _a;
15126
15154
  emit("update:modelValue", lastValue);
15127
15155
  emit("change", lastChecked);
15128
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
15129
15156
  };
15130
15157
  let goodJob = true;
15131
15158
  if (typeof props2.beforeChange === "function") {
@@ -17912,6 +17939,10 @@ const tagProps = () => ({
17912
17939
  pasteFn: {
17913
17940
  type: Function,
17914
17941
  default: null
17942
+ },
17943
+ withValidate: {
17944
+ type: Boolean,
17945
+ default: true
17915
17946
  }
17916
17947
  });
17917
17948
  var TagRender = defineComponent({
@@ -17987,7 +18018,11 @@ var Component$c = defineComponent({
17987
18018
  disabled: props2.disabled
17988
18019
  }));
17989
18020
  watch([() => [...props2.modelValue], () => [...props2.list]], () => {
18021
+ var _a;
17990
18022
  initData();
18023
+ if (props2.withValidate) {
18024
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
18025
+ }
17991
18026
  });
17992
18027
  watch(curInputValue, lodash.exports.debounce(() => {
17993
18028
  const hasShowCount = pageState.curPageList.length !== 0;
@@ -18281,11 +18316,9 @@ var Component$c = defineComponent({
18281
18316
  tagInputRef.value.style.width = `${INPUT_MIN_WIDTH}px`;
18282
18317
  };
18283
18318
  const handleChange = (type, data2) => {
18284
- var _a;
18285
18319
  emit("change", tagList.value);
18286
18320
  emit(type, data2);
18287
18321
  emit("update:modelValue", tagList.value);
18288
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
18289
18322
  };
18290
18323
  const handleClear = (e) => {
18291
18324
  e.stopPropagation();
@@ -23448,7 +23481,11 @@ const datePickerProps = {
23448
23481
  return ["simplicity", "normal"].indexOf(v2) > -1;
23449
23482
  }
23450
23483
  },
23451
- disableDate: Function
23484
+ disableDate: Function,
23485
+ withValidate: {
23486
+ type: Boolean,
23487
+ default: true
23488
+ }
23452
23489
  };
23453
23490
  var Component$9 = defineComponent({
23454
23491
  name: "DatePicker",
@@ -23580,7 +23617,11 @@ var Component$9 = defineComponent({
23580
23617
  });
23581
23618
  const pickerDropdownRef = ref(null);
23582
23619
  watch(() => props2.modelValue, (modelValue) => {
23620
+ var _a;
23583
23621
  state.internalValue = parseDate(modelValue, props2.type, props2.multiple, props2.format);
23622
+ if (props2.withValidate) {
23623
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
23624
+ }
23584
23625
  });
23585
23626
  watch(() => props2.open, (open) => {
23586
23627
  state.visible = open === true;
@@ -23654,17 +23695,15 @@ var Component$9 = defineComponent({
23654
23695
  }
23655
23696
  };
23656
23697
  const handleInputMouseleave = (_e) => {
23657
- console.log("handleInputMouseleave");
23658
23698
  state.showClose = false;
23659
23699
  };
23660
23700
  const emitChange = (type) => {
23661
23701
  nextTick(() => {
23662
- var _a, _b;
23702
+ var _a;
23663
23703
  emit("change", publicStringValue.value, type);
23664
23704
  emit("update:modelValue", publicVModelValue.value);
23665
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
23666
23705
  if (props2.type.indexOf("time") < 0) {
23667
- (_b = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _b.blur();
23706
+ (_a = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _a.blur();
23668
23707
  }
23669
23708
  });
23670
23709
  };
@@ -25575,30 +25614,12 @@ var Form = defineComponent({
25575
25614
  }
25576
25615
  });
25577
25616
  var defaultValidator = {
25578
- required: (value) => {
25579
- console.log("required", value, value !== "" && value !== void 0 && value !== null);
25580
- return value !== "" && value !== void 0 && value !== null;
25581
- },
25582
- min: (value, min2) => {
25583
- console.log("min");
25584
- return value >= min2;
25585
- },
25586
- max: (value, max2) => {
25587
- console.log("max");
25588
- return max2 >= value;
25589
- },
25590
- email: (value) => {
25591
- console.log("email");
25592
- return /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(value);
25593
- },
25594
- maxlength: (value, maxlength) => {
25595
- console.log("maxlength");
25596
- return value.length <= maxlength;
25597
- },
25598
- pattern: (value, pattern) => {
25599
- console.log("pattern");
25600
- return pattern.test(value);
25601
- }
25617
+ required: (value) => value !== "" && value !== void 0 && value !== null,
25618
+ min: (value, min2) => value >= min2,
25619
+ max: (value, max2) => max2 >= value,
25620
+ email: (value) => /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(value),
25621
+ maxlength: (value, maxlength) => value.length <= maxlength,
25622
+ pattern: (value, pattern) => pattern.test(value)
25602
25623
  };
25603
25624
  const formItemProps = {
25604
25625
  label: PropTypes.string,
@@ -27500,18 +27521,14 @@ var Component$2 = defineComponent({
27500
27521
  }, {
27501
27522
  content: "\u6B65\u9AA45"
27502
27523
  }]);
27503
- console.log("props.list", props2.list);
27504
27524
  if ((_a = props2.list) == null ? void 0 : _a.length) {
27505
27525
  defaultProcessList.value.splice(0, defaultProcessList.value.length, ...props2.list);
27506
27526
  }
27507
27527
  };
27508
27528
  const jumpTo = async (index) => {
27509
- console.log(index);
27510
27529
  try {
27511
27530
  if (props2.controllable && index !== props2.curProcess) {
27512
- console.log(props2.curProcess);
27513
27531
  emit("update:curProcess", index);
27514
- console.log(props2.curProcess);
27515
27532
  emit("click", index);
27516
27533
  }
27517
27534
  } catch (e) {
@@ -28842,7 +28859,7 @@ var useFileHandler = (props2, hooks) => {
28842
28859
  };
28843
28860
  };
28844
28861
  var Component$1 = defineComponent({
28845
- name: "BkUpload",
28862
+ name: "Upload",
28846
28863
  props: uploadProps,
28847
28864
  emits: ["on-exceed", "on-progress", "on-success", "on-error", "on-delete", "on-done"],
28848
28865
  setup(props2, {
@@ -33381,7 +33398,8 @@ const colorPickerProps = {
33381
33398
  size: PropTypes.size(["", "small", "large"]).def(""),
33382
33399
  showValue: PropTypes.bool.def(true),
33383
33400
  recommend: PropTypes.oneOfType([PropTypes.array.def(() => []), PropTypes.bool.def(true)]).def(true),
33384
- extCls: PropTypes.string.def("")
33401
+ extCls: PropTypes.string.def(""),
33402
+ withValidate: PropTypes.bool.def(true)
33385
33403
  };
33386
33404
  const whiteColorObj = formatColor("#FFFFFF");
33387
33405
  var Component = defineComponent({
@@ -33394,6 +33412,7 @@ var Component = defineComponent({
33394
33412
  setup(props2, {
33395
33413
  emit
33396
33414
  }) {
33415
+ const formItem = useFormItem();
33397
33416
  const showDropdown = ref(false);
33398
33417
  const colorStr = ref("");
33399
33418
  const colorObj = reactive(JSON.parse(JSON.stringify(whiteColorObj)));
@@ -33413,7 +33432,11 @@ var Component = defineComponent({
33413
33432
  });
33414
33433
  });
33415
33434
  watch(() => props2.modelValue, () => {
33435
+ var _a;
33416
33436
  changeColorFromProps();
33437
+ if (props2.withValidate) {
33438
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
33439
+ }
33417
33440
  });
33418
33441
  const handleTriggerKeydown = (e) => {
33419
33442
  if (e.code === "Enter" || e.code === "NumpadEnter") {