vue-devui 1.0.0-rc.11 → 1.0.0-rc.14

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 (115) hide show
  1. package/README.md +160 -149
  2. package/auto-complete/index.es.js +182 -10
  3. package/auto-complete/index.umd.js +18 -18
  4. package/auto-complete/style.css +1 -1
  5. package/badge/index.es.js +3 -1
  6. package/badge/index.umd.js +1 -1
  7. package/button/index.es.js +5 -3
  8. package/button/index.umd.js +6 -6
  9. package/button/style.css +1 -1
  10. package/checkbox/index.es.js +1 -1
  11. package/checkbox/index.umd.js +4 -4
  12. package/checkbox/style.css +1 -1
  13. package/collapse/index.es.js +20 -186
  14. package/collapse/index.umd.js +1 -1
  15. package/collapse/style.css +1 -1
  16. package/countdown/index.es.js +56 -13
  17. package/countdown/index.umd.js +1 -1
  18. package/{date-picker → date-picker-pro}/index.d.ts +0 -0
  19. package/date-picker-pro/index.es.js +12016 -0
  20. package/date-picker-pro/index.umd.js +27 -0
  21. package/date-picker-pro/package.json +7 -0
  22. package/date-picker-pro/style.css +1 -0
  23. package/dropdown/index.es.js +9 -2
  24. package/dropdown/index.umd.js +1 -1
  25. package/editable-select/index.es.js +248 -56
  26. package/editable-select/index.umd.js +1 -1
  27. package/editable-select/style.css +1 -1
  28. package/form/index.es.js +1 -1
  29. package/form/index.umd.js +4 -4
  30. package/icon/index.es.js +5 -3
  31. package/icon/index.umd.js +1 -1
  32. package/icon/style.css +1 -1
  33. package/image-preview/style.css +1 -1
  34. package/input/index.es.js +193 -15
  35. package/input/index.umd.js +14 -14
  36. package/input/style.css +1 -1
  37. package/input-number/index.es.js +1 -4
  38. package/input-number/index.umd.js +1 -1
  39. package/layout/index.es.js +1 -1
  40. package/layout/index.umd.js +1 -1
  41. package/modal/index.es.js +5 -3
  42. package/modal/index.umd.js +1 -1
  43. package/modal/style.css +1 -1
  44. package/notification/index.es.js +32 -34
  45. package/notification/index.umd.js +1 -1
  46. package/notification/style.css +1 -1
  47. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  48. package/nuxt/components/DatePickerPro.js +3 -0
  49. package/nuxt/components/OptionGroup.js +3 -0
  50. package/nuxt/components/Step.js +3 -0
  51. package/nuxt/components/Steps.js +3 -0
  52. package/nuxt/components/TimePicker.js +3 -0
  53. package/nuxt/components/datePickerProCommonProps.js +3 -0
  54. package/nuxt/components/datePickerProPanelProps.js +3 -0
  55. package/nuxt/components/datePickerProProps.js +3 -0
  56. package/nuxt/components/stepProps.js +3 -0
  57. package/nuxt/components/stepsProps.js +3 -0
  58. package/nuxt/components/timerPickerPanelProps.js +3 -0
  59. package/package.json +1 -1
  60. package/pagination/index.es.js +175 -7
  61. package/pagination/index.umd.js +1 -1
  62. package/radio/index.es.js +1 -1
  63. package/radio/index.umd.js +4 -4
  64. package/result/index.es.js +5 -3
  65. package/result/index.umd.js +1 -1
  66. package/result/style.css +1 -1
  67. package/search/index.es.js +198 -18
  68. package/search/index.umd.js +13 -13
  69. package/search/style.css +1 -1
  70. package/select/index.es.js +382 -258
  71. package/select/index.umd.js +15 -15
  72. package/select/style.css +1 -1
  73. package/splitter/index.es.js +182 -12
  74. package/splitter/index.umd.js +13 -13
  75. package/steps/index.d.ts +7 -0
  76. package/steps/index.es.js +386 -0
  77. package/steps/index.umd.js +1 -0
  78. package/{date-picker → steps}/package.json +1 -1
  79. package/steps/style.css +1 -0
  80. package/style.css +1 -1
  81. package/switch/index.es.js +1 -1
  82. package/switch/index.umd.js +4 -4
  83. package/table/index.es.js +851 -294
  84. package/table/index.umd.js +16 -16
  85. package/table/style.css +1 -1
  86. package/tabs/index.es.js +22 -12
  87. package/tabs/index.umd.js +1 -1
  88. package/tabs/style.css +1 -1
  89. package/textarea/index.es.js +3 -2
  90. package/textarea/index.umd.js +6 -6
  91. package/time-picker/index.d.ts +7 -0
  92. package/{date-picker → time-picker}/index.es.js +1537 -1040
  93. package/time-picker/index.umd.js +27 -0
  94. package/time-picker/package.json +7 -0
  95. package/time-picker/style.css +1 -0
  96. package/time-select/index.es.js +383 -258
  97. package/time-select/index.umd.js +16 -16
  98. package/time-select/style.css +1 -1
  99. package/timeline/index.es.js +5 -3
  100. package/timeline/index.umd.js +1 -1
  101. package/timeline/style.css +1 -1
  102. package/tooltip/index.es.js +1 -1
  103. package/tooltip/index.umd.js +1 -1
  104. package/tree/index.es.js +551 -88
  105. package/tree/index.umd.js +15 -15
  106. package/tree/style.css +1 -1
  107. package/upload/index.es.js +230 -57
  108. package/upload/index.umd.js +1 -1
  109. package/upload/style.css +1 -1
  110. package/vue-devui.es.js +14310 -11217
  111. package/vue-devui.umd.js +23 -23
  112. package/date-picker/index.umd.js +0 -27
  113. package/date-picker/style.css +0 -1
  114. package/nuxt/components/DatePicker.js +0 -3
  115. package/nuxt/components/StickSlider.js +0 -3
