vue-devui 1.0.0-rc.7 → 1.0.0

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 (231) hide show
  1. package/README.md +163 -146
  2. package/alert/index.es.js +46 -15
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8230 -231
  6. package/auto-complete/index.umd.js +29 -5
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +81 -70
  9. package/avatar/index.umd.js +1 -1
  10. package/avatar/style.css +1 -1
  11. package/badge/index.es.js +34 -4
  12. package/badge/index.umd.js +1 -1
  13. package/badge/style.css +1 -1
  14. package/button/index.es.js +5706 -98
  15. package/button/index.umd.js +27 -1
  16. package/button/style.css +1 -1
  17. package/card/index.es.js +38 -13
  18. package/card/index.umd.js +1 -1
  19. package/card/style.css +1 -1
  20. package/checkbox/index.es.js +8066 -245
  21. package/checkbox/index.umd.js +27 -1
  22. package/checkbox/style.css +1 -1
  23. package/{date-picker → collapse}/index.d.ts +0 -0
  24. package/collapse/index.es.js +213 -0
  25. package/collapse/index.umd.js +1 -0
  26. package/{date-picker → collapse}/package.json +1 -1
  27. package/collapse/style.css +1 -0
  28. package/countdown/index.es.js +56 -13
  29. package/countdown/index.umd.js +1 -1
  30. package/date-picker-pro/index.d.ts +7 -0
  31. package/date-picker-pro/index.es.js +12020 -0
  32. package/date-picker-pro/index.umd.js +27 -0
  33. package/date-picker-pro/package.json +7 -0
  34. package/date-picker-pro/style.css +1 -0
  35. package/drawer/index.es.js +29 -4
  36. package/drawer/index.umd.js +1 -1
  37. package/drawer/style.css +1 -1
  38. package/dropdown/index.es.js +178 -142
  39. package/dropdown/index.umd.js +1 -1
  40. package/dropdown/style.css +1 -1
  41. package/editable-select/index.es.js +742 -107
  42. package/editable-select/index.umd.js +1 -1
  43. package/editable-select/style.css +1 -1
  44. package/form/index.es.js +544 -316
  45. package/form/index.umd.js +17 -17
  46. package/form/style.css +1 -1
  47. package/fullscreen/index.es.js +28 -4
  48. package/fullscreen/index.umd.js +1 -1
  49. package/fullscreen/style.css +1 -1
  50. package/grid/index.es.js +71 -50
  51. package/grid/index.umd.js +1 -1
  52. package/grid/style.css +1 -1
  53. package/icon/index.es.js +184 -23
  54. package/icon/index.umd.js +1 -1
  55. package/icon/style.css +1 -0
  56. package/image-preview/index.es.js +34 -11
  57. package/image-preview/index.umd.js +1 -1
  58. package/image-preview/style.css +1 -1
  59. package/input/index.es.js +8250 -131
  60. package/input/index.umd.js +27 -1
  61. package/input/style.css +1 -1
  62. package/input-number/index.es.js +275 -203
  63. package/input-number/index.umd.js +1 -1
  64. package/input-number/style.css +1 -1
  65. package/layout/index.es.js +34 -6
  66. package/layout/index.umd.js +1 -1
  67. package/layout/style.css +1 -1
  68. package/loading/index.es.js +34 -10
  69. package/loading/index.umd.js +1 -1
  70. package/loading/style.css +1 -1
  71. package/mention/index.d.ts +7 -0
  72. package/mention/index.es.js +8310 -0
  73. package/mention/index.umd.js +36 -0
  74. package/mention/package.json +7 -0
  75. package/mention/style.css +1 -0
  76. package/menu/index.d.ts +7 -0
  77. package/menu/index.es.js +934 -0
  78. package/menu/index.umd.js +1 -0
  79. package/menu/package.json +7 -0
  80. package/menu/style.css +1 -0
  81. package/message/index.d.ts +7 -0
  82. package/message/index.es.js +538 -0
  83. package/message/index.umd.js +1 -0
  84. package/message/package.json +7 -0
  85. package/message/style.css +1 -0
  86. package/modal/index.es.js +359 -170
  87. package/modal/index.umd.js +1 -1
  88. package/modal/style.css +1 -1
  89. package/notification/index.es.js +236 -65
  90. package/notification/index.umd.js +1 -1
  91. package/notification/style.css +1 -1
  92. package/nuxt/components/ButtonGroup.js +3 -0
  93. package/nuxt/components/CheckboxButton.js +3 -0
  94. package/nuxt/components/Collapse.js +3 -0
  95. package/nuxt/components/CollapseItem.js +3 -0
  96. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  97. package/nuxt/components/DatePickerPro.js +3 -0
  98. package/nuxt/components/Icon.js +1 -0
  99. package/nuxt/components/IconGroup.js +3 -0
  100. package/nuxt/components/LABEL_DATA.js +3 -0
  101. package/nuxt/components/Mention.js +3 -0
  102. package/nuxt/components/Menu.js +3 -0
  103. package/nuxt/components/MenuItem.js +3 -0
  104. package/nuxt/components/Message.js +3 -0
  105. package/nuxt/components/Option.js +3 -0
  106. package/nuxt/components/OptionGroup.js +3 -0
  107. package/nuxt/components/RadioButton.js +3 -0
  108. package/nuxt/components/Step.js +3 -0
  109. package/nuxt/components/Steps.js +3 -0
  110. package/nuxt/components/SubMenu.js +3 -0
  111. package/nuxt/components/TABLE_TOKEN.js +3 -0
  112. package/nuxt/components/TimePicker.js +3 -0
  113. package/nuxt/components/TimeSelect.js +3 -0
  114. package/nuxt/components/animationInjectionKey.js +3 -0
  115. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  116. package/nuxt/components/buttonGroupProps.js +3 -0
  117. package/nuxt/components/collapseItemProps.js +3 -0
  118. package/nuxt/components/collapseProps.js +3 -0
  119. package/nuxt/components/datePickerProCommonProps.js +3 -0
  120. package/nuxt/components/datePickerProPanelProps.js +3 -0
  121. package/nuxt/components/datePickerProProps.js +3 -0
  122. package/nuxt/components/iconProps.js +1 -0
  123. package/nuxt/components/mentionProps.js +3 -0
  124. package/nuxt/components/messageProps.js +3 -0
  125. package/nuxt/components/roundInjectionKey.js +3 -0
  126. package/nuxt/components/skeletonItemProps.js +3 -0
  127. package/nuxt/components/stepProps.js +3 -0
  128. package/nuxt/components/stepsProps.js +3 -0
  129. package/nuxt/components/svgIconProps.js +3 -0
  130. package/nuxt/components/tableProps.js +3 -0
  131. package/nuxt/components/timerPickerPanelProps.js +3 -0
  132. package/nuxt/components/treeNodeProps.js +3 -0
  133. package/overlay/index.es.js +84 -125
  134. package/overlay/index.umd.js +1 -1
  135. package/overlay/style.css +1 -1
  136. package/package.json +7 -3
  137. package/pagination/index.es.js +234 -39
  138. package/pagination/index.umd.js +1 -1
  139. package/pagination/style.css +1 -1
  140. package/panel/style.css +1 -1
  141. package/popover/index.es.js +274 -220
  142. package/popover/index.umd.js +13 -13
  143. package/popover/style.css +1 -1
  144. package/progress/index.es.js +31 -9
  145. package/progress/index.umd.js +3 -3
  146. package/progress/style.css +1 -1
  147. package/radio/index.es.js +7969 -152
  148. package/radio/index.umd.js +27 -1
  149. package/radio/style.css +1 -1
  150. package/rate/index.es.js +46 -14
  151. package/rate/index.umd.js +1 -1
  152. package/rate/style.css +1 -1
  153. package/result/index.es.js +169 -22
  154. package/result/index.umd.js +1 -1
  155. package/result/style.css +1 -1
  156. package/search/index.es.js +3823 -1090
  157. package/search/index.umd.js +18 -18
  158. package/search/style.css +1 -1
  159. package/select/index.es.js +9186 -478
  160. package/select/index.umd.js +27 -1
  161. package/select/style.css +1 -1
  162. package/skeleton/index.es.js +110 -259
  163. package/skeleton/index.umd.js +1 -1
  164. package/skeleton/style.css +1 -1
  165. package/slider/index.es.js +143 -146
  166. package/slider/index.umd.js +1 -1
  167. package/slider/style.css +1 -1
  168. package/splitter/index.es.js +433 -207
  169. package/splitter/index.umd.js +17 -17
  170. package/splitter/style.css +1 -1
  171. package/statistic/index.es.js +34 -16
  172. package/statistic/index.umd.js +1 -1
  173. package/statistic/style.css +1 -1
  174. package/status/index.es.js +26 -2
  175. package/status/index.umd.js +1 -1
  176. package/status/style.css +1 -1
  177. package/steps/index.d.ts +7 -0
  178. package/steps/index.es.js +386 -0
  179. package/steps/index.umd.js +1 -0
  180. package/steps/package.json +7 -0
  181. package/steps/style.css +1 -0
  182. package/style.css +1 -1
  183. package/switch/index.es.js +7802 -59
  184. package/switch/index.umd.js +27 -1
  185. package/switch/style.css +1 -1
  186. package/table/index.es.js +9769 -919
  187. package/table/index.umd.js +27 -1
  188. package/table/style.css +1 -1
  189. package/tabs/index.es.js +309 -96
  190. package/tabs/index.umd.js +1 -1
  191. package/tabs/style.css +1 -1
  192. package/tag/index.es.js +35 -7
  193. package/tag/index.umd.js +1 -1
  194. package/tag/style.css +1 -1
  195. package/textarea/index.es.js +7922 -78
  196. package/textarea/index.umd.js +35 -1
  197. package/textarea/style.css +1 -1
  198. package/time-picker/index.d.ts +7 -0
  199. package/time-picker/index.es.js +9549 -0
  200. package/time-picker/index.umd.js +27 -0
  201. package/time-picker/package.json +7 -0
  202. package/time-picker/style.css +1 -0
  203. package/time-select/index.d.ts +7 -0
  204. package/time-select/index.es.js +9585 -0
  205. package/time-select/index.umd.js +27 -0
  206. package/time-select/package.json +7 -0
  207. package/time-select/style.css +1 -0
  208. package/timeline/index.es.js +169 -22
  209. package/timeline/index.umd.js +1 -1
  210. package/timeline/style.css +1 -1
  211. package/tooltip/index.es.js +265 -212
  212. package/tooltip/index.umd.js +15 -15
  213. package/tooltip/style.css +1 -1
  214. package/tree/index.es.js +11343 -795
  215. package/tree/index.umd.js +27 -1
  216. package/tree/style.css +1 -1
  217. package/upload/index.es.js +494 -106
  218. package/upload/index.umd.js +1 -1
  219. package/upload/style.css +1 -1
  220. package/vue-devui.es.js +22849 -13614
  221. package/vue-devui.umd.js +30 -23
  222. package/date-picker/index.es.js +0 -1145
  223. package/date-picker/index.umd.js +0 -1
  224. package/date-picker/style.css +0 -1
  225. package/nuxt/components/DatePicker.js +0 -3
  226. package/nuxt/components/FormControl.js +0 -3
  227. package/nuxt/components/FormLabel.js +0 -3
  228. package/nuxt/components/StickSlider.js +0 -3
  229. package/nuxt/components/formControlProps.js +0 -3
  230. package/nuxt/components/overlayEmits.js +0 -3
  231. package/nuxt/components/overlayProps.js +0 -3
