vue-devui 1.5.12 → 1.5.13-hotfix.1

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 (92) hide show
  1. package/auto-complete/index.es.js +139 -61
  2. package/auto-complete/index.umd.js +16 -16
  3. package/auto-complete/style.css +1 -1
  4. package/checkbox/index.es.js +115 -61
  5. package/checkbox/index.umd.js +15 -15
  6. package/checkbox/style.css +1 -1
  7. package/code-editor/index.es.js +5 -2
  8. package/code-editor/index.umd.js +6 -6
  9. package/code-review/index.es.js +12 -1
  10. package/code-review/index.umd.js +18 -18
  11. package/code-review/style.css +1 -1
  12. package/date-picker-pro/index.es.js +213 -109
  13. package/date-picker-pro/index.umd.js +19 -19
  14. package/date-picker-pro/style.css +1 -1
  15. package/editor-md/index.es.js +1 -1
  16. package/editor-md/index.umd.js +1 -1
  17. package/form/index.es.js +142 -64
  18. package/form/index.umd.js +14 -14
  19. package/form/style.css +1 -1
  20. package/image-preview/index.es.js +2 -6
  21. package/image-preview/index.umd.js +2 -2
  22. package/image-preview/style.css +1 -1
  23. package/input/index.es.js +207 -79
  24. package/input/index.umd.js +18 -18
  25. package/input/style.css +1 -1
  26. package/input-number/index.es.js +123 -46
  27. package/input-number/index.umd.js +20 -20
  28. package/input-number/style.css +1 -1
  29. package/mention/index.es.js +138 -60
  30. package/mention/index.umd.js +16 -16
  31. package/mention/style.css +1 -1
  32. package/nuxt/components/STYLE_TOKEN.js +3 -0
  33. package/nuxt/components/formControlProps.js +3 -0
  34. package/package.json +1 -1
  35. package/pagination/index.es.js +155 -89
  36. package/pagination/index.umd.js +13 -13
  37. package/pagination/style.css +1 -1
  38. package/progress/index.es.js +6 -6
  39. package/progress/index.umd.js +1 -1
  40. package/radio/index.es.js +115 -61
  41. package/radio/index.umd.js +16 -16
  42. package/radio/style.css +1 -1
  43. package/search/index.es.js +211 -83
  44. package/search/index.umd.js +19 -19
  45. package/search/style.css +1 -1
  46. package/select/index.es.js +148 -82
  47. package/select/index.umd.js +11 -11
  48. package/select/style.css +1 -1
  49. package/skeleton/index.es.js +1 -0
  50. package/skeleton/index.umd.js +2 -2
  51. package/steps/index.es.js +35 -11
  52. package/steps/index.umd.js +1 -1
  53. package/style.css +1 -1
  54. package/switch/index.es.js +115 -61
  55. package/switch/index.umd.js +14 -14
  56. package/switch/style.css +1 -1
  57. package/table/index.es.js +88 -34
  58. package/table/index.umd.js +15 -15
  59. package/table/style.css +1 -1
  60. package/textarea/index.es.js +141 -63
  61. package/textarea/index.umd.js +17 -17
  62. package/textarea/style.css +1 -1
  63. package/time-picker/index.es.js +159 -55
  64. package/time-picker/index.umd.js +11 -11
  65. package/time-picker/style.css +1 -1
  66. package/time-select/index.es.js +148 -82
  67. package/time-select/index.umd.js +17 -17
  68. package/time-select/style.css +1 -1
  69. package/tree/index.es.js +86 -32
  70. package/tree/index.umd.js +11 -11
  71. package/tree/style.css +1 -1
  72. package/types/auto-focus/index.d.ts +9 -0
  73. package/types/auto-focus/src/auto-focus-directive.d.ts +4 -0
  74. package/types/code-review/src/code-review-types.d.ts +6 -0
  75. package/types/code-review/src/code-review.d.ts +9 -0
  76. package/types/form/index.d.ts +1 -0
  77. package/types/form/src/components/form-control/use-form-control.d.ts +11 -2
  78. package/types/form/src/components/form-item/form-item-types.d.ts +10 -2
  79. package/types/form/src/components/form-item/form-item.d.ts +3 -3
  80. package/types/form/src/components/form-label/form-label.d.ts +1 -13
  81. package/types/form/src/components/form-label/use-form-label.d.ts +14 -2
  82. package/types/form/src/form-types.d.ts +11 -0
  83. package/types/form/src/form.d.ts +18 -0
  84. package/types/input/src/composables/use-input-event.d.ts +12 -2
  85. package/types/input/src/input-types.d.ts +8 -0
  86. package/types/input/src/input.d.ts +18 -0
  87. package/types/input-icon/src/input-icon.d.ts +18 -0
  88. package/types/list/index.d.ts +0 -1
  89. package/types/select/src/composables/use-select-menu-size.d.ts +5 -0
  90. package/types/vue-devui.d.ts +2 -1
  91. package/vue-devui.es.js +202 -70
  92. package/vue-devui.umd.js +78 -78
package/vue-devui.es.js CHANGED
@@ -2168,9 +2168,18 @@ const formProps = {
2168
2168
  hideRequiredMark: {
2169
2169
  type: Boolean,
2170
2170
  default: false
2171
+ },
2172
+ styleType: {
2173
+ type: String,
2174
+ default: "default"
2175
+ },
2176
+ appendToBodyScrollStrategy: {
2177
+ type: String,
2178
+ default: "reposition"
2171
2179
  }
2172
2180
  };