@@ -33,7 +33,7 @@ var __publicField = (obj, key, value) => {
33
33
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
34
  return value;
35
35
  };
36
- import { ref, nextTick, defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, unref, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, render, resolveDirective, vShow, resolveDynamicComponent, isVNode } from "vue";
36
+ import { ref, nextTick, defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, unref, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, render, getCurrentInstance, resolveDirective, vShow, resolveDynamicComponent, isVNode } from "vue";
37
37
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
38
38
  const defaultFormatter = (item) => {
39
39
  if (typeof item === "string") {
@@ -1582,7 +1582,7 @@ var lodash = { exports: {} };
1582
1582
  function baseAt(object4, paths) {
1583
1583
  var index2 = -1, length = paths.length, result2 = Array2(length), skip = object4 == null;
1584
1584
  while (++index2 < length) {
1585
- result2[index2] = skip ? undefined$1 : get(object4, paths[index2]);
1585
+ result2[index2] = skip ? undefined$1 : get2(object4, paths[index2]);
1586
1586
  }
1587
1587
  return result2;
1588
1588
  }
@@ -2027,7 +2027,7 @@ var lodash = { exports: {} };
2027
2027
  return matchesStrictComparable(toKey(path), srcValue);
2028
2028
  }
2029
2029
  return function(object4) {
2030
- var objValue = get(object4, path);
2030
+ var objValue = get2(object4, path);
2031
2031
  return objValue === undefined$1 && objValue === srcValue ? hasIn(object4, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
2032
2032
  };
2033
2033
  }
@@ -4760,7 +4760,7 @@ var lodash = { exports: {} };
4760
4760
  function functionsIn(object4) {
4761
4761
  return object4 == null ? [] : baseFunctions(object4, keysIn(object4));
4762
4762
  }
4763
- function get(object4, path, defaultValue) {
4763
+ function get2(object4, path, defaultValue) {
4764
4764
  var result2 = object4 == null ? undefined$1 : baseGet(object4, path);
4765
4765
  return result2 === undefined$1 ? defaultValue : result2;
4766
4766
  }
@@ -5615,7 +5615,7 @@ var lodash = { exports: {} };
5615
5615
  lodash2.forInRight = forInRight;
5616
5616
  lodash2.forOwn = forOwn;
5617
5617
  lodash2.forOwnRight = forOwnRight;
5618
- lodash2.get = get;
5618
+ lodash2.get = get2;
5619
5619
  lodash2.gt = gt;
5620
5620
  lodash2.gte = gte;
5621
5621
  lodash2.has = has;
@@ -7941,7 +7941,7 @@ function useFormItemValidate(props, _rules) {
7941
7941
  return rule.trigger === triggerVal;
7942
7942
  }
7943
7943
  }).map((_a) => {
7944
- var _b = _a, { trigger } = _b, rule = __objRest(_b, ["trigger"]);
7944
+ var rule = __objRest(_a, []);
7945
7945
  return rule;
7946
7946
  });
7947
7947
  };
@@ -8368,12 +8368,182 @@ const loadingDirective = {
8368
8368
  toggleLoading(el, binding);
8369
8369
  }