package/form/index.es.js CHANGED
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
29
29
  }
30
30
  return target;
31
31
  };
32
- import { defineComponent, provide, reactive, toRefs, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, Fragment, inject, onBeforeUnmount } from "vue";
32
+ import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, withModifiers, createTextVNode, onBeforeUnmount } from "vue";
33
33
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
34
34
  const formProps = {
35
35
  data: {
@@ -58,6 +58,21 @@ const formProps = {
58
58
  popPosition: {
59
59
  type: Array,
60
60
  default: ["right", "bottom"]
61
+ },
62
+ validateOnRuleChange: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ showFeedback: {
67
+ type: Boolean,
68
+ default: false
69
+ },
70
+ disabled: {
71
+ type: Boolean,
72
+ default: false
73
+ },
74
+ size: {
75
+ type: String
61
76
  }
62
77
  };
63
78
  const FORM_TOKEN = Symbol("dForm");
@@ -71,8 +86,8 @@ function createBem(namespace, element, modifier) {
71
86
  }
72
87
  return cls;
73
88
  }
74
- function useNamespace(block) {
75
- const namespace = `devui-${block}`;
89
+ function useNamespace(block, needDot = false) {
90
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
76
91
  const b = () => createBem(namespace);
77
92
  const e = (element) => element ? createBem(namespace, element) : "";
78
93
  const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
@@ -836,7 +851,7 @@ var lodash = { exports: {} };
836
851
  function object4() {
837
852
  }
838
853
  return function(proto) {
839
- if (!isObject(proto)) {
854
+ if (!isObject2(proto)) {
840
855
  return {};
841
856
  }
842
857
  if (objectCreate) {
@@ -1198,7 +1213,7 @@ var lodash = { exports: {} };
1198
1213
  if (result2 !== undefined$1) {
1199
1214
  return result2;
1200
1215
  }
1201
- if (!isObject(value)) {
1216
+ if (!isObject2(value)) {
1202
1217
  return value;
1203
1218
  }
1204
1219
  var isArr = isArray(value);
@@ -1545,7 +1560,7 @@ var lodash = { exports: {} };
1545
1560
  return true;
1546
1561
  }
1547
1562
  function baseIsNative(value) {
1548
- if (!isObject(value) || isMasked(value)) {
1563
+ if (!isObject2(value) || isMasked(value)) {
1549
1564
  return false;
1550
1565
  }
1551
1566
  var pattern4 = isFunction(value) ? reIsNative : reIsHostCtor;
@@ -1585,7 +1600,7 @@ var lodash = { exports: {} };
1585
1600
  return result2;
1586
1601
  }
1587
1602
  function baseKeysIn(object4) {
1588
- if (!isObject(object4)) {
1603
+ if (!isObject2(object4)) {
1589
1604
  return nativeKeysIn(object4);
1590
1605
  }
1591
1606
  var isProto = isPrototype(object4), result2 = [];
@@ -1630,7 +1645,7 @@ var lodash = { exports: {} };
1630
1645
  }
1631
1646
  baseFor(source, function(srcValue, key) {
1632
1647
  stack || (stack = new Stack());
1633
- if (isObject(srcValue)) {
1648
+ if (isObject2(srcValue)) {
1634
1649
  baseMergeDeep(object4, source, key, srcIndex, baseMerge, customizer, stack);
1635
1650
  } else {
1636
1651
  var newValue = customizer ? customizer(safeGet(object4, key), srcValue, key + "", object4, source, stack) : undefined$1;
@@ -1670,7 +1685,7 @@ var lodash = { exports: {} };
1670
1685
  newValue = objValue;
1671
1686
  if (isArguments(objValue)) {
1672
1687
  newValue = toPlainObject(objValue);
1673
- } else if (!isObject(objValue) || isFunction(objValue)) {
1688
+ } else if (!isObject2(objValue) || isFunction(objValue)) {
1674
1689
  newValue = initCloneObject(srcValue);
1675
1690
  }
1676
1691
  } else {
@@ -1809,7 +1824,7 @@ var lodash = { exports: {} };
1809
1824
  return shuffleSelf(array4, baseClamp(n, 0, array4.length));
1810
1825
  }
1811
1826
  function baseSet(object4, path, value, customizer) {
1812
- if (!isObject(object4)) {
1827
+ if (!isObject2(object4)) {
1813
1828
  return object4;
1814
1829
  }
1815
1830
  path = castPath(path, object4);
@@ -1823,7 +1838,7 @@ var lodash = { exports: {} };
1823
1838
  var objValue = nested[key];
1824
1839
  newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
1825
1840
  if (newValue === undefined$1) {
1826
- newValue = isObject(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
1841
+ newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
1827
1842
  }
1828
1843
  }
1829
1844
  assignValue(nested, key, newValue);
@@ -2273,7 +2288,7 @@ var lodash = { exports: {} };
2273
2288
  return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
2274
2289
  }
2275
2290
  var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
2276
- return isObject(result2) ? result2 : thisBinding;
2291
+ return isObject2(result2) ? result2 : thisBinding;
2277
2292
  };
2278
2293
  }
2279
2294
  function createCurry(func, bitmask, arity) {
@@ -2587,7 +2602,7 @@ var lodash = { exports: {} };
2587
2602
  return objValue;
2588
2603
  }
2589
2604
  function customDefaultsMerge(objValue, srcValue, key, object4, source, stack) {
2590
- if (isObject(objValue) && isObject(srcValue)) {
2605
+ if (isObject2(objValue) && isObject2(srcValue)) {
2591
2606
  stack.set(srcValue, objValue);
2592
2607
  baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
2593
2608
  stack["delete"](srcValue);
@@ -2935,7 +2950,7 @@ var lodash = { exports: {} };
2935
2950
  return !!length && (type4 == "number" || type4 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
2936
2951
  }
2937
2952
  function isIterateeCall(value, index2, object4) {
2938
- if (!isObject(object4)) {
2953
+ if (!isObject2(object4)) {
2939
2954
  return false;
2940
2955
  }
2941
2956
  var type4 = typeof index2;
@@ -2978,7 +2993,7 @@ var lodash = { exports: {} };
2978
2993
  return value === proto;
2979
2994
  }
2980
2995
  function isStrictComparable(value) {
2981
- return value === value && !isObject(value);
2996
+ return value === value && !isObject2(value);
2982
2997
  }
2983
2998
  function matchesStrictComparable(key, srcValue) {
2984
2999
  return function(object4) {
@@ -3860,7 +3875,7 @@ var lodash = { exports: {} };
3860
3875
  throw new TypeError2(FUNC_ERROR_TEXT);
3861
3876
  }
3862
3877
  wait = toNumber(wait) || 0;
3863
- if (isObject(options)) {
3878
+ if (isObject2(options)) {
3864
3879
  leading = !!options.leading;
3865
3880
  maxing = "maxWait" in options;
3866
3881
  maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -4030,7 +4045,7 @@ var lodash = { exports: {} };
4030
4045
  if (typeof func != "function") {
4031
4046
  throw new TypeError2(FUNC_ERROR_TEXT);
4032
4047
  }
4033
- if (isObject(options)) {
4048
+ if (isObject2(options)) {
4034
4049
  leading = "leading" in options ? !!options.leading : leading;
4035
4050
  trailing = "trailing" in options ? !!options.trailing : trailing;
4036
4051
  }
@@ -4138,7 +4153,7 @@ var lodash = { exports: {} };
4138
4153
  return typeof value == "number" && nativeIsFinite(value);
4139
4154
  }
4140
4155
  function isFunction(value) {
4141
- if (!isObject(value)) {
4156
+ if (!isObject2(value)) {
4142
4157
  return false;
4143
4158
  }
4144
4159
  var tag = baseGetTag(value);
@@ -4150,7 +4165,7 @@ var lodash = { exports: {} };
4150
4165
  function isLength(value) {
4151
4166
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
4152
4167
  }
4153
- function isObject(value) {
4168
+ function isObject2(value) {
4154
4169
  var type4 = typeof value;
4155
4170
  return value != null && (type4 == "object" || type4 == "function");
4156
4171
  }
@@ -4257,9 +4272,9 @@ var lodash = { exports: {} };
4257
4272
  if (isSymbol(value)) {
4258
4273
  return NAN;
4259
4274
  }
4260
- if (isObject(value)) {
4275
+ if (isObject2(value)) {
4261
4276
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
4262
- value = isObject(other) ? other + "" : other;
4277
+ value = isObject2(other) ? other + "" : other;
4263
4278
  }
4264
4279
  if (typeof value != "string") {
4265
4280
  return value === 0 ? value : +value;
@@ -4480,7 +4495,7 @@ var lodash = { exports: {} };
4480
4495
  var Ctor = object4 && object4.constructor;
4481
4496
  if (isArrLike) {
4482
4497
  accumulator = isArr ? new Ctor() : [];
4483
- } else if (isObject(object4)) {
4498
+ } else if (isObject2(object4)) {
4484
4499
  accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object4)) : {};
4485
4500
  } else {
4486
4501
  accumulator = {};
@@ -4762,7 +4777,7 @@ var lodash = { exports: {} };
4762
4777
  }
4763
4778
  function truncate(string3, options) {
4764
4779
  var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
4765
- if (isObject(options)) {
4780
+ if (isObject2(options)) {
4766
4781
  var separator = "separator" in options ? options.separator : separator;
4767
4782
  length = "length" in options ? toInteger(options.length) : length;
4768
4783
  omission = "omission" in options ? baseToString(options.omission) : omission;
@@ -4892,13 +4907,13 @@ var lodash = { exports: {} };
4892
4907
  });
4893
4908
  function mixin(object4, source, options) {
4894
4909
  var props = keys(source), methodNames = baseFunctions(source, props);
4895
- if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
4910
+ if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
4896
4911
  options = source;
4897
4912
  source = object4;
4898
4913
  object4 = this;
4899
4914
  methodNames = baseFunctions(source, keys(source));
4900
4915
  }
4901
- var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object4);
4916
+ var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object4);
4902
4917
  arrayEach(methodNames, function(methodName) {
4903
4918
  var func = source[methodName];
4904
4919
  object4[methodName] = func;
@@ -5244,7 +5259,7 @@ var lodash = { exports: {} };
5244
5259
  lodash2.isNil = isNil;
5245
5260
  lodash2.isNull = isNull;
5246
5261
  lodash2.isNumber = isNumber;
5247
- lodash2.isObject = isObject;
5262
+ lodash2.isObject = isObject2;
5248
5263
  lodash2.isObjectLike = isObjectLike;
5249
5264
  lodash2.isPlainObject = isPlainObject;
5250
5265
  lodash2.isRegExp = isRegExp;
@@ -5550,13 +5565,20 @@ function useFormValidation(itemContexts) {
5550
5565
  }
5551
5566
  };
5552
5567
  const validate = async (callback) => validateFields(void 0, callback);
5553
- return { validate, validateFields };
5568
+ const clearValidate = (fields = []) => {
5569
+ getValidateFields(fields).forEach((field) => field.clearValidate());
5570
+ };
5571
+ const resetFields = (fields = []) => {
5572
+ getValidateFields(fields).forEach((field) => field.resetField());
5573
+ };
5574
+ return { validate, validateFields, resetFields, clearValidate };
5554
5575
  }
5555
5576
  var Form = defineComponent({
5556
5577
  name: "DForm",
5557
5578
  props: formProps,
5579
+ emits: ["validate"],
5558
5580
  setup(props, ctx) {
5559
- const ns = useNamespace("form");
5581
+ const ns2 = useNamespace("form");
5560
5582
  const {
5561
5583
  itemContexts,
5562
5584
  addItemContext,
@@ -5564,160 +5586,165 @@ var Form = defineComponent({
5564
5586
  } = useFieldCollection();
5565
5587
  const {
5566
5588
  validate,
5567
- validateFields
5589
+ validateFields,
5590
+ resetFields,
5591
+ clearValidate
5568
5592
  } = useFormValidation(itemContexts);
5569
5593
  const onSubmit = (e) => {
5570
5594
  e.preventDefault();
5571
5595
  };
5596
+ watch(() => props.rules, () => {
5597
+ if (props.validateOnRuleChange) {
5598
+ validate();
5599
+ }
5600
+ }, {
5601
+ deep: true
5602
+ });
5572
5603
  provide(FORM_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
5604
+ emit: ctx.emit,
5573
5605
  addItemContext,
5574
5606
  removeItemContext
5575
5607
  })));
5576
5608
  ctx.expose({
5577
5609
  validate,
5578
- validateFields
5610
+ validateFields,
5611
+ resetFields,
5612
+ clearValidate
5579
5613
  });
5580
5614
  return () => {
5581
5615
  var _a, _b;
5582
5616
  return createVNode("form", {
5583
5617
  "onSubmit": onSubmit,
5584
- "class": ns.b()
5618
+ "class": ns2.b()
5585
5619
  }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
5586
5620
  };
5587
5621
  }
5588
5622
  });
5589
- const formLabelProps = {
5590
- helpTips: {
5623
+ const formItemProps = {
5624
+ label: {
5625
+ type: String
5626
+ },
5627
+ field: {
5591
5628
  type: String,
5592
5629
  default: ""
5593
- }
5594
- };
5595
- var baseOverlay = "";
5596
- function _isSlot(s) {
5597
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
5598
- }
5599
- const CommonOverlay = defineComponent({
5600
- setup(props, ctx) {
5601
- return () => {
5602
- let _slot;
5603
- return createVNode(Teleport, {
5604
- "to": "#d-overlay-anchor"
5605
- }, {
5606
- default: () => [createVNode(Transition, {
5607
- "name": "devui-overlay-fade"
5608
- }, _isSlot(_slot = renderSlot(ctx.slots, "default")) ? _slot : {
5609
- default: () => [_slot]
5610
- })]
5611
- });
5612
- };
5613
- }
5614
- });
5615
- const overlayProps = {
5616
- visible: {
5617
- type: Boolean
5618
5630
  },
5619
- backgroundBlock: {
5631
+ required: {
5620
5632
  type: Boolean,
5621
5633
  default: false
5622
5634
  },
5623
- backgroundClass: {
5635
+ messageType: {
5636
+ type: String
5637
+ },
5638
+ popPosition: {
5639
+ type: Array
5640
+ },
5641
+ rules: {
5642
+ type: [Object, Array]
5643
+ },
5644
+ showFeedback: {
5645
+ type: Boolean,
5646
+ default: void 0
5647
+ },
5648
+ helpTips: {
5624
5649
  type: String,
5625
5650
  default: ""
5626
5651
  },
5627
- backgroundStyle: {
5628
- type: [String, Object]
5652
+ feedbackStatus: {
5653
+ type: String
5629
5654
  },
5630
- onBackdropClick: {
5631
- type: Function
5655
+ extraInfo: {
5656
+ type: String,
5657
+ default: ""
5658
+ }
5659
+ };
5660
+ const FORM_ITEM_TOKEN = Symbol("dFormItem");
5661
+ const LABEL_DATA = Symbol("labelData");
5662
+ const formLabelProps = {
5663
+ helpTips: {
5664
+ type: String,
5665
+ default: ""
5666
+ }
5667
+ };
5668
+ const fixedOverlayProps = {
5669
+ modelValue: {
5670
+ type: Boolean,
5671
+ default: false
5632
5672
  },
5633
- backdropClose: {
5673
+ lockScroll: {
5634
5674
  type: Boolean,
5635
5675
  default: true
5636
5676
  },
5637
- hasBackdrop: {
5677
+ closeOnClickOverlay: {
5638
5678
  type: Boolean,
5639
5679
  default: true
5640
5680
  }
5641
5681
  };
5642
- const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
5643
- overlayStyle: {
5644
- type: [String, Object],
5645
- default: void 0
5682
+ function lockScroll() {
5683
+ if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
5684
+ const scrollTop = document.documentElement.scrollTop;
5685
+ const style = document.documentElement.getAttribute("style");
5686
+ document.documentElement.style.position = "fixed";
5687
+ document.documentElement.style.top = `-${scrollTop}px`;
5688
+ document.documentElement.style.width = document.documentElement.style.width || "100%";
5689
+ document.documentElement.style.overflowY = "scroll";
5690
+ return () => {
5691
+ if (style) {
5692
+ document.documentElement.setAttribute("style", style);
5693
+ } else {
5694
+ document.documentElement.removeAttribute("style");
5695
+ }
5696
+ document.documentElement.scrollTop = scrollTop;
5697
+ };
5646
5698
  }
5647
- });
5648
- const overlayEmits = ["update:visible", "backdropClick"];
5649
- function useOverlayLogic(props, ctx) {
5650
- const backgroundClass = computed(() => {
5651
- return [
5652
- "devui-overlay-background",
5653
- props.backgroundClass,
5654
- !props.hasBackdrop ? "devui-overlay-background__disabled" : "devui-overlay-background__color"
5655
- ];
5656
- });
5657
- const overlayClass = computed(() => {
5658
- return "devui-overlay";
5659
- });
5660
- const handleBackdropClick = (event) => {
5661
- var _a;
5699
+ return;
5700
+ }
5701
+ function useFixedOverlay(props, ctx) {
5702
+ let lockScrollCb;
5703
+ const onClick = (event) => {
5662
5704
  event.preventDefault();
5663
- (_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
5664
- if (props.backdropClose) {
5665
- ctx.emit("update:visible", false);
5705
+ ctx.emit("click", event);
5706
+ if (props.closeOnClickOverlay) {
5707
+ ctx.emit("update:modelValue", false);
5666
5708
  }
5667
5709
  };
5668
- const handleOverlayBubbleCancel = (event) => event.cancelBubble = true;
5669
- onMounted(() => {
5670
- const body = document.body;
5671
- const originOverflow = body.style.overflow;
5672
- const originPosition = body.style.position;
5673
- watch([() => props.visible, () => props.backgroundBlock], ([visible, backgroundBlock]) => {
5674
- if (backgroundBlock) {
5675
- const top = body.getBoundingClientRect().y;
5676
- if (visible) {
5677
- body.style.overflowY = "scroll";
5678
- body.style.position = visible ? "fixed" : "";
5679
- body.style.top = `${top}px`;
5680
- } else {
5681
- body.style.overflowY = originOverflow;
5682
- body.style.position = originPosition;
5683
- body.style.top = "";
5684
- window.scrollTo(0, -top);
5685
- }
5686
- }
5687
- });
5688
- onUnmounted(() => {
5689
- document.body.style.overflow = originOverflow;
5690
- });
5691
- });
5692
- return {
5693
- backgroundClass,
5694
- overlayClass,
5695
- handleBackdropClick,
5696
- handleOverlayBubbleCancel
5710
+ const removeBodyAdditions = () => {
5711
+ lockScrollCb == null ? void 0 : lockScrollCb();
5697
5712
  };
5713
+ watch(() => props.modelValue, (val) => {
5714
+ if (val) {
5715
+ props.lockScroll && (lockScrollCb = lockScroll());
5716
+ } else {
5717
+ removeBodyAdditions();
5718
+ }
5719
+ });
5720
+ onUnmounted(removeBodyAdditions);
5721
+ return { onClick };
5698
5722
  }
5699
5723
  var fixedOverlay = "";
5700
5724
  defineComponent({
5701
5725
  name: "DFixedOverlay",
5726
+ inheritAttrs: false,
5702
5727
  props: fixedOverlayProps,
5703
- emits: overlayEmits,
5728
+ emits: ["update:modelValue", "click"],
5704
5729
  setup(props, ctx) {
5705
5730
  const {
5706
- backgroundClass,
5707
- overlayClass,
5708
- handleBackdropClick,
5709
- handleOverlayBubbleCancel
5710
- } = useOverlayLogic(props, ctx);
5711
- return () => createVNode(CommonOverlay, null, {
5712
- default: () => [props.visible && createVNode("div", {
5713
- "class": backgroundClass.value,
5714
- "style": props.backgroundStyle,
5715
- "onClick": handleBackdropClick
5716
- }, [createVNode("div", {
5717
- "class": overlayClass.value,
5718
- "style": props.overlayStyle,
5719
- "onClick": handleOverlayBubbleCancel
5720
- }, [renderSlot(ctx.slots, "default")])])]
5731
+ modelValue
5732
+ } = toRefs(props);
5733
+ const ns2 = useNamespace("fixed-overlay");
5734
+ const {
5735
+ onClick
5736
+ } = useFixedOverlay(props, ctx);
5737
+ return () => createVNode(Transition, {
5738
+ "name": ns2.m("fade")
5739
+ }, {
5740
+ default: () => {
5741
+ var _a, _b;
5742
+ return [modelValue.value && createVNode("div", mergeProps({
5743
+ "class": ns2.b()
5744
+ }, ctx.attrs, {
5745
+ "onClick": onClick
5746
+ }), [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])];
5747
+ }
5721
5748
  });
5722
5749
  }
5723
5750
  });
@@ -5865,6 +5892,7 @@ const FlexibleOverlay = defineComponent({
5865
5892
  emit,
5866
5893
  expose
5867
5894
  }) {
5895
+ const ns2 = useNamespace("flexible-overlay");
5868
5896
  const {
5869
5897
  arrowRef,
5870
5898
  overlayRef,
@@ -5877,14 +5905,70 @@ const FlexibleOverlay = defineComponent({
5877
5905
  var _a;
5878
5906
  return props.modelValue && createVNode("div", mergeProps({
5879
5907
  "ref": overlayRef,
5880
- "class": "devui-flexible-overlay"
5908
+ "class": ns2.b()
5881
5909
  }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
5882
5910
  "ref": arrowRef,
5883
- "class": "devui-flexible-overlay-arrow"
5911
+ "class": ns2.e("arrow")
5884
5912
  }, null)]);
5885
5913
  };
5886
5914
  }
5887
5915
  });
5916
+ const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
5917
+ const isObject = (val) => val !== null && typeof val === "object";
5918
+ const ns$1 = useNamespace("popper-trigger");
5919
+ function wrapContent(content) {
5920
+ return h("span", { class: ns$1.b() }, content);
5921
+ }
5922
+ function getFirstValidChild(nodes) {
5923
+ for (const child of nodes) {
5924
+ if (isObject(child)) {
5925
+ if (child.type === Comment) {
5926
+ continue;
5927
+ }
5928
+ if (child.type === "svg" || child.type === Text) {
5929
+ return wrapContent(child);
5930
+ }
5931
+ if (child.type === Fragment) {
5932
+ return getFirstValidChild(child.children);
5933
+ }
5934
+ return child;
5935
+ }
5936
+ return wrapContent(child);
5937
+ }
5938
+ return null;
5939
+ }
5940
+ var PopperTrigger = defineComponent({
5941
+ name: "DPopperTrigger",
5942
+ setup(_, ctx) {
5943
+ const {
5944
+ slots,
5945
+ attrs
5946
+ } = ctx;
5947
+ return () => {
5948
+ var _a;
5949
+ const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots, attrs);
5950
+ const triggerRef = inject(POPPER_TRIGGER_TOKEN);
5951
+ if (!defaultSlot) {
5952
+ return null;
5953
+ }
5954
+ const firstValidChild = getFirstValidChild(defaultSlot);
5955
+ if (!firstValidChild) {
5956
+ return null;
5957
+ }
5958
+ return withDirectives(cloneVNode(firstValidChild, attrs), [[{
5959
+ mounted(el) {
5960
+ triggerRef.value = el;
5961
+ },
5962
+ updated(el) {
5963
+ triggerRef.value = el;
5964
+ },
5965
+ unmounted() {
5966
+ triggerRef.value = null;
5967
+ }
5968
+ }]]);
5969
+ };
5970
+ }
5971
+ });
5888
5972
  const popoverProps = {
5889
5973
  isOpen: {
5890
5974
  type: Boolean,
@@ -5925,6 +6009,10 @@ const popoverProps = {
5925
6009
  mouseLeaveDelay: {
5926
6010
  type: Number,
5927
6011
  default: 100
6012
+ },
6013
+ disabled: {
6014
+ type: Boolean,
6015
+ default: false
5928
6016
  }
5929
6017
  };
5930
6018
  const TransformOriginMap = {
@@ -5961,11 +6049,16 @@ function usePopover(props, visible, placement, origin, popoverRef) {
5961
6049
  return { overlayStyles };
5962
6050
  }
5963
6051
  function usePopoverEvent(props, visible, origin) {
5964
- const { trigger, position, mouseEnterDelay, mouseLeaveDelay } = toRefs(props);
6052
+ const { trigger, position, mouseEnterDelay, mouseLeaveDelay, disabled } = toRefs(props);
5965
6053
  const isClick = computed(() => trigger.value === "click");
5966
6054
  const placement = ref(position.value[0].split("-")[0]);
5967
6055
  const isEnter = ref(false);
5968
- const onClick = () => isClick.value && (visible.value = !visible.value);
6056
+ const onClick = () => {
6057
+ if (disabled.value) {
6058
+ return;
6059
+ }
6060
+ isClick.value && (visible.value = !visible.value);
6061
+ };
5969
6062
  const enter = lodash.exports.debounce(() => {
5970
6063
  isEnter.value && (visible.value = true);
5971
6064
  }, mouseEnterDelay.value);
@@ -5973,6 +6066,9 @@ function usePopoverEvent(props, visible, origin) {
5973
6066
  !isEnter.value && (visible.value = false);
5974
6067
  }, mouseLeaveDelay.value);
5975
6068
  const onMouseenter = () => {
6069
+ if (disabled.value) {
6070
+ return;
6071
+ }
5976
6072
  if (!isClick.value) {
5977
6073
  isEnter.value = true;
5978
6074
  enter();
@@ -5984,6 +6080,15 @@ function usePopoverEvent(props, visible, origin) {
5984
6080
  leave();
5985
6081
  }
5986
6082
  };
6083
+ const quickLeave = () => {
6084
+ isEnter.value = false;
6085
+ visible.value = false;
6086
+ };
6087
+ watch(disabled, (newVal) => {
6088
+ if (newVal && visible.value) {
6089
+ quickLeave();
6090
+ }
6091
+ });
5987
6092
  const handlePositionChange = (pos) => {
5988
6093
  placement.value = pos.split("-")[0];
5989
6094
  };
@@ -5995,11 +6100,12 @@ function usePopoverEvent(props, visible, origin) {
5995
6100
  origin.value.addEventListener("mouseleave", onMouseleave);
5996
6101
  }
5997
6102
  });
5998
- return { placement, handlePositionChange };
6103
+ return { placement, handlePositionChange, onMouseenter, onMouseleave };
5999
6104
  }
6000
- function SuccessIcon() {
6105
+ const ns = useNamespace("popover");
6106
+ function SuccessIcon$1() {
6001
6107
  return createVNode("svg", {
6002
- "class": "devui-icon devui-icon-success",
6108
+ "class": [ns.e("icon"), ns.em("icon", "success")],
6003
6109
  "viewBox": "0 0 16 16",
6004
6110
  "version": "1.1",
6005
6111
  "xmlns": "http://www.w3.org/2000/svg"
@@ -6023,7 +6129,7 @@ function SuccessIcon() {
6023
6129
  }
6024
6130
  function WarningIcon() {
6025
6131
  return createVNode("svg", {
6026
- "class": "devui-icon devui-icon-warning",
6132
+ "class": [ns.e("icon"), ns.em("icon", "warning")],
6027
6133
  "viewBox": "0 0 16 16",
6028
6134
  "version": "1.1",
6029
6135
  "xmlns": "http://www.w3.org/2000/svg"
@@ -6033,14 +6139,14 @@ function WarningIcon() {
6033
6139
  "fill": "none",
6034
6140
  "fill-rule": "evenodd"
6035
6141
  }, [createVNode("polygon", {
6036
- "points": "7.5 1.74501946 1.39184847 13.5954649 7.08947368 14.2207621 13.9973698 13.5954649 10.9383683 5.61273879 8.40084114 1.27624313"
6142
+ "points": "7.5 1.74501946 1.39184847 13.5954649 7.08947368 14.2207621 13.9973698 13.5954649 10.9383683 5.61273879 8.40084114 1.27624313"
6037
6143
  }, null), createVNode("path", {
6038
- "d": "M8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 Z M8.87894737,11.2105263 L7.08947368,11.2105263 L7.08947368,13 L8.87894737,13 L8.87894737,11.2105263 Z M8.96842105,4.5 L7,4.5 L7.08947368,9.86842105 L8.87894737,9.86842105 L8.96842105,4.5 Z"
6144
+ "d": "M8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 Z M8.87894737,11.2105263 L7.08947368,11.2105263 L7.08947368,13 L8.87894737,13 L8.87894737,11.2105263 Z M8.96842105,4.5 L7,4.5 L7.08947368,9.86842105 L8.87894737,9.86842105 L8.96842105,4.5 Z"
6039
6145
  }, null)])]);
6040
6146
  }
6041
6147
  function InfoIcon() {
6042
6148
  return createVNode("svg", {
6043
- "class": "devui-icon devui-icon-info",
6149
+ "class": [ns.e("icon"), ns.em("icon", "info")],
6044
6150
  "viewBox": "0 0 16 16",
6045
6151
  "version": "1.1",
6046
6152
  "xmlns": "http://www.w3.org/2000/svg"
@@ -6056,12 +6162,12 @@ function InfoIcon() {
6056
6162
  }, null), createVNode("g", {
6057
6163
  "stroke-width": "1"
6058
6164
  }, [createVNode("path", {
6059
- "d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,5 L7,5 L7,3 L9,3 L9,5 Z M9,12.6 L7,12.6 L7,6.6 L9,6.6 L9,12.6 Z"
6165
+ "d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,5 L7,5 L7,3 L9,3 L9,5 Z M9,12.6 L7,12.6 L7,6.6 L9,6.6 L9,12.6 Z"
6060
6166
  }, null)])])]);
6061
6167
  }
6062
- function ErrorIcon() {
6168
+ function ErrorIcon$1() {
6063
6169
  return createVNode("svg", {
6064
- "class": "devui-icon devui-icon-error",
6170
+ "class": [ns.e("icon"), ns.em("icon", "error")],
6065
6171
  "width": "16px",
6066
6172
  "height": "16px",
6067
6173
  "viewBox": "0 0 16 16",
@@ -6077,7 +6183,7 @@ function ErrorIcon() {
6077
6183
  "cy": "8",
6078
6184
  "r": "7"
6079
6185
  }, null), createVNode("path", {
6080
- "d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z",
6186
+ "d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z",
6081
6187
  "fill-rule": "nonzero"
6082
6188
  }, null)])]);
6083
6189
  }
@@ -6090,9 +6196,10 @@ var PopoverIcon = defineComponent({
6090
6196
  }
6091
6197
  },
6092
6198
  setup(props) {
6199
+ const ns2 = useNamespace("popover");
6093
6200
  return () => props.type && props.type !== "default" && createVNode("span", {
6094
- "class": "devui-popover-icon"
6095
- }, [props.type === "success" && createVNode(SuccessIcon, null, null), props.type === "warning" && createVNode(WarningIcon, null, null), props.type === "info" && createVNode(InfoIcon, null, null), props.type === "error" && createVNode(ErrorIcon, null, null)]);
6201
+ "class": ns2.e("icon-wrap")
6202
+ }, [props.type === "success" && createVNode(SuccessIcon$1, null, null), props.type === "warning" && createVNode(WarningIcon, null, null), props.type === "info" && createVNode(InfoIcon, null, null), props.type === "error" && createVNode(ErrorIcon$1, null, null)]);
6096
6203
  }
6097
6204
  });
6098
6205
  var popover = "";
@@ -6100,9 +6207,11 @@ var Popover = defineComponent({
6100
6207
  name: "DPopover",
6101
6208
  inheritAttrs: false,
6102
6209
  props: popoverProps,
6210
+ emits: ["show", "hide"],
6103
6211
  setup(props, {
6104
6212
  slots,
6105
- attrs
6213
+ attrs,
6214
+ emit
6106
6215
  }) {
6107
6216
  const {
6108
6217
  content,
@@ -6117,47 +6226,61 @@ var Popover = defineComponent({
6117
6226
  const visible = ref(false);
6118
6227
  const {
6119
6228
  placement,
6120
- handlePositionChange
6229
+ handlePositionChange,
6230
+ onMouseenter,
6231
+ onMouseleave
6121
6232
  } = usePopoverEvent(props, visible, origin);
6122
6233
  const {
6123
6234
  overlayStyles
6124
6235
  } = usePopover(props, visible, placement, origin, popoverRef);
6125
- return () => {
6126
- var _a;
6127
- return createVNode(Fragment, null, [createVNode("div", {
6128
- "ref": origin,
6129
- "class": "devui-popover-reference"
6130
- }, [(_a = slots.reference) == null ? void 0 : _a.call(slots)]), createVNode(Teleport, {
6131
- "to": "body"
6236
+ const ns2 = useNamespace("popover");
6237
+ provide(POPPER_TRIGGER_TOKEN, origin);
6238
+ watch(visible, (newVal) => {
6239
+ if (newVal) {
6240
+ emit("show");
6241
+ } else {
6242
+ emit("hide");
6243
+ }
6244
+ });
6245
+ return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
6246
+ default: () => {
6247
+ var _a;
6248
+ return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
6249
+ }
6250
+ }), createVNode(Teleport, {
6251
+ "to": "body"
6252
+ }, {
6253
+ default: () => [createVNode(Transition, {
6254
+ "name": showAnimation.value ? ns2.m(`fade-${placement.value}`) : ""
6132
6255
  }, {
6133
- default: () => [createVNode(Transition, {
6134
- "name": showAnimation.value ? `devui-popover-fade-${placement.value}` : ""
6135
- }, {
6136
- default: () => [createVNode(FlexibleOverlay, mergeProps({
6137
- "modelValue": visible.value,
6138
- "onUpdate:modelValue": ($event) => visible.value = $event,
6139
- "ref": popoverRef,
6140
- "origin": origin.value,
6141
- "position": position.value,
6142
- "align": align.value,
6143
- "offset": offset2.value,
6144
- "class": ["devui-popover-content", popType.value !== "default" ? "is-icon" : ""],
6145
- "show-arrow": true,
6146
- "is-arrow-center": false,
6147
- "style": overlayStyles.value
6148
- }, attrs, {
6149
- "onPositionChange": handlePositionChange
6150
- }), {
6151
- default: () => {
6152
- var _a2;
6153
- return [createVNode(PopoverIcon, {
6154
- "type": popType.value
6155
- }, null), ((_a2 = slots.content) == null ? void 0 : _a2.call(slots)) || createVNode("span", null, [content.value])];
6156
- }
6157
- })]
6256
+ default: () => [createVNode(FlexibleOverlay, mergeProps({
6257
+ "modelValue": visible.value,
6258
+ "onUpdate:modelValue": ($event) => visible.value = $event,
6259
+ "ref": popoverRef,
6260
+ "origin": origin.value,
6261
+ "position": position.value,
6262
+ "align": align.value,
6263
+ "offset": offset2.value,
6264
+ "class": [ns2.e("content"), popType.value !== "default" ? "is-icon" : ""],
6265
+ "show-arrow": true,
6266
+ "is-arrow-center": false,
6267
+ "style": overlayStyles.value
6268
+ }, attrs, {
6269
+ "onPositionChange": handlePositionChange,
6270
+ "onClick": withModifiers(() => ({}), ["stop"]),
6271
+ "onPointerup": withModifiers(() => ({}), ["stop"]),
6272
+ "onMouseenter": onMouseenter,
6273
+ "onMouseleave": onMouseleave
6274
+ }), {
6275
+ default: () => {
6276
+ var _a;
6277
+ return [createVNode(PopoverIcon, {
6278
+ "type": popType.value
6279
+ }, null), ((_a = slots.content) == null ? void 0 : _a.call(slots)) || createVNode("span", null, [content.value])];
6280
+ }
6158
6281
  })]
6159
- })]);
6160
- };
6282
+ })]
6283
+ })]);
6161
6284
  }
6162
6285
  });
6163
6286
  function HelpTipsIcon() {
@@ -6176,43 +6299,74 @@ function HelpTipsIcon() {
6176
6299
  "fill-rule": "nonzero"
6177
6300
  }, null)])])]);
6178
6301
  }
6179
- const formItemProps = {
6180
- field: {
6181
- type: String,
6182
- default: ""
6183
- },
6184
- dHasFeedback: {
6185
- type: Boolean,
6186
- default: false
6187
- },
6188
- required: {
6189
- type: Boolean,
6190
- default: false
6191
- },
6192
- messageType: {
6193
- type: String
6194
- },
6195
- popPosition: {
6196
- type: Array
6197
- },
6198
- rules: {
6199
- type: [Object, Array]
6200
- }
6201
- };
6202
- const FORM_ITEM_TOKEN = Symbol("dFormItem");
6302
+ function ErrorIcon() {
6303
+ return createVNode("svg", {
6304
+ "width": "14px",
6305
+ "height": "14px",
6306
+ "viewBox": "0 0 16 16"
6307
+ }, [createVNode("g", {
6308
+ "stroke": "none",
6309
+ "stroke-width": "1",
6310
+ "fill": "none",
6311
+ "fill-rule": "evenodd"
6312
+ }, [createVNode("circle", {
6313
+ "cx": "8",
6314
+ "cy": "8",
6315
+ "r": "8"
6316
+ }, null), createVNode("polygon", {
6317
+ "points": "8.07106781 6.65685425 10.8994949 3.82842712 12.3137085 5.24264069 9.48528137 8.07106781 12.3137085 10.8994949 10.8994949 12.3137085 8.07106781 9.48528137 5.24264069 12.3137085 3.82842712 10.8994949 6.65685425 8.07106781 3.82842712 5.24264069 5.24264069 3.82842712"
6318
+ }, null)])]);
6319
+ }
6320
+ function SuccessIcon() {
6321
+ return createVNode("svg", {
6322
+ "width": "14px",
6323
+ "height": "14px",
6324
+ "viewBox": "0 0 16 16"
6325
+ }, [createVNode("g", {
6326
+ "stroke": "none",
6327
+ "stroke-width": "1",
6328
+ "fill": "none",
6329
+ "fill-rule": "evenodd"
6330
+ }, [createVNode("circle", {
6331
+ "cx": "8",
6332
+ "cy": "8",
6333
+ "r": "8"
6334
+ }, null), createVNode("polygon", {
6335
+ "points": "6.53553391 9.77817459 12.1923882 4.12132034 13.6066017 5.53553391 6.53553391 12.6066017 3 9.07106781 4.41421356 7.65685425 6.53553391 9.77817459"
6336
+ }, null)])]);
6337
+ }
6338
+ function PendingIcon() {
6339
+ return createVNode("svg", {
6340
+ "width": "14px",
6341
+ "height": "14px",
6342
+ "viewBox": "0 0 16 16"
6343
+ }, [createVNode("g", {
6344
+ "id": "loading",
6345
+ "stroke": "none",
6346
+ "stroke-width": "1",
6347
+ "fill": "none",
6348
+ "fill-rule": "evenodd"
6349
+ }, [createVNode("path", {
6350
+ "d": "M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z M8,1 C4.15,1 1,4.15 1,8 C1,11.85 4.15,15 8,15 C11.85,15 15,11.85 15,8 C15,4.15 11.85,1 8,1 Z",
6351
+ "fill-rule": "nonzero"
6352
+ }, null), createVNode("path", {
6353
+ "d": "M8,0 C12.4,0 16,3.6 16,8 L15,8 C15,4.15 11.85,1 8,1 L8,0 Z",
6354
+ "fill-rule": "nonzero"
6355
+ }, null)])]);
6356
+ }
6203
6357
  function useFormLabel() {
6204
- const formContext = inject(FORM_TOKEN);
6205
6358
  const formItemContext = inject(FORM_ITEM_TOKEN);
6206
- const ns = useNamespace("form");
6359
+ const labelData = inject(LABEL_DATA);
6360
+ const ns2 = useNamespace("form");
6207
6361
  const labelClasses = computed(() => ({
6208
- [`${ns.e("label")}`]: true,
6209
- [`${ns.em("label", "vertical")}`]: formContext.layout === "vertical",
6210
- [`${ns.em("label", formContext.labelSize)}`]: formContext.layout === "horizontal",
6211
- [`${ns.em("label", formContext.labelAlign)}`]: formContext.layout === "horizontal"
6362
+ [`${ns2.e("label")}`]: true,
6363
+ [`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
6364
+ [`${ns2.em("label", labelData.value.labelSize)}`]: labelData.value.layout === "horizontal",
6365
+ [`${ns2.em("label", labelData.value.labelAlign)}`]: labelData.value.layout === "horizontal"
6212
6366
  }));
6213
6367
  const labelInnerClasses = computed(() => ({
6214
- [`${ns.e("label-span")}`]: true,
6215
- [`${ns.em("label", "required")}`]: formItemContext.isRequired
6368
+ [`${ns2.e("label-span")}`]: true,
6369
+ [`${ns2.em("label", "required")}`]: formItemContext.isRequired
6216
6370
  }));
6217
6371
  return { labelClasses, labelInnerClasses };
6218
6372
  }
@@ -6221,7 +6375,7 @@ var FormLabel = defineComponent({
6221
6375
  name: "DFormLabel",
6222
6376
  props: formLabelProps,
6223
6377
  setup(props, ctx) {
6224
- const ns = useNamespace("form");
6378
+ const ns2 = useNamespace("form");
6225
6379
  const {
6226
6380
  labelClasses,
6227
6381
  labelInnerClasses
@@ -6238,13 +6392,96 @@ var FormLabel = defineComponent({
6238
6392
  "trigger": "hover",
6239
6393
  "pop-type": "info"
6240
6394
  }, {
6241
- reference: () => createVNode(HelpTipsIcon, {
6242
- "class": ns.e("label-help")
6243
- }, null)
6395
+ default: () => [createVNode(HelpTipsIcon, {
6396
+ "class": ns2.e("label-help")
6397
+ }, null), createTextVNode(",")]
6244
6398
  })]);
6245
6399
  };
6246
6400
  }
6247
6401
  });
6402
+ const formControlProps = {
6403
+ feedbackStatus: {
6404
+ type: String
6405
+ },
6406
+ extraInfo: {
6407
+ type: String,
6408
+ default: ""
6409
+ }
6410
+ };
6411
+ function useFormControl(props) {
6412
+ const labelData = inject(LABEL_DATA);
6413
+ const ns2 = useNamespace("form");
6414
+ const { feedbackStatus } = toRefs(props);
6415
+ const controlClasses = computed(() => ({
6416
+ [ns2.e("control")]: true,
6417
+ [ns2.em("control", "horizontal")]: labelData.value.layout === "horizontal"
6418
+ }));
6419
+ const controlContainerClasses = computed(() => ({
6420
+ [ns2.e("control-container")]: true,
6421
+ [ns2.em("control-container", "horizontal")]: labelData.value.layout === "horizontal",
6422
+ [ns2.em("control-container", "has-feedback")]: Boolean(feedbackStatus == null ? void 0 : feedbackStatus.value),
6423
+ [ns2.em("control-container", "feedback-error")]: Boolean((feedbackStatus == null ? void 0 : feedbackStatus.value) === "error")
6424
+ }));
6425
+ return { controlClasses, controlContainerClasses };
6426
+ }
6427
+ function useFormControlValidate() {
6428
+ const formItemContext = inject(FORM_ITEM_TOKEN);
6429
+ const feedbackStatus = computed(() => formItemContext.validateState);
6430
+ const showFeedback = computed(() => formItemContext.showFeedback && Boolean(formItemContext.validateState));
6431
+ const showPopover = computed(() => formItemContext.messageType === "popover" && formItemContext.validateState === "error");
6432
+ const showMessage = computed(() => formItemContext.messageType === "text" && formItemContext.validateState === "error");
6433
+ const errorMessage = computed(() => formItemContext.validateMessage);
6434
+ const popPosition = computed(() => formItemContext.popPosition);
6435
+ return { feedbackStatus, showFeedback, showPopover, showMessage, errorMessage, popPosition };
6436
+ }
6437
+ var formControl = "";
6438
+ var FormControl = defineComponent({
6439
+ name: "DFormControl",
6440
+ props: formControlProps,
6441
+ setup(props, ctx) {
6442
+ const formControl2 = ref();
6443
+ const ns2 = useNamespace("form");
6444
+ const {
6445
+ controlClasses,
6446
+ controlContainerClasses
6447
+ } = useFormControl(props);
6448
+ const {
6449
+ feedbackStatus,
6450
+ showFeedback,
6451
+ showPopover,
6452
+ showMessage,
6453
+ errorMessage,
6454
+ popPosition
6455
+ } = useFormControlValidate();
6456
+ return () => createVNode("div", {
6457
+ "class": controlClasses.value,
6458
+ "ref": formControl2
6459
+ }, [createVNode("div", {
6460
+ "class": controlContainerClasses.value
6461
+ }, [createVNode(Popover, {
6462
+ "is-open": showPopover.value,
6463
+ "trigger": "manually",
6464
+ "content": errorMessage.value,
6465
+ "pop-type": "error",
6466
+ "position": popPosition.value
6467
+ }, {
6468
+ default: () => {
6469
+ var _a, _b;
6470
+ return [createVNode("div", {
6471
+ "class": ns2.e("control-content")
6472
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]), createTextVNode(",")];
6473
+ }
6474
+ }), showFeedback.value && createVNode("span", {
6475
+ "class": [ns2.e("feedback-icon"), ns2.em("feedback-icon", feedbackStatus.value)]
6476
+ }, [feedbackStatus.value === "error" && createVNode(ErrorIcon, null, null), feedbackStatus.value === "success" && createVNode(SuccessIcon, null, null), feedbackStatus.value === "pending" && createVNode(PendingIcon, null, null)])]), createVNode("div", {
6477
+ "class": ns2.e("control-info")
6478
+ }, [showMessage.value && createVNode("div", {
6479
+ "class": "error-message"
6480
+ }, [errorMessage.value]), props.extraInfo && createVNode("div", {
6481
+ "class": ns2.e("control-extra")
6482
+ }, [props.extraInfo])])]);
6483
+ }
6484
+ });
6248
6485
  function _extends() {
6249
6486
  _extends = Object.assign || function(target) {
6250
6487
  for (var i = 1; i < arguments.length; i++) {
@@ -7247,13 +7484,23 @@ Schema.register = function register(type4, validator) {
7247
7484
  Schema.warning = warning;
7248
7485
  Schema.messages = messages;
7249
7486
  Schema.validators = validators;
7487
+ function getFieldValue(obj, path) {
7488
+ return {
7489
+ get value() {
7490
+ return lodash.exports.get(obj, path);
7491
+ },
7492
+ set value(val) {
7493
+ lodash.exports.set(obj, path, val);
7494
+ }
7495
+ };
7496
+ }
7250
7497
  function useFormItem(messageType, _rules, validateState) {
7251
7498
  const formContext = inject(FORM_TOKEN);
7252
- const ns = useNamespace("form");
7499
+ const ns2 = useNamespace("form");
7253
7500
  const itemClasses = computed(() => ({
7254
- [`${ns.em("item", "horizontal")}`]: formContext.layout === "horizontal",
7255
- [`${ns.em("item", "vertical")}`]: formContext.layout === "vertical",
7256
- [`${ns.em("item", "error")}`]: messageType.value === "text" && validateState.value === "error"
7501
+ [`${ns2.em("item", "horizontal")}`]: formContext.layout === "horizontal",
7502
+ [`${ns2.em("item", "vertical")}`]: formContext.layout === "vertical",
7503
+ [`${ns2.em("item", "error")}`]: messageType.value === "text" && validateState.value === "error"
7257
7504
  }));
7258
7505
  const isRequired = computed(() => _rules.value.some((rule) => Boolean(rule.required)));
7259
7506
  return { itemClasses, isRequired };
@@ -7280,6 +7527,8 @@ function useFormItemValidate(props, _rules) {
7280
7527
  const formContext = inject(FORM_TOKEN);
7281
7528
  const validateState = ref("");
7282
7529
  const validateMessage = ref("");
7530
+ let initFieldValue = void 0;
7531
+ let isResetting = false;
7283
7532
  const computedField = computed(() => {
7284
7533
  return typeof props.field === "string" ? props.field : "";
7285
7534
  });
@@ -7288,7 +7537,7 @@ function useFormItemValidate(props, _rules) {
7288
7537
  if (!formData || !props.field) {
7289
7538
  return;
7290
7539
  }
7291
- return formData[props.field];
7540
+ return getFieldValue(formData, props.field).value;
7292
7541
  });
7293
7542
  const getRuleByTrigger = (triggerVal) => {
7294
7543
  return _rules.value.filter((rule) => {
@@ -7301,18 +7550,20 @@ function useFormItemValidate(props, _rules) {
7301
7550
  return rule.trigger === triggerVal;
7302
7551
  }
7303
7552
  }).map((_a) => {
7304
- var _b = _a, { trigger } = _b, rule = __objRest(_b, ["trigger"]);
7553
+ var rule = __objRest(_a, []);
7305
7554
  return rule;
7306
7555
  });
7307
7556
  };
7308
7557
  const onValidateSuccess = () => {
7309
7558
  validateState.value = "success";
7310
7559
  validateMessage.value = "";
7560
+ formContext.emit("validate", props.field, true, "");
7311
7561
  };
7312
7562
  const onValidateError = ({ errors }) => {
7313
7563
  var _a;
7314
7564
  validateState.value = "error";
7315
7565
  validateMessage.value = ((_a = errors == null ? void 0 : errors[0]) == null ? void 0 : _a.message) || "";
7566
+ formContext.emit("validate", props.field, false, validateMessage.value);
7316
7567
  };
7317
7568
  const execValidate = async (rules2) => {
7318
7569
  const ruleName = computedField.value;
@@ -7328,6 +7579,10 @@ function useFormItemValidate(props, _rules) {
7328
7579
  });
7329
7580
  };
7330
7581
  const validate = async (trigger, callback) => {
7582
+ if (isResetting) {
7583
+ isResetting = false;
7584
+ return false;
7585
+ }
7331
7586
  const rules2 = getRuleByTrigger(trigger);
7332
7587
  if (!rules2.length) {
7333
7588
  callback == null ? void 0 : callback(true);
@@ -7343,7 +7598,26 @@ function useFormItemValidate(props, _rules) {
7343
7598
  return lodash.exports.isFunction(callback) ? false : Promise.reject(fields);
7344
7599
  });
7345
7600
  };
7346
- return { validateState, validateMessage, validate };
7601
+ const clearValidate = () => {
7602
+ validateState.value = "";
7603
+ validateMessage.value = "";
7604
+ };
7605
+ const resetField = async () => {
7606
+ if (!formContext.data || !props.field) {
7607
+ return;
7608
+ }
7609
+ const currentValue = getFieldValue(formContext.data, props.field);
7610
+ if (!lodash.exports.isEqual(currentValue.value, initFieldValue)) {
7611
+ isResetting = true;
7612
+ }
7613
+ currentValue.value = initFieldValue;
7614
+ await nextTick();
7615
+ clearValidate();
7616
+ };
7617
+ onMounted(() => {
7618
+ initFieldValue = lodash.exports.clone(fieldValue.value);
7619
+ });
7620
+ return { validateState, validateMessage, validate, resetField, clearValidate };
7347
7621
  }
7348
7622
  var formItem = "";
7349
7623
  var FormItem = defineComponent({
@@ -7353,11 +7627,20 @@ var FormItem = defineComponent({
7353
7627
  const formContext = inject(FORM_TOKEN);
7354
7628
  const _a = toRefs(props), {
7355
7629
  messageType: itemMessageType,
7356
- popPosition: itemPopPosition
7630
+ popPosition: itemPopPosition,
7631
+ showFeedback: itemShowFeedback
7357
7632
  } = _a, otherProps = __objRest(_a, [
7358
7633
  "messageType",
7359
- "popPosition"
7634
+ "popPosition",
7635
+ "showFeedback"
7360
7636
  ]);
7637
+ const {
7638
+ label,
7639
+ helpTips,
7640
+ feedbackStatus,
7641
+ extraInfo
7642
+ } = toRefs(props);
7643
+ const showFeedback = computed(() => (itemShowFeedback == null ? void 0 : itemShowFeedback.value) !== void 0 ? itemShowFeedback.value : formContext.showFeedback);
7361
7644
  const messageType = computed(() => (itemMessageType == null ? void 0 : itemMessageType.value) || formContext.messageType);
7362
7645
  const popPosition = computed(() => (itemPopPosition == null ? void 0 : itemPopPosition.value) || formContext.popPosition);
7363
7646
  const {
@@ -7366,21 +7649,36 @@ var FormItem = defineComponent({
7366
7649
  const {
7367
7650
  validateState,
7368
7651
  validateMessage,
7369
- validate
7652
+ validate,
7653
+ resetField,
7654
+ clearValidate
7370
7655
  } = useFormItemValidate(props, _rules);
7371
7656
  const {
7372
7657
  itemClasses,
7373
7658
  isRequired
7374
7659
  } = useFormItem(messageType, _rules, validateState);
7660
+ const labelData = computed(() => ({
7661
+ layout: formContext.layout,
7662
+ labelSize: formContext.labelSize,
7663
+ labelAlign: formContext.labelAlign
7664
+ }));
7665
+ provide(LABEL_DATA, labelData);
7375
7666
  const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
7667
+ showFeedback,
7376
7668
  messageType,
7377
7669
  popPosition,
7378
7670
  isRequired,
7379
7671
  validateState,
7380
7672
  validateMessage,
7381
- validate
7673
+ validate,
7674
+ resetField,
7675
+ clearValidate
7382
7676
  }));
7383
7677
  provide(FORM_ITEM_TOKEN, context);
7678
+ ctx.expose({
7679
+ resetField,
7680
+ clearValidate
7681
+ });
7384
7682
  onMounted(() => {
7385
7683
  if (props.field) {
7386
7684
  formContext == null ? void 0 : formContext.addItemContext(context);
@@ -7389,89 +7687,21 @@ var FormItem = defineComponent({
7389
7687
  onBeforeUnmount(() => {
7390
7688
  formContext == null ? void 0 : formContext.removeItemContext(context);
7391
7689
  });
7392
- return () => {
7393
- var _a2, _b;
7394
- return createVNode("div", {
7395
- "class": itemClasses.value
7396
- }, [(_b = (_a2 = ctx.slots).default) == null ? void 0 : _b.call(_a2)]);
7397
- };
7398
- }
7399
- });
7400
- const formControlProps = {
7401
- feedbackStatus: {
7402
- type: String
7403
- },
7404
- extraInfo: {
7405
- type: String,
7406
- default: ""
7407
- }
7408
- };
7409
- function useFormControl(props) {
7410
- const formContext = inject(FORM_TOKEN);
7411
- const ns = useNamespace("form");
7412
- const { feedbackStatus } = toRefs(props);
7413
- const controlClasses = computed(() => ({
7414
- [`${ns.e("control")}`]: true,
7415
- [`${ns.em("control", "horizontal")}`]: formContext.layout === "horizontal"
7416
- }));
7417
- const controlContainerClasses = computed(() => ({
7418
- [`${ns.e("control-container")}`]: true,
7419
- [`${ns.em("control-container", "horizontal")}`]: formContext.layout === "horizontal",
7420
- [`${ns.em("control-container", "has-feedback")}`]: Boolean(feedbackStatus.value),
7421
- [`${ns.em("control-container", "feedback-error")}`]: Boolean(feedbackStatus.value === "error")
7422
- }));
7423
- return { controlClasses, controlContainerClasses };
7424
- }
7425
- function useFormControlValidate() {
7426
- const formItemContext = inject(FORM_ITEM_TOKEN);
7427
- const showPopover = computed(() => formItemContext.messageType === "popover" && formItemContext.validateState === "error");
7428
- const showMessage = computed(() => formItemContext.messageType === "text" && formItemContext.validateState === "error");
7429
- const errorMessage = computed(() => formItemContext.validateMessage);
7430
- const popPosition = computed(() => formItemContext.popPosition);
7431
- return { showPopover, showMessage, errorMessage, popPosition };
7432
- }
7433
- var formControl = "";
7434
- var FormControl = defineComponent({
7435
- name: "DFormControl",
7436
- props: formControlProps,
7437
- setup(props, ctx) {
7438
- const formControl2 = ref();
7439
- const ns = useNamespace("form");
7440
- const {
7441
- controlClasses,
7442
- controlContainerClasses
7443
- } = useFormControl(props);
7444
- const {
7445
- showPopover,
7446
- showMessage,
7447
- errorMessage,
7448
- popPosition
7449
- } = useFormControlValidate();
7450
7690
  return () => createVNode("div", {
7451
- "class": controlClasses.value,
7452
- "ref": formControl2
7453
- }, [createVNode("div", {
7454
- "class": controlContainerClasses.value
7455
- }, [createVNode(Popover, {
7456
- "is-open": showPopover.value,
7457
- "trigger": "manually",
7458
- "content": errorMessage.value,
7459
- "pop-type": "error",
7460
- "position": popPosition.value
7691
+ "class": itemClasses.value
7692
+ }, [createVNode(FormLabel, {
7693
+ "help-tips": helpTips.value
7461
7694
  }, {
7462
- reference: () => {
7463
- var _a, _b;
7464
- return createVNode("div", {
7465
- "class": ns.e("control-content")
7466
- }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
7695
+ default: () => [label == null ? void 0 : label.value]
7696
+ }), createVNode(FormControl, {
7697
+ "feedback-status": feedbackStatus == null ? void 0 : feedbackStatus.value,
7698
+ "extra-info": extraInfo.value
7699
+ }, {
7700
+ default: () => {
7701
+ var _a2, _b;
7702
+ return [(_b = (_a2 = ctx.slots).default) == null ? void 0 : _b.call(_a2)];
7467
7703
  }
7468
- })]), createVNode("div", {
7469
- "class": ns.e("control-info")
7470
- }, [showMessage.value && createVNode("div", {
7471
- "class": "error-message"
7472
- }, [errorMessage.value]), props.extraInfo && createVNode("div", {
7473
- "class": ns.e("control-extra")
7474
- }, [props.extraInfo])])]);
7704
+ })]);
7475
7705
  }
7476
7706
  });
7477
7707
  var formOperation = "";
@@ -7502,10 +7732,8 @@ var index = {
7502
7732
  status: "75%",
7503
7733
  install(app) {
7504
7734
  app.component(Form.name, Form);
7505
- app.component(FormLabel.name, FormLabel);
7506
7735
  app.component(FormItem.name, FormItem);
7507
- app.component(FormControl.name, FormControl);
7508
7736
  app.component(FormOperation.name, FormOperation);
7509
7737
  }
7510
7738
  };
7511
- export { FORM_ITEM_TOKEN, FORM_TOKEN, Form, FormControl, FormItem, FormLabel, FormOperation, index as default, formControlProps, formItemProps, formProps };
7739
+ export { FORM_ITEM_TOKEN, FORM_TOKEN, Form, FormItem, FormOperation, LABEL_DATA, index as default, formItemProps, formProps };