2173
2181
  const FORM_TOKEN = Symbol("dForm");
2182
+ const STYLE_TOKEN = Symbol("dForm");
2174
2183
  function useFieldCollection() {
2175
2184
  const itemContexts = [];
2176
2185
  const addItemContext = (field) => {
@@ -7650,7 +7659,7 @@ var Form = defineComponent({
7650
7659
  props: formProps,
7651
7660
  emits: ["validate"],
7652
7661
  setup(props, ctx2) {
7653
- const ns2 = useNamespace$1("form");
7662
+ const ns2 = useNamespace("form");
7654
7663
  const {
7655
7664
  itemContexts,
7656
7665
  addItemContext,
@@ -7677,6 +7686,7 @@ var Form = defineComponent({
7677
7686
  addItemContext,
7678
7687
  removeItemContext
7679
7688
  })));
7689
+ provide(STYLE_TOKEN, props.styleType);
7680
7690
  ctx2.expose({
7681
7691
  validate,
7682
7692
  validateFields,
@@ -7718,7 +7728,7 @@ const formItemProps = {
7718
7728
  default: void 0
7719
7729
  },
7720
7730
  helpTips: {
7721
- type: String,
7731
+ type: [String, Object],
7722
7732
  default: ""
7723
7733
  },
7724
7734
  feedbackStatus: {
@@ -7731,12 +7741,6 @@ const formItemProps = {
7731
7741
  };
7732
7742
  const FORM_ITEM_TOKEN = Symbol("dFormItem");
7733
7743
  const LABEL_DATA = Symbol("labelData");
7734
- const formLabelProps = {
7735
- helpTips: {
7736
- type: String,
7737
- default: ""
7738
- }
7739
- };
7740
7744
  const fixedOverlayProps = {
7741
7745
  modelValue: {
7742
7746
  type: Boolean,
@@ -8456,7 +8460,13 @@ function useFormLabel() {
8456
8460
  const formContext = inject(FORM_TOKEN);
8457
8461
  const formItemContext = inject(FORM_ITEM_TOKEN);
8458
8462
  const labelData = inject(LABEL_DATA);
8459
- const ns2 = useNamespace$1("form");
8463
+ const ns2 = useNamespace("form");
8464
+ const defaultTipsPopover = {
8465
+ content: "",
8466
+ position: ["top"],
8467
+ trigger: "hover",
8468
+ popType: "info"
8469
+ };
8460
8470
  const labelClasses = computed(() => ({
8461
8471
  [`${ns2.e("label")}`]: true,
8462
8472
  [`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
@@ -8468,17 +8478,24 @@ function useFormLabel() {
8468
8478
  [`${ns2.em("label", "required")}`]: formItemContext.isRequired,
8469
8479
  [`${ns2.em("label", "required-hide")}`]: formItemContext.isRequired && formContext.hideRequiredMark
8470
8480
  }));
8471
- return { labelClasses, labelInnerClasses };
8481
+ const tipsPopover = computed(() => {
8482
+ if (typeof labelData.value.helpTips === "string") {
8483
+ return __spreadProps(__spreadValues({}, defaultTipsPopover), { content: labelData.value.helpTips });
8484
+ } else {
8485
+ return __spreadValues(__spreadValues({}, defaultTipsPopover), labelData.value.helpTips);
8486
+ }
8487
+ });
8488
+ return { labelClasses, labelInnerClasses, tipsPopover };
8472
8489
  }
8473
8490
  var formLabel = "";
8474
8491
  var FormLabel = defineComponent({
8475
8492
  name: "DFormLabel",
8476
- props: formLabelProps,
8477
- setup(props, ctx2) {
8478
- const ns2 = useNamespace$1("form");
8493
+ setup(_, ctx2) {
8494
+ const ns2 = useNamespace("form");
8479
8495
  const {
8480
8496
  labelClasses,
8481
- labelInnerClasses
8497
+ labelInnerClasses,
8498
+ tipsPopover
8482
8499
  } = useFormLabel();
8483
8500
  return () => {
8484
8501
  var _a, _b;
@@ -8486,12 +8503,9 @@ var FormLabel = defineComponent({
8486
8503
  "class": labelClasses.value
8487
8504
  }, [createVNode("span", {
8488
8505
  "class": labelInnerClasses.value
8489
- }, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]), props.helpTips && createVNode(Popover, {
8490
- "content": props.helpTips,
8491
- "position": ["top"],
8492
- "trigger": "hover",
8493
- "pop-type": "info"
8494
- }, {
8506
+ }, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]), tipsPopover.value.content && createVNode(Popover, mergeProps({
8507
+ "class": ns2.e("label-tips-popover")
8508
+ }, tipsPopover.value), {
8495
8509
  default: () => [createVNode(HelpTipsIcon, {
8496
8510
  "class": ns2.e("label-help")
8497
8511
  }, null), createTextVNode(",")]
@@ -8518,7 +8532,7 @@ var PopoverInstall = {
8518
8532
  };
8519
8533
  function useFormControl(props) {
8520
8534
  const labelData = inject(LABEL_DATA);
8521
- const ns2 = useNamespace$1("form");
8535
+ const ns2 = useNamespace("form");
8522
8536
  const { feedbackStatus } = toRefs(props);
8523
8537
  const controlClasses = computed(() => ({
8524
8538
  [ns2.e("control")]: true,
@@ -8530,7 +8544,7 @@ function useFormControl(props) {
8530
8544
  [ns2.em("control-container", "has-feedback")]: Boolean(feedbackStatus == null ? void 0 : feedbackStatus.value),
8531
8545
  [ns2.em("control-container", "feedback-error")]: Boolean((feedbackStatus == null ? void 0 : feedbackStatus.value) === "error")
8532
8546
  }));
8533
- return { controlClasses, controlContainerClasses };
8547
+ return { controlClasses, controlContainerClasses, labelData };
8534
8548
  }
8535
8549
  function useFormControlValidate() {
8536
8550
  const formItemContext = inject(FORM_ITEM_TOKEN);
@@ -8547,11 +8561,15 @@ var FormControl = defineComponent({
8547
8561
  name: "DFormControl",
8548
8562
  props: formControlProps,
8549
8563
  setup(props, ctx2) {
8564
+ const formContext = inject(FORM_TOKEN);
8550
8565
  const formControl2 = ref();
8551
- const ns2 = useNamespace$1("form");
8566
+ const popoverRef = ref();
8567
+ const ns2 = useNamespace("form");
8568
+ const showPopoverClick = ref(true);
8552
8569
  const {
8553
8570
  controlClasses,
8554
- controlContainerClasses
8571
+ controlContainerClasses,
8572
+ labelData
8555
8573
  } = useFormControl(props);
8556
8574
  const {
8557
8575
  feedbackStatus,
@@ -8561,17 +8579,52 @@ var FormControl = defineComponent({
8561
8579
  errorMessage,
8562
8580
  popPosition
8563
8581
  } = useFormControlValidate();
8582
+ const align = computed(() => {
8583
+ var _a, _b;
8584
+ if ((_a = popPosition.value) == null ? void 0 : _a.some((item) => item.includes("start"))) {
8585
+ return "start";
8586
+ }
8587
+ if ((_b = popPosition.value) == null ? void 0 : _b.some((item) => item.includes("end"))) {
8588
+ return "end";
8589
+ }
8590
+ return void 0;
8591
+ });
8592
+ const onDocumentClick = (e) => {
8593
+ const composedPath = e.composedPath();
8594
+ if (composedPath.includes(popoverRef.value.triggerEl)) {
8595
+ showPopoverClick.value = true;
8596
+ } else {
8597
+ showPopoverClick.value = false;
8598
+ }
8599
+ };
8600
+ watch(showPopover, (val) => {
8601
+ if (val) {
8602
+ setTimeout(() => {
8603
+ document.addEventListener("click", onDocumentClick);
8604
+ });
8605
+ } else {
8606
+ showPopoverClick.value = true;
8607
+ document.removeEventListener("click", onDocumentClick);
8608
+ }
8609
+ });
8610
+ onUnmounted(() => {
8611
+ document.removeEventListener("click", onDocumentClick);
8612
+ });
8564
8613
  return () => createVNode("div", {
8565
8614
  "class": controlClasses.value,
8566
8615
  "ref": formControl2
8567
8616
  }, [createVNode("div", {
8568
8617
  "class": controlContainerClasses.value
8569
8618
  }, [createVNode(Popover, {
8570
- "is-open": showPopover.value,
8619
+ "ref": popoverRef,
8620
+ "is-open": showPopover.value && showPopoverClick.value,
8571
8621
  "trigger": "manually",
8572
8622
  "content": errorMessage.value,
8573
8623
  "pop-type": "error",
8574
- "position": popPosition.value
8624
+ "position": popPosition.value,
8625
+ "align": align.value,
8626
+ "scroll-element": "auto",
8627
+ "append-to-body-scroll-strategy": formContext.appendToBodyScrollStrategy
8575
8628
  }, {
8576
8629
  default: () => {
8577
8630
  var _a, _b;
@@ -8583,7 +8636,7 @@ var FormControl = defineComponent({
8583
8636
  "class": ns2.e("control-info")
8584
8637
  }, [showMessage.value && createVNode("div", {
8585
8638
  "class": "error-message"
8586
- }, [errorMessage.value]), props.extraInfo && createVNode("div", {
8639
+ }, [errorMessage.value]), labelData.value.formItemCtx.slots.extraInfo ? labelData.value.formItemCtx.slots.extraInfo() : props.extraInfo && createVNode("div", {
8587
8640
  "class": ns2.e("control-extra")
8588
8641
  }, [props.extraInfo])])]);
8589
8642
  }
@@ -9602,7 +9655,7 @@ function getFieldValue(obj, path) {
9602
9655
  }
9603
9656
  function useFormItem(messageType, _rules, validateState) {
9604
9657
  const formContext = inject(FORM_TOKEN);
9605
- const ns2 = useNamespace$1("form");
9658
+ const ns2 = useNamespace("form");
9606
9659
  const itemClasses = computed(() => ({
9607
9660
  [`${ns2.em("item", "horizontal")}`]: formContext.layout === "horizontal",
9608
9661
  [`${ns2.em("item", "vertical")}`]: formContext.layout === "vertical",
@@ -9766,7 +9819,9 @@ var FormItem = defineComponent({
9766
9819
  const labelData = computed(() => ({
9767
9820
  layout: formContext.layout,
9768
9821
  labelSize: formContext.labelSize,
9769
- labelAlign: formContext.labelAlign
9822
+ labelAlign: formContext.labelAlign,
9823
+ helpTips: helpTips.value,
9824
+ formItemCtx: ctx2
9770
9825
  }));
9771
9826
  provide(LABEL_DATA, labelData);
9772
9827
  const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
@@ -9782,6 +9837,7 @@ var FormItem = defineComponent({
9782
9837
  }));
9783
9838
  provide(FORM_ITEM_TOKEN, context);
9784
9839
  ctx2.expose({
9840
+ validate,
9785
9841
  resetField,
9786
9842
  clearValidate
9787
9843
  });
@@ -9795,9 +9851,7 @@ var FormItem = defineComponent({
9795
9851
  });
9796
9852
  return () => createVNode("div", {
9797
9853
  "class": itemClasses.value
9798
- }, [createVNode(FormLabel, {
9799
- "help-tips": helpTips.value
9800
- }, {
9854
+ }, [createVNode(FormLabel, null, {
9801
9855
  default: () => [ctx2.slots.label ? ctx2.slots.label() : label == null ? void 0 : label.value]
9802
9856
  }), createVNode(FormControl, {
9803
9857
  "feedback-status": feedbackStatus == null ? void 0 : feedbackStatus.value,
@@ -10617,6 +10671,20 @@ var AutoCompleteInstall = {
10617
10671
  app.component(AutoComplete.name, AutoComplete);
10618
10672
  }
10619
10673
  };
10674
+ var AutoFocus = {
10675
+ mounted: (el, binding) => {
10676
+ if (binding.value) {
10677
+ el.focus();
10678
+ }
10679
+ }
10680
+ };
10681
+ var AutoFocusInstall = {
10682
+ title: "AutoFocus \u81EA\u52A8\u805A\u7126",
10683
+ category: "\u516C\u5171",
10684
+ install(app) {
10685
+ app.directive("dAutoFocus", AutoFocus);
10686
+ }
10687
+ };
10620
10688
  const IconBody = (props) => {
10621
10689
  const {
10622
10690
  width,
@@ -13392,19 +13460,28 @@ const inputProps = {
13392
13460
  placeholder: {
13393
13461
  type: String,
13394
13462
  default: ""
13463
+ },
13464
+ title: {
13465
+ type: String,
13466
+ default: ""
13467
+ },
13468
+ autofocus: {
13469
+ type: Boolean,
13470
+ default: false
13395
13471
  }
13396
13472
  };
13397
13473
  function useInputRender$1(props, ctx2) {
13398
13474
  const formContext = inject(FORM_TOKEN, void 0);
13399
13475
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
13400
13476
  const isValidateError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
13401
- const ns2 = useNamespace$1("input");
13402
- const slotNs = useNamespace$1("input-slot");
13477
+ const ns2 = useNamespace("input");
13478
+ const slotNs = useNamespace("input-slot");
13403
13479
  const isFocus = ref(false);
13404
13480
  const { error: error2, size, disabled } = toRefs(props);
13405
13481
  const slots = ctx2.slots;
13406
13482
  const inputDisabled = computed(() => disabled.value || (formContext == null ? void 0 : formContext.disabled));
13407
13483
  const inputSize = computed(() => (size == null ? void 0 : size.value) || (formContext == null ? void 0 : formContext.size) || "");
13484
+ const styleType = inject(STYLE_TOKEN, void 0);
13408
13485
  const _a = ctx2.attrs, { style, class: customClass } = _a, otherAttrs = __objRest(_a, ["style", "class"]);
13409
13486
  const customStyle = { style };
13410
13487
  const wrapClasses = computed(() => ({
@@ -13420,7 +13497,8 @@ function useInputRender$1(props, ctx2) {
13420
13497
  [ns2.m(inputSize.value)]: Boolean(inputSize.value),
13421
13498
  [slotNs.b()]: slots.prepend || slots.append,
13422
13499
  [ns2.m("append")]: slots.append,
13423
- [ns2.m("prepend")]: slots.prepend
13500
+ [ns2.m("prepend")]: slots.prepend,
13501
+ [ns2.m("gray-style")]: styleType === "gray"
13424
13502
  },
13425
13503
  customClass
13426
13504
  ]);
@@ -13428,6 +13506,7 @@ function useInputRender$1(props, ctx2) {
13428
13506
  }
13429
13507
  function useInputEvent$1(isFocus, props, ctx2, focus) {
13430
13508
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
13509
+ const isComposition = ref(false);
13431
13510
  const onFocus = (e) => {
13432
13511
  isFocus.value = true;
13433
13512
  ctx2.emit("focus", e);
@@ -13441,6 +13520,9 @@ function useInputEvent$1(isFocus, props, ctx2, focus) {
13441
13520
  };
13442
13521
  const onInput = (e) => {
13443
13522
  ctx2.emit("input", e.target.value);
13523
+ if (isComposition.value) {
13524
+ return;
13525
+ }
13444
13526
  ctx2.emit("update:modelValue", e.target.value);
13445
13527
  };
13446
13528
  const onChange = (e) => {
@@ -13454,7 +13536,22 @@ function useInputEvent$1(isFocus, props, ctx2, focus) {
13454
13536
  ctx2.emit("clear");
13455
13537
  focus();
13456
13538
  };
13457
- return { onFocus, onBlur, onInput, onChange, onKeydown, onClear };
13539
+ const onCompositionStart = () => {
13540
+ isComposition.value = true;
13541
+ };
13542
+ const onCompositionUpdate = (e) => {
13543
+ var _a;
13544
+ const text = (_a = e.target) == null ? void 0 : _a.value;
13545
+ const lastCharacter = text[text.length - 1] || "";
13546
+ isComposition.value = !/([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(lastCharacter);
13547
+ };
13548
+ const onCompositionEnd = (e) => {
13549
+ if (isComposition.value) {
13550
+ isComposition.value = false;
13551
+ onInput(e);
13552
+ }
13553
+ };
13554
+ return { onFocus, onBlur, onInput, onChange, onKeydown, onClear, onCompositionStart, onCompositionUpdate, onCompositionEnd };
13458
13555
  }
13459
13556
  function useInputFunction(input2) {
13460
13557
  const refInput = computed(() => input2.value);
@@ -13475,6 +13572,9 @@ function useInputFunction(input2) {
13475
13572
  var input = "";
13476
13573
  var DInput = defineComponent({
13477
13574
  name: "DInput",
13575
+ directives: {
13576
+ dAutoFocus: AutoFocus
13577
+ },
13478
13578
  inheritAttrs: false,
13479
13579
  props: inputProps,
13480
13580
  emits: ["update:modelValue", "focus", "blur", "input", "change", "keydown", "clear"],
@@ -13483,10 +13583,13 @@ var DInput = defineComponent({
13483
13583
  const t = createI18nTranslate("DInput", app);
13484
13584
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
13485
13585
  const {
13486
- modelValue
13586
+ modelValue,
13587
+ placeholder,
13588
+ title,
13589
+ autofocus
13487
13590
  } = toRefs(props);
13488
- const ns2 = useNamespace$1("input");
13489
- const slotNs = useNamespace$1("input-slot");
13591
+ const ns2 = useNamespace("input");
13592
+ const slotNs = useNamespace("input-slot");
13490
13593
  const {
13491
13594
  inputDisabled,
13492
13595
  inputSize,
@@ -13508,7 +13611,10 @@ var DInput = defineComponent({
13508
13611
  onInput,
13509
13612
  onChange,
13510
13613
  onKeydown,
13511
- onClear
13614
+ onClear,
13615
+ onCompositionStart,
13616
+ onCompositionUpdate,
13617
+ onCompositionEnd
13512
13618
  } = useInputEvent$1(isFocus, props, ctx2, focus);
13513
13619
  const passwordVisible = ref(false);
13514
13620
  const clickPasswordIcon = () => {
@@ -13533,7 +13639,7 @@ var DInput = defineComponent({
13533
13639
  blur: blur2
13534
13640
  });
13535
13641
  return () => {
13536
- var _a, _b, _c, _d, _e, _f, _g, _h;
13642
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
13537
13643
  return createVNode("div", mergeProps({
13538
13644
  "class": inputClasses.value
13539
13645
  }, customStyle), [ctx2.slots.prepend && createVNode("div", {
@@ -13545,25 +13651,29 @@ var DInput = defineComponent({
13545
13651
  }, [ctx2.slots.prefix && ((_d = (_c = ctx2.slots).prefix) == null ? void 0 : _d.call(_c)), props.prefix && createVNode(DIcon, {
13546
13652
  "size": inputSize.value,
13547
13653
  "name": props.prefix
13548
- }, null)]), createVNode("input", mergeProps({
13654
+ }, null)]), withDirectives(createVNode("input", mergeProps({
13549
13655
  "ref": input2,
13550
13656
  "value": modelValue.value,
13551
13657
  "disabled": inputDisabled.value,
13552
13658
  "class": ns2.e("inner"),
13553
- "placeholder": props.placeholder || t("placeholder")
13659
+ "placeholder": (_e = placeholder.value) != null ? _e : t("placeholder")
13554
13660
  }, otherAttrs, {
13661
+ "title": title.value,
13555
13662
  "type": props.showPassword ? passwordVisible.value ? "text" : "password" : "text",
13556
13663
  "onInput": onInput,
13557
13664
  "onFocus": onFocus,
13558
13665
  "onBlur": onBlur,
13559
13666
  "onChange": onChange,
13560
- "onKeydown": onKeydown
13561
- }), null), suffixVisible && createVNode("span", {
13667
+ "onKeydown": onKeydown,
13668
+ "onCompositionstart": onCompositionStart,
13669
+ "onCompositionupdate": onCompositionUpdate,
13670
+ "onCompositionend": onCompositionEnd
13671
+ }), null), [[resolveDirective("dAutoFocus"), autofocus.value]]), suffixVisible && createVNode("span", {
13562
13672
  "class": slotNs.e("suffix")
13563
13673
  }, [props.suffix && createVNode(DIcon, {
13564
13674
  "size": inputSize.value,
13565
13675
  "name": props.suffix
13566
- }, null), ctx2.slots.suffix && ((_f = (_e = ctx2.slots).suffix) == null ? void 0 : _f.call(_e)), showPwdVisible.value && createVNode(DIcon, {
13676
+ }, null), ctx2.slots.suffix && ((_g = (_f = ctx2.slots).suffix) == null ? void 0 : _g.call(_f)), showPwdVisible.value && createVNode(DIcon, {
13567
13677
  "size": inputSize.value,
13568
13678
  "class": ns2.em("password", "icon"),
13569
13679
  "name": passwordVisible.value ? "preview" : "preview-forbidden",
@@ -13571,11 +13681,12 @@ var DInput = defineComponent({
13571
13681
  }, null), showClearable.value && createVNode(DIcon, {
13572
13682
  "size": inputSize.value,
13573
13683
  "class": ns2.em("clear", "icon"),
13574
- "name": "close",
13684
+ "name": "error-o",
13685
+ "color": "#adb0b8",
13575
13686
  "onClick": onClear
13576
13687
  }, null)])]), ctx2.slots.append && createVNode("div", {
13577
13688
  "class": slotNs.e("append")
13578
- }, [(_h = (_g = ctx2.slots).append) == null ? void 0 : _h.call(_g)])]);
13689
+ }, [(_i = (_h = ctx2.slots).append) == null ? void 0 : _i.call(_h)])]);
13579
13690
  };
13580
13691
  }
13581
13692
  });
@@ -13899,8 +14010,11 @@ function useCodeEditor(props, ctx2) {
13899
14010
  model = diffEditor.getModel().modified;
13900
14011
  }
13901
14012
  model == null ? void 0 : model.onDidChangeContent(lodash.exports.throttle(() => {
13902
- modifyValueFromInner = true;
13903
- ctx2.emit("update:modelValue", model.getValue());
14013
+ const editorValue = model.getValue();
14014
+ if (modelValue.value !== editorValue) {
14015
+ modifyValueFromInner = true;
14016
+ ctx2.emit("update:modelValue", model.getValue());
14017
+ }
13904
14018
  }, 100));
13905
14019
  }
13906
14020
  function setDiffEditorOriginValue() {
@@ -14294,6 +14408,10 @@ const codeReviewProps = {
14294
14408
  type: Boolean,
14295
14409
  default: false
14296
14410
  },
14411
+ diffType: {
14412
+ type: String,
14413
+ default: "modify"
14414
+ },
14297
14415
  outputFormat: {
14298
14416
  type: String,
14299
14417
  default: "line-by-line"
@@ -14322,6 +14440,7 @@ var CodeReviewHeader = defineComponent({
14322
14440
  setup(_, ctx2) {
14323
14441
  const ns2 = useNamespace$1("code-review");
14324
14442
  const {
14443
+ diffType,
14325
14444
  diffInfo,
14326
14445
  isFold,
14327
14446
  rootCtx
@@ -14346,7 +14465,9 @@ var CodeReviewHeader = defineComponent({
14346
14465
  [ns2.em("header", "unfold")]: !isFold.value
14347
14466
  }],
14348
14467
  "onClick": onClick
14349
- }, [createVNode("div", {
14468
+ }, [createVNode("span", {
14469
+ "class": ["diff-type", diffType.value]
14470
+ }, [diffType.value[0].toUpperCase()]), createVNode("div", {
14350
14471
  "class": "file-info"
14351
14472
  }, [createVNode(FoldIcon, {
14352
14473
  "class": {
@@ -15151,6 +15272,9 @@ var CodeReview = defineComponent({
15151
15272
  emits: ["foldChange", "addComment", "afterViewInit", "contentRefresh"],
15152
15273
  setup(props, ctx2) {
15153
15274
  const ns2 = useNamespace$1("code-review");
15275
+ const {
15276
+ diffType
15277
+ } = toRefs(props);
15154
15278
  const {
15155
15279
  renderHtml,
15156
15280
  reviewContentRef,
@@ -15178,6 +15302,7 @@ var CodeReview = defineComponent({
15178
15302
  });
15179
15303
  });
15180
15304
  provide(CodeReviewInjectionKey, {
15305
+ diffType,
15181
15306
  reviewContentRef,
15182
15307
  diffInfo: diffFile.value[0],
15183
15308
  isFold,
@@ -25171,7 +25296,7 @@ function locale(key) {
25171
25296
  underline: "\u4E0B\u5212\u7EBF",
25172
25297
  strike: "\u5220\u9664\u7EBF",
25173
25298
  color: "\u5B57\u4F53\u989C\u8272",
25174
- backgound: "\u80CC\u666F\u8272",
25299
+ background: "\u80CC\u666F\u8272",
25175
25300
  orderedlist: "\u6709\u5E8F\u5217\u8868",
25176
25301
  unorderedlist: "\u65E0\u5E8F\u5217\u8868",
25177
25302
  checklist: "\u4EFB\u52A1\u5217\u8868",
@@ -28055,7 +28180,7 @@ var imagePreview = defineComponent({
28055
28180
  props: imagePreviewProps,
28056
28181
  emits: [],
28057
28182
  setup(props) {
28058
- const ns2 = useNamespace$1("image-preview");
28183
+ const ns2 = useNamespace("image-preview");
28059
28184
  let transform = null;
28060
28185
  const index2 = ref(0);
28061
28186
  const url2 = computed(() => props.previewUrlList[index2.value]);
@@ -28350,16 +28475,11 @@ function unmountedPreviewImages() {
28350
28475
  ImagePreviewService.close();
28351
28476
  }
28352
28477
  function getImgByEl(el) {
28353
- const imgs = [...el.querySelectorAll("img")];
28354
- const urlList = imgs.map((item) => {
28355
- var _a;
28356
- return (_a = item.getAttribute("preview-src") || item.getAttribute("src")) != null ? _a : "";
28357
- });
28478
+ const urlList = [...el.querySelectorAll("img")].map((ele) => ele.getAttribute("src"));
28358
28479
  return urlList;
28359
28480
  }
28360
28481
  function handleImg(e) {
28361
28482
  var _a;
28362
- e.stopPropagation();
28363
28483
  const el = e.currentTarget;
28364
28484
  const target = e.target;
28365
28485
  if (((_a = target == null ? void 0 : target.nodeName) == null ? void 0 : _a.toLowerCase()) === "img") {
@@ -28892,7 +29012,7 @@ var List = defineComponent({
28892
29012
  setup(props, {
28893
29013
  slots
28894
29014
  }) {
28895
- const ns2 = useNamespace$1("list");
29015
+ const ns2 = useNamespace("list");
28896
29016
  return () => {
28897
29017
  var _a;
28898
29018
  return createVNode("div", {
@@ -28907,7 +29027,7 @@ var ListItem = defineComponent({
28907
29027
  setup(props, {
28908
29028
  slots
28909
29029
  }) {
28910
- const ns2 = useNamespace$1("list-item");
29030
+ const ns2 = useNamespace("list-item");
28911
29031
  return () => {
28912
29032
  var _a;
28913
29033
  return createVNode("div", {
@@ -28919,7 +29039,6 @@ var ListItem = defineComponent({
28919
29039
  var ListInstall = {
28920
29040
  title: "List \u5217\u8868",
28921
29041
  category: "\u6570\u636E\u5C55\u793A",
28922
- status: "10%",
28923
29042
  install(app) {
28924
29043
  app.component(List.name, List);
28925
29044
  app.component(ListItem.name, ListItem);
@@ -32351,6 +32470,7 @@ var Select = defineComponent({
32351
32470
  toggleChange,
32352
32471
  isShowCreateOption
32353
32472
  } = useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t);
32473
+ const dropdownContainer = ref();
32354
32474
  const scrollbarNs = useNamespace$1("scrollbar");
32355
32475
  const ns2 = useNamespace$1("select");
32356
32476
  const dropdownCls = ns2.e("dropdown");
@@ -32377,10 +32497,20 @@ var Select = defineComponent({
32377
32497
  updateDropdownWidth();
32378
32498
  }
32379
32499
  });
32500
+ const scrollToBottom = () => {
32501
+ const compareHeight = dropdownContainer.value.scrollHeight - dropdownContainer.value.clientHeight;
32502
+ const scrollTop = dropdownContainer.value.scrollTop;
32503
+ if (scrollTop === compareHeight) {
32504
+ ctx2.emit("load-more");
32505
+ }
32506
+ };
32380
32507
  onMounted(() => {
32381
32508
  isRender.value = true;
32382
32509
  updateDropdownWidth();
32383
32510
  window.addEventListener("resize", updateDropdownWidth);
32511
+ nextTick(() => {
32512
+ dropdownContainer.value.addEventListener("scroll", scrollToBottom);
32513
+ });
32384
32514
  });
32385
32515
  onUnmounted(() => {
32386
32516
  window.removeEventListener("resize", updateDropdownWidth);
@@ -32435,7 +32565,8 @@ var Select = defineComponent({
32435
32565
  visibility: isOpen.value ? "visible" : "hidden"
32436
32566
  }
32437
32567
  }, [withDirectives(createVNode("ul", {
32438
- "class": listCls
32568
+ "class": listCls,
32569
+ "ref": dropdownContainer
32439
32570
  }, [isShowCreateOption.value && createVNode(Option, {
32440
32571
  "value": filterQuery.value,
32441
32572
  "name": filterQuery.value,
@@ -33468,7 +33599,7 @@ var Progress = defineComponent({
33468
33599
  data,
33469
33600
  $slots
33470
33601
  } = this;
33471
- const ns2 = useNamespace$1("progress");
33602
+ const ns2 = useNamespace("progress");
33472
33603
  const isOutside = percentageTextPlacement === "outside";
33473
33604
  const isInsideBg = percentageTextPlacement === "insideBg";
33474
33605
  const createPercentageText = () => {
@@ -35097,7 +35228,7 @@ const skeletonProps = {
35097
35228
  const roundInjectionKey = Symbol("round");
35098
35229
  const animationInjectionKey = Symbol("showAnimation");
35099
35230
  function useSkeletonItem(props) {
35100
- const ns2 = useNamespace$1("skeleton-item");
35231
+ const ns2 = useNamespace("skeleton-item");
35101
35232
  const { variant, size } = toRefs(props);
35102
35233
  const round = inject(roundInjectionKey, void 0);
35103
35234
  const showAnimation = inject(animationInjectionKey, void 0);
@@ -35171,7 +35302,7 @@ var Skeleton = defineComponent({
35171
35302
  name: "DSkeleton",
35172
35303
  props: skeletonProps,
35173
35304
  setup(props, ctx2) {
35174
- const ns2 = useNamespace$1("skeleton");
35305
+ const ns2 = useNamespace("skeleton");
35175
35306
  const {
35176
35307
  loading: loading2,
35177
35308
  rows,
@@ -36358,7 +36489,7 @@ var Steps = defineComponent({
36358
36489
  direction,
36359
36490
  simple
36360
36491
  } = toRefs(props);
36361
- const ns2 = useNamespace$1("steps");
36492
+ const ns2 = useNamespace("steps");
36362
36493
  const activeStep = ref(modelValue.value);
36363
36494
  provide(ACTIVE_STEP, activeStep);
36364
36495
  provide(STEPS_PROPS, props);
@@ -36408,7 +36539,7 @@ var Step = defineComponent({
36408
36539
  icon: icon2,
36409
36540
  status: status2
36410
36541
  } = toRefs(props);
36411
- const ns2 = useNamespace$1("step");
36542
+ const ns2 = useNamespace("step");
36412
36543
  const instance = getCurrentInstance();
36413
36544
  const activeStep = inject(ACTIVE_STEP);
36414
36545
  const steps2 = inject(STEPS);
@@ -43681,6 +43812,7 @@ const installs = [
43681
43812
  AlertInstall,
43682
43813
  AnchorInstall,
43683
43814
  AutoCompleteInstall,
43815
+ AutoFocusInstall,
43684
43816
  AvatarInstall,
43685
43817
  BackTopInstall,
43686
43818
  BadgeInstall,
@@ -43762,9 +43894,9 @@ const installs = [
43762
43894
  VirtualListInstall
43763
43895
  ];
43764
43896
  var vueDevui = {
43765
- version: "1.5.12",
43897
+ version: "1.5.13-hotfix.1",
43766
43898
  install(app) {
43767
43899
  installs.forEach((p) => app.use(p));
43768
43900
  }
43769
43901
  };
43770
- export { Accordion, ActionTimeline, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, BreadcrumbItem, DButton as Button, ButtonGroup, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxButton, DCheckboxGroup as CheckboxGroup, CodeEditor, CodeReview, Col, Collapse, CollapseItem, ColorPicker, Column, Comment, Content, Countdown, DChart, DRangeDatePickerPro, DatePicker, DatePickerPro, draggableDirective as DraggableDirective, Drawer, DrawerService, Dropdown$1 as Dropdown, DropdownMenu, droppableDirective as DroppableDirective, EditableSelect, EditorMd, FixedOverlay, FlexibleOverlay, Footer, Form, FormItem, FormOperation, Fullscreen, Gantt, GitGraph, Header, DIcon as Icon, IconGroup, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, List, ListItem, LoadingDirective, loading as LoadingService, MdRender, Mention, Menu, MenuItem, Message, Modal, ModalBody, ModalFooter, ModalHeader, MultiAutoComplete, NavSprite, Notification, NotificationService, Option, OptionGroup, Pagination, Panel, PanelBody, PanelFooter, PanelHeader, Popover, Progress, QuadrantDiagram, Radio, RadioButton, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, SplitterPane, Statistic, Status, Step, Steps, StepsGuide, StepsGuideDirective, StickSlider, Sticky, SubMenu, Switch, Tab, Table, Tabs, Tag, TagInput, Textarea, TimePicker, TimeSelect, Timeline, TimelineItem, Tooltip, Transfer, Tree, TreeSelect, Upload, VirtualList, vueDevui as default, fileDropDirective };
43902
+ export { Accordion, ActionTimeline, Alert, Anchor, Aside, AutoComplete, AutoFocus, Avatar, BackTop, Badge, Breadcrumb, BreadcrumbItem, DButton as Button, ButtonGroup, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxButton, DCheckboxGroup as CheckboxGroup, CodeEditor, CodeReview, Col, Collapse, CollapseItem, ColorPicker, Column, Comment, Content, Countdown, DChart, DRangeDatePickerPro, DatePicker, DatePickerPro, draggableDirective as DraggableDirective, Drawer, DrawerService, Dropdown$1 as Dropdown, DropdownMenu, droppableDirective as DroppableDirective, EditableSelect, EditorMd, FixedOverlay, FlexibleOverlay, Footer, Form, FormItem, FormOperation, Fullscreen, Gantt, GitGraph, Header, DIcon as Icon, IconGroup, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, List, ListItem, LoadingDirective, loading as LoadingService, MdRender, Mention, Menu, MenuItem, Message, Modal, ModalBody, ModalFooter, ModalHeader, MultiAutoComplete, NavSprite, Notification, NotificationService, Option, OptionGroup, Pagination, Panel, PanelBody, PanelFooter, PanelHeader, Popover, Progress, QuadrantDiagram, Radio, RadioButton, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, SplitterPane, Statistic, Status, Step, Steps, StepsGuide, StepsGuideDirective, StickSlider, Sticky, SubMenu, Switch, Tab, Table, Tabs, Tag, TagInput, Textarea, TimePicker, TimeSelect, Timeline, TimelineItem, Tooltip, Transfer, Tree, TreeSelect, Upload, VirtualList, vueDevui as default, fileDropDirective };