8370
8370
  };
8371
+ function deepAssign(...objects) {
8372
+ const isObject2 = (obj) => obj && typeof obj === "object";
8373
+ return objects.reduce((prev, from) => {
8374
+ Object.keys(from).forEach((key) => {
8375
+ const pVal = prev[key];
8376
+ const oVal = from[key];
8377
+ if (Array.isArray(pVal) && Array.isArray(oVal)) {
8378
+ prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
8379
+ } else if (isObject2(pVal) && isObject2(oVal)) {
8380
+ prev[key] = deepAssign(pVal, oVal);
8381
+ } else {
8382
+ prev[key] = oVal;
8383
+ }
8384
+ });
8385
+ return prev;
8386
+ }, {});
8387
+ }
8388
+ var zhCN = {
8389
+ pagination: {
8390
+ totalItemText: "\u6240\u6709\u6761\u76EE",
8391
+ goToText: "\u8DF3\u81F3"
8392
+ },
8393
+ accordion: {
8394
+ loading: "\u52A0\u8F7D\u4E2D",
8395
+ noData: "\u6CA1\u6709\u6570\u636E"
8396
+ },
8397
+ autoCompleteDropdown: {
8398
+ latestInput: "\u6700\u8FD1\u8F93\u5165"
8399
+ },
8400
+ cascaderList: {
8401
+ noData: "\u6CA1\u6709\u6570\u636E"
8402
+ },
8403
+ colorPicker: {
8404
+ foundationPanel: "\u57FA\u7840\u9762\u677F",
8405
+ advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
8406
+ },
8407
+ datePickerPro: {
8408
+ ok: "\u786E\u5B9A",
8409
+ placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
8410
+ month1: "1\u6708",
8411
+ month2: "2\u6708",
8412
+ month3: "3\u6708",
8413
+ month4: "4\u6708",
8414
+ month5: "5\u6708",
8415
+ month6: "6\u6708",
8416
+ month7: "7\u6708",
8417
+ month8: "8\u6708",
8418
+ month9: "9\u6708",
8419
+ month10: "10\u6708",
8420
+ month11: "11\u6708",
8421
+ month12: "12\u6708",
8422
+ year: "\u5E74",
8423
+ startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
8424
+ endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
8425
+ getWeekDays() {
8426
+ return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
8427
+ },
8428
+ getTimeArr() {
8429
+ return ["\u65F6", "\u5206", "\u79D2"];
8430
+ },
8431
+ getYearMonthStr(year, month) {
8432
+ return `${year}\u5E74${month}\u6708`;
8433
+ }
8434
+ },
8435
+ editableSelect: {
8436
+ noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
8437
+ noData: "\u6CA1\u6709\u6570\u636E"
8438
+ },
8439
+ input: {
8440
+ placeholder: "\u8BF7\u8F93\u5165"
8441
+ },
8442
+ splitterBar: {
8443
+ collapse: "\u6536\u8D77",
8444
+ expand: "\u5C55\u5F00"
8445
+ },
8446
+ stepsGuide: {
8447
+ previous: "\u4E0A\u4E00\u6B65",
8448
+ continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
8449
+ ok: "\u6211\u77E5\u9053\u5566"
8450
+ },
8451
+ table: {
8452
+ selectAll: "\u5168\u9009",
8453
+ ok: "\u786E\u5B9A"
8454
+ },
8455
+ timePopup: {
8456
+ ok: "\u786E\u5B9A"
8457
+ },
8458
+ transfer: {
8459
+ unit: "\u9879",
8460
+ panelUnit: "\u9879",
8461
+ headerUnit: "\u9879",
8462
+ noData: "\u6682\u65E0\u6570\u636E",
8463
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
8464
+ },
8465
+ tree: {
8466
+ loading: "\u52A0\u8F7D\u4E2D",
8467
+ newNode: "\u65B0\u8282\u70B9",
8468
+ selectPlaceholder: "\u8BF7\u9009\u62E9"
8469
+ },
8470
+ upload: {
8471
+ placeholder: "\u9009\u62E9\u6587\u4EF6",
8472
+ getExistSameNameFilesMsg(sameNames) {
8473
+ return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
8474
+ },
8475
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
8476
+ return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
8477
+ },
8478
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
8479
+ return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
8480
+ },
8481
+ getNotAllowedFileTypeMsg(filename, scope) {
8482
+ return `\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${scope}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
8483
+ }
8484
+ },
8485
+ search: {
8486
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
8487
+ },
8488
+ select: {
8489
+ placeholder: "\u8BF7\u9009\u62E9",
8490
+ noDataText: "\u65E0\u6570\u636E",
8491
+ noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
8492
+ loadingText: "\u52A0\u8F7D\u4E2D..."
8493
+ },
8494
+ tagInput: {
8495
+ maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
8496
+ },
8497
+ timeSelect: {
8498
+ placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
8499
+ }
8500
+ };
8501
+ const lang = ref("zh-CN");
8502
+ let langMessages = reactive({
8503
+ [lang.value]: zhCN
8504
+ });
8505
+ const Locale = {
8506
+ messages() {
8507
+ return langMessages[lang.value];
8508
+ },
8509
+ lang() {
8510
+ return lang.value;
8511
+ },
8512
+ use(newLang, newMessages2) {
8513
+ lang.value = newLang;
8514
+ this.add({ [newLang]: newMessages2 });
8515
+ },
8516
+ add(newMessages2 = {}) {
8517
+ langMessages = deepAssign(langMessages, newMessages2);
8518
+ }
8519
+ };
8520
+ const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
8521
+ function get(object4, path) {
8522
+ const keys = path.split(".");
8523
+ let result = object4;
8524
+ keys.forEach((key) => {
8525
+ var _a;
8526
+ result = (_a = result[key]) != null ? _a : "";
8527
+ });
8528
+ return result;
8529
+ }
8530
+ function createI18nTranslate(name, app, newPrefix) {
8531
+ const prefix = newPrefix || camelize(name) + ".";
8532
+ return (path) => {
8533
+ var _a;
8534
+ const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
8535
+ const message = get(messages2, prefix + path) || get(messages2, path);
8536
+ return message;
8537
+ };
8538
+ }
8371
8539
  var DAutoCompleteDropdown = defineComponent({
8372
8540
  name: "DAutoCompleteDropdown",
8373
8541
  directives: {
8374
8542
  dLoading: loadingDirective
8375
8543
  },
8376
8544
  setup(props, ctx2) {
8545
+ const app = getCurrentInstance();
8546
+ const t = createI18nTranslate("DAutoCompleteDropdown", app);
8377
8547
  const propsData = inject(DropdownPropsKey);
8378
8548
  const {
8379
8549
  visible,
@@ -8424,7 +8594,7 @@ var DAutoCompleteDropdown = defineComponent({
8424
8594
  "class": noDataNs.b()
8425
8595
  }, [ctx2.slots.searchingTemplate()])]), latestSource.value && !modelValue.value && createVNode("li", {
8426
8596
  "class": ns2.e("popup-tips")
8427
- }, [createTextVNode("\u6700\u8FD1\u8F93\u5165")]), !showNoResultItemTemplate.value && !(searchStatus == null ? void 0 : searchStatus.value) && searchList != null && searchList.value.length > 0 && searchList.value.map((item, index2) => {
8597
+ }, [t("latestInput")]), !showNoResultItemTemplate.value && !(searchStatus == null ? void 0 : searchStatus.value) && searchList != null && searchList.value.length > 0 && searchList.value.map((item, index2) => {
8428
8598
  return createVNode("li", {
8429
8599
  "onClick": () => onSelect(item),
8430
8600
  "class": [dropdownItemNs.b(), selectedIndex.value === index2 && "selected", {
@@ -8602,7 +8772,8 @@ function useIconDom(props, ctx2) {
8602
8772
  "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
8603
8773
  "style": {
8604
8774
  width: iconSize.value || "",
8605
- transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
8775
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
8776
+ verticalAlign: "middle"
8606
8777
  }
8607
8778
  }, ctx2.attrs), null);
8608
8779
  };
@@ -8638,6 +8809,7 @@ function useIconDom(props, ctx2) {
8638
8809
  var Icon = defineComponent({
8639
8810
  name: "DIcon",
8640
8811
  props: iconProps,
8812
+ emits: ["click"],
8641
8813
  setup(props, ctx2) {
8642
8814
  const {
8643
8815
  disabled,
@@ -8653,10 +8825,10 @@ var Icon = defineComponent({
8653
8825
  [ns2.m("operable")]: operable.value
8654
8826
  }));
8655
8827
  const onClick = (e) => {
8656
- e.stopImmediatePropagation();
8657
8828
  if (disabled.value) {
8658
- e.preventDefault();
8829
+ return;
8659
8830
  }
8831
+ ctx2.emit("click", e);
8660
8832
  };
8661
8833
  return () => {
8662
8834
  var _a, _b, _c, _d;