fit2cloud-ui-plus 0.0.1-beta.8 → 1.0.0-beta.2

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 (226) hide show
  1. package/README.md +61 -9
  2. package/lib/fit2cloud-ui-plus.es.js +1438 -533
  3. package/lib/fit2cloud-ui-plus.umd.js +1 -1
  4. package/package.json +10 -5
  5. package/src/components/filter-bar/FuFilter.vue +36 -22
  6. package/src/components/filter-bar/FuFilterBar.vue +31 -17
  7. package/src/components/filter-bar/FuFilterInput.vue +48 -0
  8. package/src/components/filter-bar/filter-components/FuFilterDate.vue +13 -5
  9. package/src/components/filter-bar/filter-components/FuFilterDateTime.vue +17 -14
  10. package/src/components/filter-bar/filter-components/FuFilterSelect.vue +19 -13
  11. package/src/components/filter-bar/index.ts +11 -12
  12. package/src/components/icon-button/FuIconButton.vue +54 -0
  13. package/src/components/icon-button/index.ts +9 -0
  14. package/src/components/read-write-switch/FuSelectRwSwitch.vue +23 -10
  15. package/src/components/search-bar/FuComplexSearch.vue +104 -0
  16. package/src/components/search-bar/FuQuickSearch.vue +64 -0
  17. package/src/components/search-bar/FuSearchBar.vue +153 -0
  18. package/src/components/search-bar/FuSearchBarButton.vue +23 -0
  19. package/src/components/search-bar/FuSearchContions.vue +40 -0
  20. package/src/components/search-bar/complex-components/FuComplexDate.vue +70 -0
  21. package/src/components/search-bar/complex-components/FuComplexDateTime.vue +74 -0
  22. package/src/components/search-bar/complex-components/FuComplexInput.vue +57 -0
  23. package/src/components/search-bar/complex-components/FuComplexSelect.vue +93 -0
  24. package/src/components/search-bar/index.ts +20 -0
  25. package/src/components/search-bar/types.ts +23 -0
  26. package/src/components/speed-dial/FuSpeedDial.vue +71 -60
  27. package/src/components/speed-dial/FuSpeedDialActionButton.vue +55 -55
  28. package/src/components/speed-dial/FuSpeedDialButton.vue +14 -11
  29. package/src/components/speed-dial/FuSpeedDialItem.vue +9 -15
  30. package/src/components/speed-dial/types.ts +12 -0
  31. package/src/components/split-pane/FuSplitPane.vue +2 -2
  32. package/src/components/table/FuTable.vue +12 -13
  33. package/src/components/table/{table-column-dropdown/FuTableColumnDropdown.vue → FuTableColumnDropdown.vue} +0 -0
  34. package/src/components/table/index.ts +11 -7
  35. package/src/components/table/table-column-select/FuTableColumnSelectDialog.vue +3 -9
  36. package/src/components/table/table-column-select/FuTableColumnSelectPopover.vue +4 -3
  37. package/src/components/table/table-operations/FuTableButton.vue +1 -4
  38. package/src/components/table/table-operations/FuTableMoreButton.vue +1 -1
  39. package/src/components/table/table-operations/FuTableOperations.vue +1 -2
  40. package/src/components/table/types.ts +3 -0
  41. package/src/components/tabs/FuTabs.vue +4 -3
  42. package/src/hooks/index.ts +2 -1
  43. package/src/hooks/use-global-config/index.ts +25 -22
  44. package/src/hooks/use-locale/index.ts +1 -1
  45. package/src/hooks/use-size/index.ts +35 -0
  46. package/src/index.ts +5 -2
  47. package/src/styles/common/function.scss +14 -4
  48. package/src/styles/common/mixins.scss +9 -4
  49. package/src/styles/common/variables.scss +55 -18
  50. package/src/styles/components/filter-bar.scss +16 -16
  51. package/src/styles/components/icon-button.scss +66 -0
  52. package/src/styles/components/search-bar.scss +240 -0
  53. package/src/styles/components/speed-dial.scss +1 -51
  54. package/src/styles/components/table.scss +7 -9
  55. package/src/styles/index.scss +2 -0
  56. package/src/styles/themes/default.scss +91 -0
  57. package/src/tools/size.ts +6 -0
  58. package/src/tools/theme.ts +0 -12
  59. package/types/examples/App.vue.d.ts +2 -0
  60. package/types/examples/components/CodeExample.vue.d.ts +29 -0
  61. package/types/examples/components/DocumentTable.vue.d.ts +14 -0
  62. package/types/examples/components/Markdown.vue.d.ts +12 -0
  63. package/types/examples/layout/components/AppHeader.vue.d.ts +2 -0
  64. package/types/examples/layout/components/Sidebar.vue.d.ts +2 -0
  65. package/types/examples/layout/index.vue.d.ts +2 -0
  66. package/types/examples/main.d.ts +2 -0
  67. package/types/examples/pages/filter-bar/attributes.d.ts +63 -0
  68. package/types/examples/pages/filter-bar/demo/BaseFilterBar.vue.d.ts +2 -0
  69. package/types/examples/pages/filter-bar/demo/SetConditionsDemo.vue.d.ts +2 -0
  70. package/types/examples/pages/filter-bar/demo/SlotDemo.vue.d.ts +2 -0
  71. package/types/examples/pages/filter-bar/index.vue.d.ts +2 -0
  72. package/types/examples/pages/icon-button/attributes.d.ts +45 -0
  73. package/types/examples/pages/icon-button/demo/BaseIconButton.vue.d.ts +2 -0
  74. package/types/examples/pages/icon-button/demo/SlotDemo.vue.d.ts +2 -0
  75. package/types/examples/pages/icon-button/index.vue.d.ts +2 -0
  76. package/types/examples/pages/index.d.ts +3 -0
  77. package/types/examples/pages/read-write-switch/attributes.d.ts +63 -0
  78. package/types/examples/pages/read-write-switch/demo/BaseDemo.vue.d.ts +2 -0
  79. package/types/examples/pages/read-write-switch/demo/CustomContentDemo.vue.d.ts +2 -0
  80. package/types/examples/pages/read-write-switch/demo/InputRwSwitchDemo.vue.d.ts +2 -0
  81. package/types/examples/pages/read-write-switch/demo/ReadSwitchDemo.vue.d.ts +2 -0
  82. package/types/examples/pages/read-write-switch/demo/SelectRwSwitchDemo.vue.d.ts +2 -0
  83. package/types/examples/pages/read-write-switch/demo/TableInnerEditDemo.vue.d.ts +2 -0
  84. package/types/examples/pages/read-write-switch/demo/WriteSwitchDemo.vue.d.ts +2 -0
  85. package/types/examples/pages/read-write-switch/index.vue.d.ts +2 -0
  86. package/types/examples/pages/search/attributes.d.ts +57 -0
  87. package/types/examples/pages/search/demo/BaseSearchbar.vue.d.ts +66 -0
  88. package/types/examples/pages/search/demo/ComplexComponentsDemo.vue.d.ts +60 -0
  89. package/types/examples/pages/search/demo/ComplexSearchDemo.vue.d.ts +84 -0
  90. package/types/examples/pages/search/demo/CustomComponentsDemo.vue.d.ts +50 -0
  91. package/types/examples/pages/search/demo/EchoConditionsDemo.vue.d.ts +52 -0
  92. package/types/examples/pages/search/demo/QuickSearchDemo.vue.d.ts +18 -0
  93. package/types/examples/pages/search/demo/SearchBarButtonDemo.vue.d.ts +54 -0
  94. package/types/examples/pages/search/index.vue.d.ts +150 -0
  95. package/types/examples/pages/search-bar/attributes.d.ts +63 -0
  96. package/types/examples/pages/search-bar/demo/BaseSearchbar.vue.d.ts +31 -0
  97. package/types/examples/pages/search-bar/demo/ComplexSearchDemo.vue.d.ts +40 -0
  98. package/types/examples/pages/search-bar/demo/EchoConditionsDemo.vue.d.ts +32 -0
  99. package/types/examples/pages/search-bar/demo/QuickSearchDemo.vue.d.ts +7 -0
  100. package/types/examples/pages/search-bar/demo/SearchBarButtonDemo.vue.d.ts +32 -0
  101. package/types/examples/pages/search-bar/index.vue.d.ts +2 -0
  102. package/types/examples/pages/speed-dial/attributes.d.ts +63 -0
  103. package/types/examples/pages/speed-dial/demo/BaseSpeedDial.vue.d.ts +2 -0
  104. package/types/examples/pages/speed-dial/demo/SpeedDialCustom.vue.d.ts +2 -0
  105. package/types/examples/pages/speed-dial/demo/SpeedDialPosition.vue.d.ts +2 -0
  106. package/types/examples/pages/speed-dial/demo/SpeedDialTrigger.vue.d.ts +2 -0
  107. package/types/examples/pages/speed-dial/index.vue.d.ts +2 -0
  108. package/types/examples/pages/split-pane/attributes.d.ts +63 -0
  109. package/types/examples/pages/split-pane/demo/BaseSplit.vue.d.ts +2 -0
  110. package/types/examples/pages/split-pane/demo/CustomResizer.vue.d.ts +2 -0
  111. package/types/examples/pages/split-pane/demo/NestSplit.vue.d.ts +2 -0
  112. package/types/examples/pages/split-pane/demo/ResizerType.vue.d.ts +2 -0
  113. package/types/examples/pages/split-pane/index.vue.d.ts +2 -0
  114. package/types/examples/pages/table/attributes.d.ts +121 -0
  115. package/types/examples/pages/table/demo/BaseTable.vue.d.ts +2 -0
  116. package/types/examples/pages/table/demo/DropdownColumn.vue.d.ts +2 -0
  117. package/types/examples/pages/table/demo/DropdownColumnSlot.vue.d.ts +2 -0
  118. package/types/examples/pages/table/demo/SaveSelectColumn.vue.d.ts +2 -0
  119. package/types/examples/pages/table/demo/SelectColumn.vue.d.ts +2 -0
  120. package/types/examples/pages/table/demo/TableOperations.vue.d.ts +2 -0
  121. package/types/examples/pages/table/demo/TablePagination.vue.d.ts +2 -0
  122. package/types/examples/pages/table/index.vue.d.ts +2 -0
  123. package/types/examples/pages/tabs/attributes.d.ts +63 -0
  124. package/types/examples/pages/tabs/demo/AddCloseTab.vue.d.ts +2 -0
  125. package/types/examples/pages/tabs/index.vue.d.ts +2 -0
  126. package/types/examples/router/doc-routes.d.ts +12 -0
  127. package/types/examples/router/index.d.ts +4 -0
  128. package/types/examples/router/styles-routes.d.ts +12 -0
  129. package/types/examples/style-guide/button/BaseButton.vue.d.ts +2 -0
  130. package/types/examples/style-guide/button/IconButton.vue.d.ts +2 -0
  131. package/types/examples/style-guide/button/PlainButton.vue.d.ts +2 -0
  132. package/types/examples/style-guide/button/TextButton.vue.d.ts +2 -0
  133. package/types/examples/style-guide/button/index.vue.d.ts +2 -0
  134. package/types/examples/style-guide/input/BaseInput.vue.d.ts +2 -0
  135. package/types/examples/style-guide/input/SearchInput.vue.d.ts +2 -0
  136. package/types/examples/style-guide/input/Textarea.vue.d.ts +2 -0
  137. package/types/examples/style-guide/input/index.vue.d.ts +2 -0
  138. package/types/examples/style-guide/select/BaseSelect.vue.d.ts +2 -0
  139. package/types/examples/style-guide/select/index.vue.d.ts +2 -0
  140. package/types/plugins/example-transform.d.ts +5 -0
  141. package/types/src/components/filter-bar/FuFilter.vue.d.ts +42 -0
  142. package/types/src/components/filter-bar/FuFilterBar.vue.d.ts +33 -0
  143. package/types/src/components/filter-bar/FuFilterConditions.vue.d.ts +8 -0
  144. package/types/src/components/filter-bar/FuFilterInput.vue.d.ts +17 -0
  145. package/types/src/components/filter-bar/FuSearchInput.vue.d.ts +17 -0
  146. package/types/src/components/filter-bar/filter-components/FuFilterDate.vue.d.ts +36 -0
  147. package/types/src/components/filter-bar/filter-components/FuFilterDateTime.vue.d.ts +36 -0
  148. package/types/src/components/filter-bar/filter-components/FuFilterOption.vue.d.ts +24 -0
  149. package/types/src/components/filter-bar/filter-components/FuFilterSelect.vue.d.ts +66 -0
  150. package/types/src/components/filter-bar/index.d.ts +2 -0
  151. package/types/src/components/filter-bar/types.d.ts +22 -0
  152. package/types/src/components/icon-button/FuIconButton.vue.d.ts +43 -0
  153. package/types/src/components/icon-button/index.d.ts +2 -0
  154. package/types/src/components/read-write-switch/FuInputRwSwitch.vue.d.ts +21 -0
  155. package/types/src/components/read-write-switch/FuReadWriteSwitch.vue.d.ts +23 -0
  156. package/types/src/components/read-write-switch/FuSelectRwSwitch.vue.d.ts +43 -0
  157. package/types/src/components/read-write-switch/index.d.ts +2 -0
  158. package/types/src/components/read-write-switch/types.d.ts +4 -0
  159. package/types/src/components/search-bar/FuComplexSearch.vue.d.ts +22 -0
  160. package/types/src/components/search-bar/FuQuickSearch.vue.d.ts +29 -0
  161. package/types/src/components/search-bar/FuSearchBar.vue.d.ts +58 -0
  162. package/types/src/components/search-bar/FuSearchBarButton.vue.d.ts +14 -0
  163. package/types/src/components/search-bar/FuSearchContions.vue.d.ts +26 -0
  164. package/types/src/components/search-bar/complex-components/FuComplexDate.vue.d.ts +36 -0
  165. package/types/src/components/search-bar/complex-components/FuComplexDateTime.vue.d.ts +36 -0
  166. package/types/src/components/search-bar/complex-components/FuComplexInput.vue.d.ts +26 -0
  167. package/types/src/components/search-bar/complex-components/FuComplexSelect.vue.d.ts +50 -0
  168. package/types/src/components/search-bar/complex-components/index.d.ts +0 -0
  169. package/types/src/components/search-bar/complex-components/mixins.d.ts +6 -0
  170. package/types/src/components/search-bar/index.d.ts +2 -0
  171. package/types/src/components/search-bar/types.d.ts +17 -0
  172. package/types/src/components/speed-dial/FuSpeedDial.vue.d.ts +218 -0
  173. package/types/src/components/speed-dial/FuSpeedDialActionButton.vue.d.ts +32 -0
  174. package/types/src/components/speed-dial/FuSpeedDialButton.vue.d.ts +42 -0
  175. package/types/src/components/speed-dial/FuSpeedDialItem.vue.d.ts +12 -0
  176. package/types/src/components/speed-dial/index.d.ts +2 -0
  177. package/types/src/components/speed-dial/types.d.ts +8 -0
  178. package/types/src/components/split-pane/FuSplitPane.vue.d.ts +59 -0
  179. package/types/src/components/split-pane/index.d.ts +2 -0
  180. package/types/src/components/table/FuTable.vue.d.ts +18 -0
  181. package/types/src/components/table/FuTableBody.d.ts +3 -0
  182. package/types/src/components/table/FuTableColumnDropdown.vue.d.ts +50 -0
  183. package/types/src/components/table/FuTablePagination.vue.d.ts +47 -0
  184. package/types/src/components/table/index.d.ts +2 -0
  185. package/types/src/components/table/table-column-select/FuTableColumnSelect.vue.d.ts +10 -0
  186. package/types/src/components/table/table-column-select/FuTableColumnSelectDialog.vue.d.ts +23 -0
  187. package/types/src/components/table/table-column-select/FuTableColumnSelectPopover.vue.d.ts +34 -0
  188. package/types/src/components/table/table-column-select/utils.d.ts +8 -0
  189. package/types/src/components/table/table-operations/FuTableButton.vue.d.ts +13 -0
  190. package/types/src/components/table/table-operations/FuTableMoreButton.vue.d.ts +37 -0
  191. package/types/src/components/table/table-operations/FuTableOperations.vue.d.ts +46 -0
  192. package/types/src/components/table/types.d.ts +2 -0
  193. package/types/src/components/tabs/FuTabs.vue.d.ts +54 -0
  194. package/types/src/components/tabs/index.d.ts +2 -0
  195. package/types/src/hooks/index.d.ts +3 -0
  196. package/types/src/hooks/use-global-config/index.d.ts +9 -0
  197. package/types/src/hooks/use-locale/index.d.ts +14 -0
  198. package/types/src/hooks/use-size/index.d.ts +9 -0
  199. package/types/src/index.d.ts +8 -0
  200. package/types/src/locale/index.d.ts +10 -0
  201. package/types/src/locale/lang/en.d.ts +59 -0
  202. package/types/src/locale/lang/zh-cn.d.ts +59 -0
  203. package/types/src/locale/lang/zh-tw.d.ts +59 -0
  204. package/types/src/tools/size.d.ts +4 -0
  205. package/types/src/tools/theme.d.ts +1 -0
  206. package/types/src/tools/time.d.ts +2 -0
  207. package/types/src/tools/types.d.ts +8 -0
  208. package/types/src/tools/utils.d.ts +2 -0
  209. package/types/src/tools/vnode.d.ts +9 -0
  210. package/src/components/filter-bar/FuSearchInput.vue +0 -31
  211. package/src/components/steps/FuHorizontalNavigation.vue +0 -18
  212. package/src/components/steps/FuHorizontalSteps.vue +0 -94
  213. package/src/components/steps/FuStep.vue +0 -13
  214. package/src/components/steps/FuSteps.vue +0 -22
  215. package/src/components/steps/FuStepsFooter.ts +0 -79
  216. package/src/components/steps/FuVerticalNavigation.vue +0 -35
  217. package/src/components/steps/FuVerticalSteps.vue +0 -79
  218. package/src/components/steps/Stepper.ts +0 -188
  219. package/src/components/steps/index.ts +0 -11
  220. package/src/components/table/table-column-dropdown/index.ts +0 -7
  221. package/src/components/table/table-column-select/index.ts +0 -8
  222. package/src/components/table/table-operations/index.ts +0 -12
  223. package/src/components/virtual-scroller/FuVirtualHorizontalScroll.js +0 -96
  224. package/src/components/virtual-scroller/FuVirtualScroll.js +0 -15
  225. package/src/components/virtual-scroller/FuVirtualVerticalScroll.js +0 -95
  226. package/src/components/virtual-scroller/index.js +0 -10
@@ -17,56 +17,13 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, mergeProps, getCurrentInstance, inject, computed, unref, isRef, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createVNode, withCtx, provide, onMounted, createTextVNode, createCommentVNode, renderSlot, resolveDynamicComponent, toHandlers, nextTick, normalizeClass, withModifiers, h, normalizeStyle, Transition, useSlots, reactive, withDirectives, isVNode, Comment, onUpdated, vShow, normalizeProps, guardReactiveProps } from "vue";
21
- var _export_sfc = (sfc, props) => {
22
- const target = sfc.__vccOpts || sfc;
23
- for (const [key, val] of props) {
24
- target[key] = val;
25
- }
26
- return target;
27
- };
28
- const __default__$f = { name: "FuSearchInput" };
29
- const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$f), {
30
- props: {
31
- value: String
32
- },
33
- emits: ["input", "change"],
34
- setup(__props, { emit }) {
35
- const props = __props;
36
- const quick = ref("");
37
- watch(() => props.value, (val) => {
38
- quick.value = val;
39
- });
40
- function input(e) {
41
- emit("input", quick.value, e);
42
- }
43
- function blur(e) {
44
- emit("change", quick.value, e);
45
- }
46
- function keydown(e) {
47
- const event = e;
48
- if (event.key === "Enter") {
49
- emit("change", quick.value, e);
50
- }
51
- }
52
- return (_ctx, _cache) => {
53
- const _component_el_input = resolveComponent("el-input");
54
- return openBlock(), createBlock(_component_el_input, mergeProps({
55
- class: "fu-search-input",
56
- "prefix-icon": "Search",
57
- modelValue: quick.value,
58
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
59
- onInput: input,
60
- onBlur: blur,
61
- onKeydown: keydown
62
- }, _ctx.$attrs, { clearable: "" }), null, 16, ["modelValue"]);
63
- };
64
- }
65
- }));
66
- var FuSearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/filter-bar/FuSearchInput.vue"]]);
20
+ import { ref, getCurrentInstance, inject, computed, provide, unref, isRef, defineComponent, watch, resolveComponent, openBlock, createBlock, mergeProps, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createVNode, withCtx, onMounted, withDirectives, createTextVNode, createCommentVNode, vShow, renderSlot, resolveDynamicComponent, toHandlers, nextTick, normalizeClass, withModifiers, h, vModelText, normalizeStyle, Transition, useSlots, isVNode, Comment, onUpdated, normalizeProps, guardReactiveProps } from "vue";
21
+ const COMPONENTS_SIZE = ["", "default", "small", "large"];
22
+ const validateSize = (val) => ["", ...COMPONENTS_SIZE].includes(val);
67
23
  const globalConfig = ref();
24
+ const globalConfigKey = Symbol("GlobalConfigKey");
68
25
  function useGlobalConfig(key, defaultValue = void 0) {
69
- const config = getCurrentInstance() ? inject(Symbol(), globalConfig) : globalConfig;
26
+ const config = getCurrentInstance() ? inject(globalConfigKey, globalConfig) : globalConfig;
70
27
  if (key) {
71
28
  return computed(() => {
72
29
  var _a2, _b;
@@ -76,6 +33,19 @@ function useGlobalConfig(key, defaultValue = void 0) {
76
33
  return config;
77
34
  }
78
35
  }
36
+ const provideGlobalConfig = (config, app) => {
37
+ var _a2;
38
+ const inSetup = !!getCurrentInstance();
39
+ const provideFn = (_a2 = app == null ? void 0 : app.provide) != null ? _a2 : inSetup ? provide : void 0;
40
+ const context = computed(() => {
41
+ return unref(config);
42
+ });
43
+ provideFn == null ? void 0 : provideFn(globalConfigKey, context);
44
+ if (!globalConfig.value) {
45
+ globalConfig.value = context.value;
46
+ }
47
+ return context;
48
+ };
79
49
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
80
50
  var freeGlobal$1 = freeGlobal;
81
51
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
@@ -125,9 +95,9 @@ function isSymbol(value) {
125
95
  return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
126
96
  }
127
97
  function arrayMap(array, iteratee) {
128
- var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
129
- while (++index2 < length) {
130
- result[index2] = iteratee(array[index2], index2, array);
98
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
99
+ while (++index < length) {
100
+ result[index] = iteratee(array[index], index, array);
131
101
  }
132
102
  return result;
133
103
  }
@@ -254,10 +224,10 @@ function hashSet(key, value) {
254
224
  return this;
255
225
  }
256
226
  function Hash(entries) {
257
- var index2 = -1, length = entries == null ? 0 : entries.length;
227
+ var index = -1, length = entries == null ? 0 : entries.length;
258
228
  this.clear();
259
- while (++index2 < length) {
260
- var entry = entries[index2];
229
+ while (++index < length) {
230
+ var entry = entries[index];
261
231
  this.set(entry[0], entry[1]);
262
232
  }
263
233
  }
@@ -282,41 +252,41 @@ function assocIndexOf(array, key) {
282
252
  var arrayProto = Array.prototype;
283
253
  var splice = arrayProto.splice;
284
254
  function listCacheDelete(key) {
285
- var data = this.__data__, index2 = assocIndexOf(data, key);
286
- if (index2 < 0) {
255
+ var data = this.__data__, index = assocIndexOf(data, key);
256
+ if (index < 0) {
287
257
  return false;
288
258
  }
289
259
  var lastIndex = data.length - 1;
290
- if (index2 == lastIndex) {
260
+ if (index == lastIndex) {
291
261
  data.pop();
292
262
  } else {
293
- splice.call(data, index2, 1);
263
+ splice.call(data, index, 1);
294
264
  }
295
265
  --this.size;
296
266
  return true;
297
267
  }
298
268
  function listCacheGet(key) {
299
- var data = this.__data__, index2 = assocIndexOf(data, key);
300
- return index2 < 0 ? void 0 : data[index2][1];
269
+ var data = this.__data__, index = assocIndexOf(data, key);
270
+ return index < 0 ? void 0 : data[index][1];
301
271
  }
302
272
  function listCacheHas(key) {
303
273
  return assocIndexOf(this.__data__, key) > -1;
304
274
  }
305
275
  function listCacheSet(key, value) {
306
- var data = this.__data__, index2 = assocIndexOf(data, key);
307
- if (index2 < 0) {
276
+ var data = this.__data__, index = assocIndexOf(data, key);
277
+ if (index < 0) {
308
278
  ++this.size;
309
279
  data.push([key, value]);
310
280
  } else {
311
- data[index2][1] = value;
281
+ data[index][1] = value;
312
282
  }
313
283
  return this;
314
284
  }
315
285
  function ListCache(entries) {
316
- var index2 = -1, length = entries == null ? 0 : entries.length;
286
+ var index = -1, length = entries == null ? 0 : entries.length;
317
287
  this.clear();
318
- while (++index2 < length) {
319
- var entry = entries[index2];
288
+ while (++index < length) {
289
+ var entry = entries[index];
320
290
  this.set(entry[0], entry[1]);
321
291
  }
322
292
  }
@@ -361,10 +331,10 @@ function mapCacheSet(key, value) {
361
331
  return this;
362
332
  }
363
333
  function MapCache(entries) {
364
- var index2 = -1, length = entries == null ? 0 : entries.length;
334
+ var index = -1, length = entries == null ? 0 : entries.length;
365
335
  this.clear();
366
- while (++index2 < length) {
367
- var entry = entries[index2];
336
+ while (++index < length) {
337
+ var entry = entries[index];
368
338
  this.set(entry[0], entry[1]);
369
339
  }
370
340
  }
@@ -434,11 +404,11 @@ function toKey(value) {
434
404
  }
435
405
  function baseGet(object, path) {
436
406
  path = castPath(path, object);
437
- var index2 = 0, length = path.length;
438
- while (object != null && index2 < length) {
439
- object = object[toKey(path[index2++])];
407
+ var index = 0, length = path.length;
408
+ while (object != null && index < length) {
409
+ object = object[toKey(path[index++])];
440
410
  }
441
- return index2 && index2 == length ? object : void 0;
411
+ return index && index == length ? object : void 0;
442
412
  }
443
413
  function get(object, path, defaultValue) {
444
414
  var result = object == null ? void 0 : baseGet(object, path);
@@ -520,18 +490,95 @@ const useLocale = () => {
520
490
  const locale = useGlobalConfig("locale");
521
491
  return buildLocaleContext(computed(() => locale.value || Chinese));
522
492
  };
523
- const _hoisted_1$c = { class: "fu-filter-conditions" };
524
- const _hoisted_2$7 = { class: "condition-text" };
525
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
493
+ const useProp = (name2) => {
494
+ const vm = getCurrentInstance();
495
+ return computed(() => {
496
+ var _a2, _b;
497
+ return (_b = ((_a2 = vm.proxy) == null ? void 0 : _a2.$props)[name2]) != null ? _b : void 0;
498
+ });
499
+ };
500
+ const useSize = (fallback, ignore = {}) => {
501
+ const emptyRef = ref(void 0);
502
+ const size = ignore.prop ? emptyRef : useProp("size");
503
+ const globalConfig2 = ignore.global ? emptyRef : useGlobalConfig("size");
504
+ return computed(() => size.value || unref(fallback) || globalConfig2.value || "");
505
+ };
506
+ const useSizeProp = {
507
+ type: String,
508
+ validator: validateSize
509
+ };
510
+ var _export_sfc = (sfc, props) => {
511
+ const target = sfc.__vccOpts || sfc;
512
+ for (const [key, val] of props) {
513
+ target[key] = val;
514
+ }
515
+ return target;
516
+ };
517
+ const __default__$r = { name: "FuFilterInput" };
518
+ const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$r), {
519
+ props: {
520
+ size: {
521
+ type: String,
522
+ validator: validateSize
523
+ },
524
+ modelValue: String
525
+ },
526
+ emits: ["update:modelValue", "change"],
527
+ setup(__props, { emit }) {
528
+ const props = __props;
529
+ const quick = ref("");
530
+ const configSize = useSize();
531
+ watch(() => props.modelValue, (val) => {
532
+ quick.value = val;
533
+ });
534
+ function input(e) {
535
+ emit("update:modelValue", quick.value, e);
536
+ }
537
+ function blur(e) {
538
+ emit("change", quick.value, e);
539
+ }
540
+ function clear() {
541
+ emit("update:modelValue", quick.value);
542
+ emit("change", quick.value);
543
+ }
544
+ function keydown(e) {
545
+ const event = e;
546
+ if (event.key === "Enter") {
547
+ emit("change", quick.value, e);
548
+ }
549
+ }
550
+ return (_ctx, _cache) => {
551
+ const _component_el_input = resolveComponent("el-input");
552
+ return openBlock(), createBlock(_component_el_input, mergeProps({
553
+ class: "fu-filter-input",
554
+ "prefix-icon": "Search",
555
+ modelValue: quick.value,
556
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
557
+ onInput: input,
558
+ onBlur: blur,
559
+ onKeydown: keydown,
560
+ onClear: clear
561
+ }, _ctx.$attrs, {
562
+ clearable: "",
563
+ size: unref(configSize)
564
+ }), null, 16, ["modelValue", "size"]);
565
+ };
566
+ }
567
+ }));
568
+ var FuFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/FuFilterInput.vue"]]);
569
+ const _hoisted_1$l = { class: "fu-filter-conditions" };
570
+ const _hoisted_2$e = { class: "condition-text" };
571
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
572
+ __name: "FuFilterConditions",
526
573
  props: {
527
574
  conditions: Array
528
575
  },
529
576
  emits: ["change"],
530
577
  setup(__props, { emit }) {
531
578
  const props = __props;
532
- function remove(index2) {
579
+ function remove(index) {
533
580
  var _a2;
534
- (_a2 = props.conditions) == null ? void 0 : _a2.splice(index2, 1);
581
+ (_a2 = props.conditions) == null ? void 0 : _a2.splice(index, 1);
535
582
  emit("change", props.conditions);
536
583
  }
537
584
  function text(condition) {
@@ -540,16 +587,16 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
540
587
  return (_ctx, _cache) => {
541
588
  const _component_CloseBold = resolveComponent("CloseBold");
542
589
  const _component_el_icon = resolveComponent("el-icon");
543
- return openBlock(), createElementBlock("div", _hoisted_1$c, [
544
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.conditions, (condition, index2) => {
590
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
591
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.conditions, (condition, index) => {
545
592
  return openBlock(), createElementBlock("div", {
546
593
  class: "fu-filter-conditions__item",
547
- key: index2
594
+ key: index
548
595
  }, [
549
- createElementVNode("div", _hoisted_2$7, toDisplayString(text(condition)), 1),
596
+ createElementVNode("div", _hoisted_2$e, toDisplayString(text(condition)), 1),
550
597
  createVNode(_component_el_icon, {
551
598
  class: "fu-scale-click",
552
- onClick: ($event) => remove(index2)
599
+ onClick: ($event) => remove(index)
553
600
  }, {
554
601
  default: withCtx(() => [
555
602
  createVNode(_component_CloseBold)
@@ -562,17 +609,21 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
562
609
  };
563
610
  }
564
611
  });
565
- var FuFilterConditions = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/filter-bar/FuFilterConditions.vue"]]);
612
+ var FuFilterConditions = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/FuFilterConditions.vue"]]);
566
613
  const selectKey = Symbol("SelectKey");
567
- const referenceKey = Symbol("ReferenceKey");
568
- const _hoisted_1$b = { class: "fu-filter__result" };
569
- const _hoisted_2$6 = { style: { "opacity": "0.6" } };
570
- const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "fu-filter__split" }, null, -1);
614
+ const referenceKey$1 = Symbol("ReferenceKey");
615
+ const _hoisted_1$k = { class: "fu-filter__result" };
616
+ const _hoisted_2$d = { style: { "opacity": "0.6" } };
617
+ const _hoisted_3$b = /* @__PURE__ */ createElementVNode("div", { class: "fu-filter__split" }, null, -1);
571
618
  const _hoisted_4$2 = { class: "drawer-body" };
572
619
  const _hoisted_5$1 = { class: "drawer-footer" };
573
- const __default__$e = { name: "FuFilter" };
574
- const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$e), {
620
+ const __default__$q = { name: "FuFilter" };
621
+ const _sfc_main$x = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$q), {
575
622
  props: {
623
+ size: {
624
+ type: String,
625
+ validator: validateSize
626
+ },
576
627
  count: {
577
628
  type: Number,
578
629
  default: 0
@@ -581,13 +632,16 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
581
632
  drawerWidth: {
582
633
  type: [Number, String],
583
634
  default: "680px"
584
- }
635
+ },
636
+ showEmpty: Boolean
585
637
  },
586
638
  emits: ["filter"],
587
639
  setup(__props, { expose, emit }) {
640
+ const props = __props;
588
641
  const { t } = useLocale();
589
642
  const filterRef = ref(null);
590
643
  const conditionsRef = ref(null);
644
+ const configSize = useSize();
591
645
  const drawer = ref(true);
592
646
  const scroll = ref(false);
593
647
  const conditions = ref([]);
@@ -618,6 +672,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
618
672
  var _a2;
619
673
  let el = (_a2 = conditionsRef.value) == null ? void 0 : _a2.$el;
620
674
  scroll.value = el != null && (el == null ? void 0 : el.getBoundingClientRect().width) >= scrollWidth.value;
675
+ console.log(el == null ? void 0 : el.getBoundingClientRect().width, scrollWidth.value);
621
676
  });
622
677
  emit("filter", conditions.value);
623
678
  }
@@ -669,7 +724,10 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
669
724
  const el = filterRef.value;
670
725
  return el === null ? 0 : el.getBoundingClientRect().width - 210;
671
726
  });
672
- provide(referenceKey, references);
727
+ const show = computed(() => {
728
+ return conditions.value.length > 0 && props.showEmpty === false || props.showEmpty;
729
+ });
730
+ provide(referenceKey$1, references);
673
731
  onMounted(() => {
674
732
  drawer.value = false;
675
733
  });
@@ -684,61 +742,65 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
684
742
  const _component_Delete = resolveComponent("Delete");
685
743
  const _component_el_button = resolveComponent("el-button");
686
744
  const _component_el_drawer = resolveComponent("el-drawer");
687
- return openBlock(), createElementBlock("div", {
688
- class: "fu-filter",
689
- ref_key: "filterRef",
690
- ref: filterRef
691
- }, [
692
- createElementVNode("div", _hoisted_1$b, [
693
- createTextVNode(toDisplayString(__props.count) + " ", 1),
694
- createElementVNode("span", _hoisted_2$6, toDisplayString(unref(t)("fu.filter_bar.results")), 1)
695
- ]),
696
- _hoisted_3$4,
697
- scroll.value ? (openBlock(), createElementBlock("div", {
698
- key: 0,
699
- class: "fu-filter__scroll",
700
- onMousedown: left,
701
- onMouseup: mouseup
702
- }, [
703
- createVNode(_component_el_icon, null, {
704
- default: withCtx(() => [
705
- createVNode(_component_ArrowLeftBold)
706
- ]),
707
- _: 1
708
- })
709
- ], 32)) : createCommentVNode("v-if", true),
710
- createVNode(FuFilterConditions, {
711
- conditions: conditions.value,
712
- onChange: change,
713
- ref_key: "conditionsRef",
714
- ref: conditionsRef
715
- }, null, 8, ["conditions"]),
716
- scroll.value ? (openBlock(), createElementBlock("div", {
717
- key: 1,
718
- class: "fu-filter__scroll",
719
- onMousedown: right,
720
- onMouseup: mouseup
721
- }, [
722
- createVNode(_component_el_icon, null, {
723
- default: withCtx(() => [
724
- createVNode(_component_ArrowRightBold)
725
- ]),
726
- _: 1
727
- })
728
- ], 32)) : createCommentVNode("v-if", true),
729
- conditions.value.length > 0 ? (openBlock(), createElementBlock("div", {
730
- key: 2,
731
- class: "fu-filter__clear fu-scale-click",
732
- onClick: clear
745
+ return openBlock(), createElementBlock(Fragment, null, [
746
+ withDirectives(createElementVNode("div", {
747
+ class: "fu-filter",
748
+ ref_key: "filterRef",
749
+ ref: filterRef
733
750
  }, [
734
- createVNode(_component_el_icon, null, {
735
- default: withCtx(() => [
736
- createVNode(_component_Delete)
737
- ]),
738
- _: 1
739
- }),
740
- createTextVNode(" " + toDisplayString(unref(t)("fu.filter_bar.clear")), 1)
741
- ])) : createCommentVNode("v-if", true),
751
+ createElementVNode("div", _hoisted_1$k, [
752
+ createTextVNode(toDisplayString(__props.count) + " ", 1),
753
+ createElementVNode("span", _hoisted_2$d, toDisplayString(unref(t)("fu.filter_bar.results")), 1)
754
+ ]),
755
+ _hoisted_3$b,
756
+ scroll.value ? (openBlock(), createElementBlock("div", {
757
+ key: 0,
758
+ class: "fu-filter__scroll",
759
+ onMousedown: left,
760
+ onMouseup: mouseup
761
+ }, [
762
+ createVNode(_component_el_icon, null, {
763
+ default: withCtx(() => [
764
+ createVNode(_component_ArrowLeftBold)
765
+ ]),
766
+ _: 1
767
+ })
768
+ ], 32)) : createCommentVNode("v-if", true),
769
+ createVNode(FuFilterConditions, {
770
+ conditions: conditions.value,
771
+ onChange: change,
772
+ ref_key: "conditionsRef",
773
+ ref: conditionsRef
774
+ }, null, 8, ["conditions"]),
775
+ scroll.value ? (openBlock(), createElementBlock("div", {
776
+ key: 1,
777
+ class: "fu-filter__scroll",
778
+ onMousedown: right,
779
+ onMouseup: mouseup
780
+ }, [
781
+ createVNode(_component_el_icon, null, {
782
+ default: withCtx(() => [
783
+ createVNode(_component_ArrowRightBold)
784
+ ]),
785
+ _: 1
786
+ })
787
+ ], 32)) : createCommentVNode("v-if", true),
788
+ conditions.value.length > 0 ? (openBlock(), createElementBlock("div", {
789
+ key: 2,
790
+ class: "fu-filter__clear fu-scale-click",
791
+ onClick: clear
792
+ }, [
793
+ createVNode(_component_el_icon, null, {
794
+ default: withCtx(() => [
795
+ createVNode(_component_Delete)
796
+ ]),
797
+ _: 1
798
+ }),
799
+ createTextVNode(" " + toDisplayString(unref(t)("fu.filter_bar.clear")), 1)
800
+ ])) : createCommentVNode("v-if", true)
801
+ ], 512), [
802
+ [vShow, unref(show)]
803
+ ]),
742
804
  createVNode(_component_el_drawer, {
743
805
  size: __props.drawerWidth,
744
806
  "custom-class": "fu-filter__drawer",
@@ -754,21 +816,23 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
754
816
  return openBlock(), createBlock(resolveDynamicComponent(c.component), mergeProps({ key: i }, c, {
755
817
  ref_for: true,
756
818
  ref: c.field
757
- }, toHandlers(c)), null, 16);
819
+ }, toHandlers(c), { size: unref(configSize) }), null, 16, ["size"]);
758
820
  }), 128))
759
821
  ])
760
822
  ]),
761
823
  createElementVNode("div", _hoisted_5$1, [
762
824
  renderSlot(_ctx.$slots, "footer", {}, () => [
763
825
  createVNode(_component_el_button, {
826
+ size: __props.size,
764
827
  onClick: _cache[0] || (_cache[0] = ($event) => drawer.value = false)
765
828
  }, {
766
829
  default: withCtx(() => [
767
830
  createTextVNode(toDisplayString(unref(t)("fu.filter_bar.cancel")), 1)
768
831
  ]),
769
832
  _: 1
770
- }),
833
+ }, 8, ["size"]),
771
834
  createVNode(_component_el_button, {
835
+ size: __props.size,
772
836
  type: "primary",
773
837
  onClick: filter
774
838
  }, {
@@ -776,33 +840,42 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
776
840
  createTextVNode(toDisplayString(unref(t)("fu.filter_bar.search")), 1)
777
841
  ]),
778
842
  _: 1
779
- })
843
+ }, 8, ["size"])
780
844
  ])
781
845
  ])
782
846
  ]),
783
847
  _: 3
784
848
  }, 8, ["size", "title", "modelValue"])
785
- ], 512);
849
+ ], 64);
786
850
  };
787
851
  }
788
852
  }));
789
- var FuFilter = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/filter-bar/FuFilter.vue"]]);
790
- const _hoisted_1$a = { class: "fu-filter-bar" };
791
- const _hoisted_2$5 = { class: "fu-filter-bar__top" };
792
- const _hoisted_3$3 = { class: "top_left" };
853
+ var FuFilter = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/FuFilter.vue"]]);
854
+ const _hoisted_1$j = { class: "fu-filter-bar" };
855
+ const _hoisted_2$c = { class: "fu-filter-bar__top" };
856
+ const _hoisted_3$a = { class: "top_left" };
793
857
  const _hoisted_4$1 = { class: "top_right" };
794
858
  const _hoisted_5 = { key: 0 };
795
859
  const _hoisted_6 = { class: "fu-filter-bar__bottom" };
796
- const __default__$d = { name: "FuFilterBar" };
797
- const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$d), {
860
+ const __default__$p = { name: "FuFilterBar" };
861
+ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$p), {
798
862
  props: {
863
+ size: {
864
+ type: String,
865
+ validator: validateSize
866
+ },
799
867
  resultCount: Number,
800
868
  quickPlaceholder: String,
801
- components: Array
869
+ components: Array,
870
+ showEmpty: {
871
+ type: Boolean,
872
+ default: false
873
+ }
802
874
  },
803
875
  emits: ["exec"],
804
876
  setup(__props, { expose, emit }) {
805
877
  const { t } = useLocale();
878
+ const configSize = useSize();
806
879
  const quick = ref("");
807
880
  const conditions = ref([]);
808
881
  const filterRef = ref();
@@ -822,42 +895,48 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
822
895
  (_a2 = filterRef.value) == null ? void 0 : _a2.setConditions(conditionObj2);
823
896
  }
824
897
  const conditionObj = computed(() => {
825
- let obj = { quick: quick.value };
898
+ let obj = {};
899
+ if (quick.value) {
900
+ obj.quick = quick.value;
901
+ }
826
902
  conditions.value.forEach((c) => {
827
903
  obj[c.field] = c;
828
904
  });
829
905
  return obj;
830
906
  });
831
907
  expose({
832
- setConditions
908
+ setConditions,
909
+ open
833
910
  });
834
911
  return (_ctx, _cache) => {
835
912
  const _component_el_button = resolveComponent("el-button");
836
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
837
- createElementVNode("div", _hoisted_2$5, [
838
- createElementVNode("div", _hoisted_3$3, [
913
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
914
+ createElementVNode("div", _hoisted_2$c, [
915
+ createElementVNode("div", _hoisted_3$a, [
839
916
  renderSlot(_ctx.$slots, "tl")
840
917
  ]),
841
918
  createElementVNode("div", _hoisted_4$1, [
842
- renderSlot(_ctx.$slots, "tr", {}, () => [
843
- createCommentVNode(' :size="configSize" '),
844
- createVNode(FuSearchInput, {
919
+ renderSlot(_ctx.$slots, "tr", { condition: unref(conditionObj) }, () => [
920
+ createVNode(FuFilterInput, {
921
+ size: unref(configSize),
845
922
  modelValue: quick.value,
846
923
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
847
924
  placeholder: __props.quickPlaceholder,
848
925
  onChange: change
849
- }, null, 8, ["modelValue", "placeholder"]),
850
- createVNode(_component_el_button, {
851
- onClick: open,
852
- icon: "Filter"
853
- }, {
854
- default: withCtx(() => [
855
- createTextVNode(toDisplayString(unref(t)("fu.filter_bar.filter")) + " ", 1),
856
- conditions.value.length > 0 ? (openBlock(), createElementBlock("span", _hoisted_5, "(" + toDisplayString(conditions.value.length) + ")", 1)) : createCommentVNode("v-if", true)
857
- ]),
858
- _: 1
859
- })
926
+ }, null, 8, ["size", "modelValue", "placeholder"])
860
927
  ]),
928
+ createVNode(_component_el_button, {
929
+ class: "fu-filter-button",
930
+ onClick: open,
931
+ icon: "Filter",
932
+ size: unref(configSize)
933
+ }, {
934
+ default: withCtx(() => [
935
+ createTextVNode(toDisplayString(unref(t)("fu.filter_bar.filter")) + " ", 1),
936
+ conditions.value.length > 0 ? (openBlock(), createElementBlock("span", _hoisted_5, "(" + toDisplayString(conditions.value.length) + ")", 1)) : createCommentVNode("v-if", true)
937
+ ]),
938
+ _: 1
939
+ }, 8, ["size"]),
861
940
  renderSlot(_ctx.$slots, "buttons")
862
941
  ])
863
942
  ]),
@@ -867,21 +946,24 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
867
946
  ref: filterRef,
868
947
  onFilter: filter,
869
948
  count: __props.resultCount,
870
- components: __props.components
949
+ components: __props.components,
950
+ size: unref(configSize),
951
+ "show-empty": __props.showEmpty
871
952
  }, {
872
953
  default: withCtx(() => [
873
954
  renderSlot(_ctx.$slots, "default")
874
955
  ]),
875
956
  _: 3
876
- }, 8, ["count", "components"])
957
+ }, 8, ["count", "components", "size", "show-empty"])
877
958
  ])
878
959
  ]);
879
960
  };
880
961
  }
881
962
  }));
882
- var FuFilterBar = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/filter-bar/FuFilterBar.vue"]]);
883
- const _hoisted_1$9 = ["onClick"];
884
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
963
+ var FuFilterBar = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/FuFilterBar.vue"]]);
964
+ const _hoisted_1$i = ["onClick"];
965
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
966
+ __name: "FuFilterOption",
885
967
  props: {
886
968
  value: {
887
969
  type: [String, Number],
@@ -912,18 +994,22 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
912
994
  return openBlock(), createElementBlock("div", {
913
995
  class: normalizeClass(["fu-filter-option", { "is-selected": unref(selected), "is-disabled": __props.disabled }]),
914
996
  onClick: withModifiers(click, ["stop"])
915
- }, toDisplayString(__props.label || __props.value), 11, _hoisted_1$9);
997
+ }, toDisplayString(__props.label || __props.value), 11, _hoisted_1$i);
916
998
  };
917
999
  }
918
1000
  });
919
- var FuFilterOption = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterOption.vue"]]);
920
- const _hoisted_1$8 = { class: "fu-filter-component" };
921
- const _hoisted_2$4 = { class: "fu-filter-component__label" };
922
- const _hoisted_3$2 = { class: "fu-filter-component__content" };
1001
+ var FuFilterOption = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterOption.vue"]]);
1002
+ const _hoisted_1$h = { class: "fu-filter-component" };
1003
+ const _hoisted_2$b = { class: "fu-filter-component__label" };
1004
+ const _hoisted_3$9 = { class: "fu-filter-component__content" };
923
1005
  const _hoisted_4 = { class: "fu-filter-option" };
924
- const __default__$c = { name: "FuFilterSelect" };
925
- const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$c), {
1006
+ const __default__$o = { name: "FuFilterSelect" };
1007
+ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$o), {
926
1008
  props: {
1009
+ size: {
1010
+ type: String,
1011
+ validator: validateSize
1012
+ },
927
1013
  multiple: {
928
1014
  type: Boolean,
929
1015
  default: false
@@ -949,8 +1035,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
949
1035
  emits: ["change"],
950
1036
  setup(__props, { expose, emit }) {
951
1037
  const props = __props;
952
- const { t } = useLocale();
953
1038
  const selection = ref(props.multiple ? [] : "");
1039
+ const configSize = useSize();
954
1040
  const showOptions = computed(() => {
955
1041
  return props.options.filter((o, i) => {
956
1042
  let show = props.showLimit < 0 ? true : i < props.showLimit;
@@ -971,6 +1057,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
971
1057
  }
972
1058
  return getValueLabel(selection.value);
973
1059
  });
1060
+ const { t } = useLocale();
974
1061
  function change(v) {
975
1062
  if (v.includes("")) {
976
1063
  selection.value = props.options.map((o) => o.value);
@@ -983,8 +1070,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
983
1070
  return;
984
1071
  }
985
1072
  if (selected) {
986
- let index2 = selection.value.indexOf(value);
987
- selection.value.splice(index2, 1);
1073
+ let index = selection.value.indexOf(value);
1074
+ selection.value.splice(index, 1);
988
1075
  } else {
989
1076
  selection.value.push(value);
990
1077
  }
@@ -1013,7 +1100,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1013
1100
  setSelected,
1014
1101
  selection
1015
1102
  });
1016
- const references = inject(referenceKey);
1103
+ const references = inject(referenceKey$1);
1017
1104
  const field = props.field;
1018
1105
  const reference = { field, init, getCondition };
1019
1106
  references == null ? void 0 : references.value.push(reference);
@@ -1027,9 +1114,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1027
1114
  const _component_Plus = resolveComponent("Plus");
1028
1115
  const _component_el_icon = resolveComponent("el-icon");
1029
1116
  const _component_el_popover = resolveComponent("el-popover");
1030
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
1031
- createElementVNode("div", _hoisted_2$4, toDisplayString(__props.label), 1),
1032
- createElementVNode("div", _hoisted_3$2, [
1117
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [
1118
+ createElementVNode("div", _hoisted_2$b, toDisplayString(__props.label), 1),
1119
+ createElementVNode("div", _hoisted_3$9, [
1033
1120
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(showOptions), (o) => {
1034
1121
  return openBlock(), createBlock(FuFilterOption, {
1035
1122
  label: o.label,
@@ -1063,6 +1150,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1063
1150
  multiple: __props.multiple,
1064
1151
  onChange: change,
1065
1152
  teleported: false,
1153
+ size: unref(configSize),
1066
1154
  placeholder: unref(t)("fu.search_bar.please_select")
1067
1155
  }), {
1068
1156
  default: withCtx(() => [
@@ -1084,7 +1172,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1084
1172
  }), 128))
1085
1173
  ]),
1086
1174
  _: 1
1087
- }, 16, ["modelValue", "multiple", "placeholder"])
1175
+ }, 16, ["modelValue", "multiple", "size", "placeholder"])
1088
1176
  ]),
1089
1177
  _: 1
1090
1178
  })
@@ -1093,7 +1181,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1093
1181
  };
1094
1182
  }
1095
1183
  }));
1096
- var FuFilterSelect = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterSelect.vue"]]);
1184
+ var FuFilterSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterSelect.vue"]]);
1097
1185
  const getCheckDate = (timestamp) => {
1098
1186
  if (!timestamp)
1099
1187
  return false;
@@ -1123,12 +1211,16 @@ const dateFormat = (timestamp) => {
1123
1211
  const d = (dt.getDate() + "").padStart(2, "0");
1124
1212
  return `${y}-${m}-${d}`;
1125
1213
  };
1126
- const _hoisted_1$7 = { class: "fu-filter-component" };
1127
- const _hoisted_2$3 = { class: "fu-filter-component__label" };
1128
- const _hoisted_3$1 = { class: "fu-filter-component__content" };
1129
- const __default__$b = { name: "FuFilterDate" };
1130
- const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$b), {
1214
+ const _hoisted_1$g = { class: "fu-filter-component" };
1215
+ const _hoisted_2$a = { class: "fu-filter-component__label" };
1216
+ const _hoisted_3$8 = { class: "fu-filter-component__content" };
1217
+ const __default__$n = { name: "FuFilterDate" };
1218
+ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$n), {
1131
1219
  props: {
1220
+ size: {
1221
+ type: String,
1222
+ validator: validateSize
1223
+ },
1132
1224
  label: String,
1133
1225
  field: {
1134
1226
  type: String,
@@ -1141,11 +1233,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1141
1233
  },
1142
1234
  setup(__props, { expose }) {
1143
1235
  const props = __props;
1144
- const { t } = useLocale();
1145
1236
  const value = ref("");
1237
+ const configSize = useSize();
1146
1238
  const valueLabel = computed(() => {
1147
1239
  return dateFormat(value.value[0]) + " - " + dateFormat(value.value[1]);
1148
1240
  });
1241
+ const { t } = useLocale();
1149
1242
  function getCondition() {
1150
1243
  if (!String(value.value))
1151
1244
  return;
@@ -1155,7 +1248,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1155
1248
  function init(v) {
1156
1249
  value.value = v !== void 0 ? v : "";
1157
1250
  }
1158
- const references = inject(referenceKey);
1251
+ const references = inject(referenceKey$1);
1159
1252
  const field = props.field;
1160
1253
  const reference = { field, init, getCondition };
1161
1254
  references == null ? void 0 : references.value.push(reference);
@@ -1165,33 +1258,38 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1165
1258
  });
1166
1259
  return (_ctx, _cache) => {
1167
1260
  const _component_el_date_picker = resolveComponent("el-date-picker");
1168
- return openBlock(), createElementBlock("div", _hoisted_1$7, [
1169
- createElementVNode("div", _hoisted_2$3, toDisplayString(__props.label), 1),
1170
- createElementVNode("div", _hoisted_3$1, [
1171
- createCommentVNode(' :size="configSize" '),
1261
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
1262
+ createElementVNode("div", _hoisted_2$a, toDisplayString(__props.label), 1),
1263
+ createElementVNode("div", _hoisted_3$8, [
1264
+ createCommentVNode("configSize"),
1172
1265
  createVNode(_component_el_date_picker, mergeProps({
1173
1266
  class: "fu-filter-date",
1174
1267
  modelValue: value.value,
1175
1268
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
1176
1269
  }, _ctx.$attrs, {
1270
+ size: unref(configSize),
1177
1271
  placeholder: unref(t)("fu.search_bar.select_date"),
1178
1272
  type: "daterange",
1179
1273
  "value-format": __props.valueFormat,
1180
1274
  "start-placeholder": unref(t)("fu.search_bar.start_date"),
1181
1275
  "end-placeholder": unref(t)("fu.search_bar.end_date")
1182
- }), null, 16, ["modelValue", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
1276
+ }), null, 16, ["modelValue", "size", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
1183
1277
  ])
1184
1278
  ]);
1185
1279
  };
1186
1280
  }
1187
1281
  }));
1188
- var FuFilterDate = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterDate.vue"]]);
1189
- const _hoisted_1$6 = { class: "fu-filter-component" };
1190
- const _hoisted_2$2 = { class: "fu-filter-component__label" };
1191
- const _hoisted_3 = { class: "fu-filter-component__content" };
1192
- const __default__$a = { name: "FuFilterDateTime" };
1193
- const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$a), {
1282
+ var FuFilterDate = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterDate.vue"]]);
1283
+ const _hoisted_1$f = { class: "fu-filter-component" };
1284
+ const _hoisted_2$9 = { class: "fu-filter-component__label" };
1285
+ const _hoisted_3$7 = { class: "fu-filter-component__content" };
1286
+ const __default__$m = { name: "FuFilterDateTime" };
1287
+ const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$m), {
1194
1288
  props: {
1289
+ size: {
1290
+ type: String,
1291
+ validator: validateSize
1292
+ },
1195
1293
  label: String,
1196
1294
  field: {
1197
1295
  type: String,
@@ -1204,11 +1302,12 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1204
1302
  },
1205
1303
  setup(__props, { expose }) {
1206
1304
  const props = __props;
1207
- const { t } = useLocale();
1208
1305
  const value = ref("");
1306
+ const configSize = useSize();
1209
1307
  const valueLabel = computed(() => {
1210
1308
  return datetimeFormat(value.value[0]) + " - " + datetimeFormat(value.value[1]);
1211
1309
  });
1310
+ const { t } = useLocale();
1212
1311
  function getCondition() {
1213
1312
  if (!String(value.value))
1214
1313
  return;
@@ -1218,7 +1317,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1218
1317
  function init(v) {
1219
1318
  value.value = v !== void 0 ? v : "";
1220
1319
  }
1221
- const references = inject(referenceKey);
1320
+ const references = inject(referenceKey$1);
1222
1321
  const field = props.field;
1223
1322
  const reference = { field, init, getCondition };
1224
1323
  references == null ? void 0 : references.value.push(reference);
@@ -1228,40 +1327,112 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1228
1327
  });
1229
1328
  return (_ctx, _cache) => {
1230
1329
  const _component_el_date_picker = resolveComponent("el-date-picker");
1231
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
1232
- createElementVNode("div", _hoisted_2$2, toDisplayString(__props.label), 1),
1233
- createElementVNode("div", _hoisted_3, [
1330
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [
1331
+ createElementVNode("div", _hoisted_2$9, toDisplayString(__props.label), 1),
1332
+ createElementVNode("div", _hoisted_3$7, [
1234
1333
  createCommentVNode(' :size="configSize" '),
1235
1334
  createVNode(_component_el_date_picker, mergeProps({
1236
1335
  class: "fu-filter-date",
1237
1336
  modelValue: value.value,
1238
1337
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
1239
1338
  }, _ctx.$attrs, {
1339
+ size: unref(configSize),
1240
1340
  placeholder: unref(t)("fu.search_bar.select_date_time"),
1241
1341
  type: "datetimerange",
1242
1342
  "value-format": __props.valueFormat,
1243
1343
  "start-placeholder": unref(t)("fu.search_bar.start_date_time"),
1244
1344
  "end-placeholder": unref(t)("fu.search_bar.end_date_time")
1245
- }), null, 16, ["modelValue", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
1345
+ }), null, 16, ["modelValue", "size", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
1246
1346
  ])
1247
1347
  ]);
1248
1348
  };
1249
1349
  }
1250
1350
  }));
1251
- var FuFilterDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterDateTime.vue"]]);
1252
- var index$1 = {
1253
- install: (app) => {
1254
- app.component(FuFilterBar.name, FuFilterBar);
1255
- app.component(FuFilter.name, FuFilter);
1256
- app.component(FuSearchInput.name, FuSearchInput);
1257
- app.component(FuFilterSelect.name, FuFilterSelect);
1258
- app.component(FuFilterDate.name, FuFilterDate);
1259
- app.component(FuFilterDateTime.name, FuFilterDateTime);
1351
+ var FuFilterDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterDateTime.vue"]]);
1352
+ FuFilterBar.install = (app) => {
1353
+ app.component(FuFilterBar.name, FuFilterBar);
1354
+ app.component(FuFilter.name, FuFilter);
1355
+ app.component(FuFilterInput.name, FuFilterInput);
1356
+ app.component(FuFilterSelect.name, FuFilterSelect);
1357
+ app.component(FuFilterDate.name, FuFilterDate);
1358
+ app.component(FuFilterDateTime.name, FuFilterDateTime);
1359
+ };
1360
+ var __glob_2_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1361
+ __proto__: null,
1362
+ "default": FuFilterBar
1363
+ }, Symbol.toStringTag, { value: "Module" }));
1364
+ const COMPONENTS_TYPE = ["default", "primary", "success", "warning", "danger", "info"];
1365
+ const validateType = (value) => {
1366
+ if (!value)
1367
+ return true;
1368
+ if (COMPONENTS_TYPE.includes(value)) {
1369
+ return true;
1370
+ }
1371
+ console.error("types is not contains " + value);
1372
+ return false;
1373
+ };
1374
+ const _hoisted_1$e = ["tabindex"];
1375
+ const __default__$l = { name: "FuIconButton" };
1376
+ const _sfc_main$r = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$l), {
1377
+ props: {
1378
+ name: String,
1379
+ size: {
1380
+ type: [Number, String],
1381
+ default: 20
1382
+ },
1383
+ color: String,
1384
+ loading: Boolean,
1385
+ disabled: Boolean,
1386
+ type: {
1387
+ type: String,
1388
+ validator: validateType
1389
+ },
1390
+ tabindex: {
1391
+ type: [String, Number],
1392
+ default: 0
1393
+ }
1394
+ },
1395
+ emits: ["click"],
1396
+ setup(__props, { emit }) {
1397
+ const props = __props;
1398
+ const typeClass = computed(() => {
1399
+ return props.type ? `fu-icon-button--${props.type}` : "";
1400
+ });
1401
+ function click(e) {
1402
+ if (!props.disabled) {
1403
+ emit("click", e);
1404
+ }
1405
+ }
1406
+ return (_ctx, _cache) => {
1407
+ const _component_el_icon = resolveComponent("el-icon");
1408
+ return openBlock(), createElementBlock("div", {
1409
+ class: normalizeClass(["fu-icon-button", [{ "is-disabled": __props.disabled }, unref(typeClass)]]),
1410
+ tabindex: __props.tabindex,
1411
+ onClick: click
1412
+ }, [
1413
+ renderSlot(_ctx.$slots, "default", {}, () => [
1414
+ createVNode(_component_el_icon, {
1415
+ color: __props.color,
1416
+ size: __props.size,
1417
+ class: normalizeClass({ "is-loading": __props.loading })
1418
+ }, {
1419
+ default: withCtx(() => [
1420
+ (openBlock(), createBlock(resolveDynamicComponent(__props.name)))
1421
+ ]),
1422
+ _: 1
1423
+ }, 8, ["color", "size", "class"])
1424
+ ])
1425
+ ], 10, _hoisted_1$e);
1426
+ };
1260
1427
  }
1428
+ }));
1429
+ var FuIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/icon-button/FuIconButton.vue"]]);
1430
+ FuIconButton.install = (app) => {
1431
+ app.component(FuIconButton.name, FuIconButton);
1261
1432
  };
1262
- var __glob_1_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1433
+ var __glob_2_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1263
1434
  __proto__: null,
1264
- "default": index$1
1435
+ "default": FuIconButton
1265
1436
  }, Symbol.toStringTag, { value: "Module" }));
1266
1437
  const uuid = function() {
1267
1438
  let d = new Date().getTime();
@@ -1279,7 +1450,7 @@ const uuid = function() {
1279
1450
  });
1280
1451
  };
1281
1452
  const TRIGGERS = ["manual", "onClick", "onDblclick"];
1282
- const _sfc_main$h = defineComponent({
1453
+ const _sfc_main$q = defineComponent({
1283
1454
  name: "FuReadWriteSwitch",
1284
1455
  props: {
1285
1456
  modelValue: Boolean,
@@ -1346,147 +1517,898 @@ const _sfc_main$h = defineComponent({
1346
1517
  return h("div", context, children);
1347
1518
  };
1348
1519
  }
1349
- });
1350
- var FuReadWriteSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/read-write-switch/FuReadWriteSwitch.vue"]]);
1351
- const __default__$9 = { name: "FuInputRwSwitch" };
1352
- const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$9), {
1520
+ });
1521
+ var FuReadWriteSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/read-write-switch/FuReadWriteSwitch.vue"]]);
1522
+ const __default__$k = { name: "FuInputRwSwitch" };
1523
+ const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$k), {
1524
+ props: {
1525
+ modelValue: [String, Number],
1526
+ writeTrigger: {
1527
+ type: String,
1528
+ default: "onClick",
1529
+ validator: (value) => {
1530
+ return ["onClick", "onDblclick"].includes(value);
1531
+ }
1532
+ }
1533
+ },
1534
+ emits: ["input", "blur"],
1535
+ setup(__props, { emit }) {
1536
+ const props = __props;
1537
+ const data = ref(props.modelValue);
1538
+ watch(() => props.modelValue, (v) => {
1539
+ data.value = v;
1540
+ });
1541
+ function input(e) {
1542
+ emit("input", data.value, e);
1543
+ }
1544
+ function blur(read, e) {
1545
+ emit("blur", data.value, e);
1546
+ read();
1547
+ }
1548
+ function keydown(read, e) {
1549
+ if (e.key === "Enter") {
1550
+ read();
1551
+ }
1552
+ }
1553
+ return (_ctx, _cache) => {
1554
+ const _component_el_input = resolveComponent("el-input");
1555
+ return openBlock(), createBlock(FuReadWriteSwitch, {
1556
+ "write-trigger": __props.writeTrigger,
1557
+ data: data.value
1558
+ }, {
1559
+ default: withCtx(({ read }) => [
1560
+ createVNode(_component_el_input, mergeProps({
1561
+ modelValue: data.value,
1562
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value = $event)
1563
+ }, _ctx.$attrs, {
1564
+ onInput: input,
1565
+ onBlur: ($event) => blur(read, $event),
1566
+ onKeydown: ($event) => keydown(read, $event)
1567
+ }), null, 16, ["modelValue", "onBlur", "onKeydown"])
1568
+ ]),
1569
+ _: 1
1570
+ }, 8, ["write-trigger", "data"]);
1571
+ };
1572
+ }
1573
+ }));
1574
+ var FuInputRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/read-write-switch/FuInputRwSwitch.vue"]]);
1575
+ const __default__$j = { name: "FuSelectRwSwitch" };
1576
+ const _sfc_main$o = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$j), {
1577
+ props: {
1578
+ modelValue: [String, Number],
1579
+ options: {
1580
+ type: Array,
1581
+ default: []
1582
+ },
1583
+ blurTime: {
1584
+ type: Number,
1585
+ default: 150
1586
+ },
1587
+ writeTrigger: {
1588
+ type: String,
1589
+ default: "onClick",
1590
+ validator: (value) => {
1591
+ return ["onClick", "onDblclick"].includes(value);
1592
+ }
1593
+ }
1594
+ },
1595
+ emits: ["input", "blur", "change", "update:modelValue"],
1596
+ setup(__props, { emit }) {
1597
+ const props = __props;
1598
+ const data = ref(props.modelValue);
1599
+ watch(() => props.modelValue, (v) => {
1600
+ data.value = v;
1601
+ });
1602
+ function input(e) {
1603
+ emit("input", data.value, e);
1604
+ }
1605
+ function blur(read, e) {
1606
+ if (props.blurTime > 0) {
1607
+ setTimeout(() => {
1608
+ read();
1609
+ }, props.blurTime);
1610
+ emit("blur", e);
1611
+ }
1612
+ }
1613
+ function change(read, e) {
1614
+ emit("update:modelValue", data.value, e);
1615
+ emit("change", data.value, e);
1616
+ read();
1617
+ }
1618
+ return (_ctx, _cache) => {
1619
+ const _component_el_option = resolveComponent("el-option");
1620
+ const _component_el_select = resolveComponent("el-select");
1621
+ return openBlock(), createBlock(FuReadWriteSwitch, {
1622
+ "write-trigger": __props.writeTrigger,
1623
+ data: data.value
1624
+ }, {
1625
+ read: withCtx(() => [
1626
+ renderSlot(_ctx.$slots, "read", {}, () => [
1627
+ createTextVNode(toDisplayString(data.value), 1)
1628
+ ])
1629
+ ]),
1630
+ default: withCtx(({ read }) => [
1631
+ createVNode(_component_el_select, mergeProps({
1632
+ modelValue: data.value,
1633
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value = $event)
1634
+ }, _ctx.$attrs, {
1635
+ onInput: input,
1636
+ onBlur: ($event) => blur(read, $event),
1637
+ onChange: ($event) => change(read, $event)
1638
+ }), {
1639
+ default: withCtx(() => [
1640
+ renderSlot(_ctx.$slots, "default", {}, () => [
1641
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item) => {
1642
+ return openBlock(), createBlock(_component_el_option, {
1643
+ key: item.value,
1644
+ label: item.label,
1645
+ value: item.value
1646
+ }, null, 8, ["label", "value"]);
1647
+ }), 128))
1648
+ ])
1649
+ ]),
1650
+ _: 2
1651
+ }, 1040, ["modelValue", "onBlur", "onChange"])
1652
+ ]),
1653
+ _: 3
1654
+ }, 8, ["write-trigger", "data"]);
1655
+ };
1656
+ }
1657
+ }));
1658
+ var FuSelectRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/read-write-switch/FuSelectRwSwitch.vue"]]);
1659
+ FuReadWriteSwitch.install = (app) => {
1660
+ app.component(FuReadWriteSwitch.name, FuReadWriteSwitch);
1661
+ app.component(FuInputRwSwitch.name, FuInputRwSwitch);
1662
+ app.component(FuSelectRwSwitch.name, FuSelectRwSwitch);
1663
+ };
1664
+ var __glob_2_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1665
+ __proto__: null,
1666
+ "default": FuReadWriteSwitch
1667
+ }, Symbol.toStringTag, { value: "Module" }));
1668
+ const _hoisted_1$d = ["placeholder"];
1669
+ const __default__$i = { name: "FuQuickSearch" };
1670
+ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$i), {
1671
+ props: {
1672
+ size: {
1673
+ type: String,
1674
+ validator: validateSize
1675
+ },
1676
+ modelValue: String,
1677
+ placeholder: String,
1678
+ useIcon: {
1679
+ type: Boolean,
1680
+ default: true
1681
+ }
1682
+ },
1683
+ emits: ["update:modelValue", "change"],
1684
+ setup(__props, { emit }) {
1685
+ const props = __props;
1686
+ const focused = ref(false);
1687
+ const configSize = useSize();
1688
+ const value = computed({
1689
+ get: () => props.modelValue,
1690
+ set: (val) => {
1691
+ emit("update:modelValue", val);
1692
+ }
1693
+ });
1694
+ function focus() {
1695
+ focused.value = true;
1696
+ }
1697
+ function blur(e) {
1698
+ if (focused.value) {
1699
+ emit("change", value.value, e);
1700
+ }
1701
+ focused.value = false;
1702
+ }
1703
+ function keydown(e) {
1704
+ const { code } = e;
1705
+ if (code === "Enter") {
1706
+ focused.value = false;
1707
+ emit("change", value.value, e);
1708
+ }
1709
+ }
1710
+ return (_ctx, _cache) => {
1711
+ const _component_Search = resolveComponent("Search");
1712
+ const _component_el_icon = resolveComponent("el-icon");
1713
+ return openBlock(), createElementBlock("div", {
1714
+ class: normalizeClass(["fu-quick-search", "fu-quick-search--" + unref(configSize)])
1715
+ }, [
1716
+ __props.useIcon ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
1717
+ default: withCtx(() => [
1718
+ createVNode(_component_Search)
1719
+ ]),
1720
+ _: 1
1721
+ })) : createCommentVNode("v-if", true),
1722
+ createElementVNode("label", null, [
1723
+ withDirectives(createElementVNode("input", {
1724
+ placeholder: __props.placeholder,
1725
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event : null),
1726
+ onBlur: blur,
1727
+ onFocus: focus,
1728
+ onKeydown: keydown
1729
+ }, null, 40, _hoisted_1$d), [
1730
+ [vModelText, unref(value)]
1731
+ ])
1732
+ ])
1733
+ ], 2);
1734
+ };
1735
+ }
1736
+ }));
1737
+ var FuQuickSearch = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/FuQuickSearch.vue"]]);
1738
+ const referenceKey = Symbol("ReferenceKey");
1739
+ const _hoisted_1$c = { class: "fu-complex-components" };
1740
+ const _hoisted_2$8 = { class: "fu-complex-components__body" };
1741
+ const _hoisted_3$6 = { class: "fu-complex-components__footer" };
1742
+ const __default__$h = { name: "FuComplexSearch" };
1743
+ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$h), {
1744
+ props: {
1745
+ size: {
1746
+ type: String,
1747
+ validator: validateSize
1748
+ },
1749
+ components: Array
1750
+ },
1751
+ emits: ["close", "change"],
1752
+ setup(__props, { expose, emit }) {
1753
+ const active = ref(false);
1754
+ const references = inject(referenceKey);
1755
+ const configSize = useSize();
1756
+ const showComplex = computed(() => {
1757
+ return references ? references.value.length > 0 : false;
1758
+ });
1759
+ const { t } = useLocale();
1760
+ function hide() {
1761
+ emit("close");
1762
+ }
1763
+ function toggle() {
1764
+ active.value = !active.value;
1765
+ if (active.value) {
1766
+ references == null ? void 0 : references.value.forEach((r) => r.init());
1767
+ }
1768
+ }
1769
+ function close() {
1770
+ active.value = false;
1771
+ }
1772
+ function ok() {
1773
+ close();
1774
+ exec();
1775
+ }
1776
+ function exec() {
1777
+ let conditions = [];
1778
+ references == null ? void 0 : references.value.forEach((r) => {
1779
+ let condition = r.getCondition();
1780
+ if (condition && condition.value !== void 0) {
1781
+ conditions.push(condition);
1782
+ }
1783
+ });
1784
+ emit("change", conditions);
1785
+ }
1786
+ function setConditions(conditionObj) {
1787
+ let result = [];
1788
+ if (conditionObj) {
1789
+ Object.keys(conditionObj).forEach((key) => {
1790
+ let c = conditionObj[key];
1791
+ references == null ? void 0 : references.value.forEach((r) => {
1792
+ if (r.field === key) {
1793
+ r.init(c.value);
1794
+ const condition = r.getCondition();
1795
+ if (condition) {
1796
+ result.push(condition);
1797
+ }
1798
+ }
1799
+ });
1800
+ });
1801
+ }
1802
+ return result;
1803
+ }
1804
+ expose({
1805
+ setConditions,
1806
+ close
1807
+ });
1808
+ return (_ctx, _cache) => {
1809
+ const _component_el_button = resolveComponent("el-button");
1810
+ const _component_el_popover = resolveComponent("el-popover");
1811
+ return openBlock(), createBlock(_component_el_popover, {
1812
+ visible: active.value,
1813
+ "show-arrow": false,
1814
+ onHide: hide,
1815
+ width: "auto",
1816
+ "popper-class": "fu-complex-components"
1817
+ }, {
1818
+ reference: withCtx(() => [
1819
+ withDirectives(createVNode(_component_el_button, {
1820
+ circle: "",
1821
+ icon: "ArrowRightBold",
1822
+ onClick: toggle,
1823
+ size: unref(configSize),
1824
+ class: normalizeClass(["fu-complex-components-trigger", { "is-active": active.value }])
1825
+ }, null, 8, ["size", "class"]), [
1826
+ [vShow, unref(showComplex)]
1827
+ ])
1828
+ ]),
1829
+ default: withCtx(() => [
1830
+ createElementVNode("div", _hoisted_1$c, [
1831
+ createElementVNode("div", _hoisted_2$8, [
1832
+ renderSlot(_ctx.$slots, "default", {}, () => [
1833
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.components, (c) => {
1834
+ return openBlock(), createBlock(resolveDynamicComponent(c.component), mergeProps(c, { size: unref(configSize) }), null, 16, ["size"]);
1835
+ }), 256))
1836
+ ])
1837
+ ]),
1838
+ createElementVNode("div", _hoisted_3$6, [
1839
+ createVNode(_component_el_button, {
1840
+ onClick: close,
1841
+ size: unref(configSize)
1842
+ }, {
1843
+ default: withCtx(() => [
1844
+ createTextVNode(toDisplayString(unref(t)("fu.search_bar.cancel")), 1)
1845
+ ]),
1846
+ _: 1
1847
+ }, 8, ["size"]),
1848
+ createVNode(_component_el_button, {
1849
+ type: "primary",
1850
+ onClick: ok,
1851
+ size: unref(configSize)
1852
+ }, {
1853
+ default: withCtx(() => [
1854
+ createTextVNode(toDisplayString(unref(t)("fu.search_bar.ok")), 1)
1855
+ ]),
1856
+ _: 1
1857
+ }, 8, ["size"])
1858
+ ])
1859
+ ])
1860
+ ]),
1861
+ _: 3
1862
+ }, 8, ["visible"]);
1863
+ };
1864
+ }
1865
+ }));
1866
+ var FuComplexSearch = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/FuComplexSearch.vue"]]);
1867
+ const __default__$g = { name: "FuSearchBarButton" };
1868
+ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$g), {
1869
+ props: {
1870
+ size: {
1871
+ type: String,
1872
+ validator: validateSize
1873
+ },
1874
+ tooltip: String
1875
+ },
1876
+ setup(__props) {
1877
+ const configSize = useSize();
1878
+ return (_ctx, _cache) => {
1879
+ const _component_el_button = resolveComponent("el-button");
1880
+ const _component_el_tooltip = resolveComponent("el-tooltip");
1881
+ return openBlock(), createBlock(_component_el_tooltip, {
1882
+ content: __props.tooltip,
1883
+ disabled: !__props.tooltip
1884
+ }, {
1885
+ default: withCtx(() => [
1886
+ createVNode(_component_el_button, mergeProps({
1887
+ class: "fu-search-bar-button",
1888
+ circle: "",
1889
+ size: unref(configSize)
1890
+ }, _ctx.$attrs), null, 16, ["size"])
1891
+ ]),
1892
+ _: 1
1893
+ }, 8, ["content", "disabled"]);
1894
+ };
1895
+ }
1896
+ }));
1897
+ var FuSearchBarButton = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/FuSearchBarButton.vue"]]);
1898
+ const _hoisted_1$b = { class: "fu-search-conditions__item" };
1899
+ const _hoisted_2$7 = { key: 0 };
1900
+ const _hoisted_3$5 = { class: "condition-value" };
1901
+ const __default__$f = { name: "FuSearchConditions" };
1902
+ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$f), {
1903
+ props: {
1904
+ size: {
1905
+ type: String,
1906
+ validator: validateSize
1907
+ },
1908
+ conditions: {
1909
+ type: Array,
1910
+ required: true
1911
+ }
1912
+ },
1913
+ emits: ["change"],
1914
+ setup(__props, { emit }) {
1915
+ const props = __props;
1916
+ const configSize = useSize();
1917
+ function remove(index) {
1918
+ props.conditions.splice(index, 1);
1919
+ emit("change", props.conditions);
1920
+ }
1921
+ return (_ctx, _cache) => {
1922
+ const _component_Close = resolveComponent("Close");
1923
+ const _component_el_icon = resolveComponent("el-icon");
1924
+ return openBlock(), createElementBlock("div", {
1925
+ class: normalizeClass(["fu-search-conditions", "fu-search-conditions--" + unref(configSize)])
1926
+ }, [
1927
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.conditions, (condition, index) => {
1928
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
1929
+ condition.label ? (openBlock(), createElementBlock("div", _hoisted_2$7, toDisplayString(condition.label), 1)) : createCommentVNode("v-if", true),
1930
+ createElementVNode("div", _hoisted_3$5, toDisplayString(condition.valueLabel), 1),
1931
+ createVNode(_component_el_icon, {
1932
+ class: "condition-remove",
1933
+ onClick: ($event) => remove(index)
1934
+ }, {
1935
+ default: withCtx(() => [
1936
+ createVNode(_component_Close)
1937
+ ]),
1938
+ _: 2
1939
+ }, 1032, ["onClick"])
1940
+ ]);
1941
+ }), 256))
1942
+ ], 2);
1943
+ };
1944
+ }
1945
+ }));
1946
+ var FuSearchConditions = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/FuSearchContions.vue"]]);
1947
+ const _hoisted_1$a = { class: "fu-search-bar" };
1948
+ const _hoisted_2$6 = { class: "fu-search-bar__content" };
1949
+ const _hoisted_3$4 = { class: "fu-search-bar__buttons" };
1950
+ const __default__$e = { name: "FuSearchBar" };
1951
+ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$e), {
1952
+ props: {
1953
+ size: useSizeProp,
1954
+ quickKey: {
1955
+ type: String,
1956
+ default: "quick"
1957
+ },
1958
+ quickPlaceholder: String,
1959
+ useCleanButton: {
1960
+ type: Boolean,
1961
+ default: true
1962
+ },
1963
+ useRefreshButton: {
1964
+ type: Boolean,
1965
+ default: false
1966
+ },
1967
+ useQuickSearch: {
1968
+ type: Boolean,
1969
+ default: true
1970
+ },
1971
+ components: Array
1972
+ },
1973
+ emits: ["close", "exec"],
1974
+ setup(__props, { expose, emit }) {
1975
+ const props = __props;
1976
+ const complexRef = ref(null);
1977
+ const quick = ref("");
1978
+ const conditions = ref([]);
1979
+ const references = ref([]);
1980
+ provide(referenceKey, references);
1981
+ const configSize = useSize();
1982
+ const placeholder = computed(() => {
1983
+ return props.quickPlaceholder ? props.quickPlaceholder : t("fu.search_bar.search");
1984
+ });
1985
+ const showComplex = computed(() => {
1986
+ return references.value.length > 0;
1987
+ });
1988
+ const showClean = computed(() => {
1989
+ return props.useCleanButton && (conditions.value.length > 0 || quick.value);
1990
+ });
1991
+ const showRefresh = computed(() => {
1992
+ return props.useRefreshButton && showComplex.value;
1993
+ });
1994
+ const condition = computed(() => {
1995
+ var _a2;
1996
+ const obj = {};
1997
+ if (quick.value) {
1998
+ obj[props.quickKey] = quick.value;
1999
+ }
2000
+ if (((_a2 = conditions.value) == null ? void 0 : _a2.length) > 0) {
2001
+ conditions.value.forEach((c) => {
2002
+ const { field, value } = c;
2003
+ obj[c.field] = { field, value };
2004
+ });
2005
+ }
2006
+ return obj;
2007
+ });
2008
+ const { t } = useLocale();
2009
+ function closePopover() {
2010
+ emit("close");
2011
+ }
2012
+ function clean() {
2013
+ quick.value = "";
2014
+ conditions.value = [];
2015
+ emit("exec", condition.value);
2016
+ }
2017
+ function change(ccs) {
2018
+ conditions.value = merge(conditions.value, ccs);
2019
+ exec();
2020
+ }
2021
+ function refresh() {
2022
+ var _a2;
2023
+ (_a2 = complexRef.value) == null ? void 0 : _a2.close();
2024
+ exec();
2025
+ }
2026
+ function exec() {
2027
+ emit("exec", condition.value);
2028
+ }
2029
+ function merge(source, target) {
2030
+ let conditions2 = source.concat(target);
2031
+ let conditionMap = /* @__PURE__ */ new Map();
2032
+ for (let condition2 of conditions2) {
2033
+ conditionMap.set(condition2.field, condition2);
2034
+ }
2035
+ let result = [];
2036
+ conditionMap.forEach((v) => {
2037
+ result.push(v);
2038
+ });
2039
+ return result;
2040
+ }
2041
+ function setConditions(conditionObj) {
2042
+ var _a2;
2043
+ conditions.value = ((_a2 = complexRef.value) == null ? void 0 : _a2.setConditions(conditionObj)) || [];
2044
+ if (props.useQuickSearch && conditionObj[props.quickKey] !== void 0) {
2045
+ quick.value = conditionObj[props.quickKey].value;
2046
+ exec();
2047
+ } else {
2048
+ refresh();
2049
+ }
2050
+ }
2051
+ expose({
2052
+ setConditions
2053
+ });
2054
+ return (_ctx, _cache) => {
2055
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
2056
+ createElementVNode("div", _hoisted_2$6, [
2057
+ createVNode(FuComplexSearch, {
2058
+ ref_key: "complexRef",
2059
+ ref: complexRef,
2060
+ components: __props.components,
2061
+ onChange: change,
2062
+ size: unref(configSize),
2063
+ onClose: closePopover
2064
+ }, {
2065
+ default: withCtx(() => [
2066
+ renderSlot(_ctx.$slots, "complex")
2067
+ ]),
2068
+ _: 3
2069
+ }, 8, ["components", "size"]),
2070
+ unref(showComplex) ? (openBlock(), createBlock(FuSearchConditions, {
2071
+ key: 0,
2072
+ conditions: conditions.value,
2073
+ size: unref(configSize),
2074
+ onChange: change
2075
+ }, null, 8, ["conditions", "size"])) : createCommentVNode("v-if", true),
2076
+ __props.useQuickSearch ? (openBlock(), createBlock(FuQuickSearch, {
2077
+ key: 1,
2078
+ size: unref(configSize),
2079
+ "use-icon": !unref(showComplex),
2080
+ placeholder: unref(placeholder),
2081
+ modelValue: quick.value,
2082
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
2083
+ onChange: exec
2084
+ }, null, 8, ["size", "use-icon", "placeholder", "modelValue"])) : createCommentVNode("v-if", true)
2085
+ ]),
2086
+ createElementVNode("div", _hoisted_3$4, [
2087
+ renderSlot(_ctx.$slots, "buttons", {}, () => [
2088
+ unref(showClean) ? (openBlock(), createBlock(FuSearchBarButton, {
2089
+ key: 0,
2090
+ icon: "Close",
2091
+ onClick: clean,
2092
+ size: unref(configSize),
2093
+ tooltip: unref(t)("fu.search_bar.clean")
2094
+ }, null, 8, ["size", "tooltip"])) : createCommentVNode("v-if", true),
2095
+ unref(showRefresh) ? (openBlock(), createBlock(FuSearchBarButton, {
2096
+ key: 1,
2097
+ icon: "Refresh",
2098
+ onClick: refresh,
2099
+ size: unref(configSize),
2100
+ tooltip: unref(t)("fu.search_bar.refresh")
2101
+ }, null, 8, ["size", "tooltip"])) : createCommentVNode("v-if", true),
2102
+ renderSlot(_ctx.$slots, "default")
2103
+ ])
2104
+ ])
2105
+ ]);
2106
+ };
2107
+ }
2108
+ }));
2109
+ var FuSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/FuSearchBar.vue"]]);
2110
+ const _hoisted_1$9 = { class: "fu-complex-component" };
2111
+ const _hoisted_2$5 = { class: "fu-complex-component__label" };
2112
+ const _hoisted_3$3 = { class: "fu-complex-component__content" };
2113
+ const __default__$d = { name: "FuComplexSelect" };
2114
+ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$d), {
2115
+ props: {
2116
+ size: {
2117
+ type: String,
2118
+ validator: validateSize
2119
+ },
2120
+ multiple: {
2121
+ type: Boolean,
2122
+ default: false
2123
+ },
2124
+ label: String,
2125
+ field: {
2126
+ type: String,
2127
+ required: true
2128
+ },
2129
+ options: {
2130
+ type: Array,
2131
+ default: []
2132
+ }
2133
+ },
2134
+ emits: ["init"],
2135
+ setup(__props, { expose, emit }) {
2136
+ const props = __props;
2137
+ const selection = ref(props.multiple ? [] : "");
2138
+ const configSize = useSize();
2139
+ const valueLabel = computed(() => {
2140
+ if (Array.isArray(selection.value)) {
2141
+ let values = [];
2142
+ selection.value.forEach((v) => {
2143
+ values.push(getValueLabel(v));
2144
+ });
2145
+ return values.join(", ");
2146
+ }
2147
+ return getValueLabel(selection.value);
2148
+ });
2149
+ const { t } = useLocale();
2150
+ function getValueLabel(value) {
2151
+ for (let o of props.options) {
2152
+ if (o.value === value) {
2153
+ return o.label;
2154
+ }
2155
+ }
2156
+ return value;
2157
+ }
2158
+ function getCondition() {
2159
+ if (!selection.value || Array.isArray(selection.value) && selection.value.length === 0)
2160
+ return;
2161
+ let { field: field2, label } = props;
2162
+ return { field: field2, label, value: selection.value, valueLabel: valueLabel.value };
2163
+ }
2164
+ function init(v) {
2165
+ selection.value = v !== void 0 ? v : props.multiple ? [] : "";
2166
+ emit("init");
2167
+ }
2168
+ const references = inject(referenceKey);
2169
+ const field = props.field;
2170
+ const reference = { field, init, getCondition };
2171
+ references == null ? void 0 : references.value.push(reference);
2172
+ expose({
2173
+ getCondition,
2174
+ init
2175
+ });
2176
+ return (_ctx, _cache) => {
2177
+ const _component_el_option = resolveComponent("el-option");
2178
+ const _component_el_select = resolveComponent("el-select");
2179
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
2180
+ createElementVNode("div", _hoisted_2$5, toDisplayString(__props.label), 1),
2181
+ createElementVNode("div", _hoisted_3$3, [
2182
+ createVNode(_component_el_select, mergeProps({
2183
+ class: "fu-complex-select",
2184
+ placeholder: unref(t)("fu.search_bar.please_select"),
2185
+ modelValue: selection.value,
2186
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selection.value = $event),
2187
+ size: unref(configSize)
2188
+ }, _ctx.$attrs, { clearable: "" }), {
2189
+ default: withCtx(() => [
2190
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (o) => {
2191
+ return openBlock(), createBlock(_component_el_option, {
2192
+ key: o.value,
2193
+ label: o.label,
2194
+ value: o.value
2195
+ }, null, 8, ["label", "value"]);
2196
+ }), 128))
2197
+ ]),
2198
+ _: 1
2199
+ }, 16, ["placeholder", "modelValue", "size"])
2200
+ ])
2201
+ ]);
2202
+ };
2203
+ }
2204
+ }));
2205
+ var FuComplexSelect = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/complex-components/FuComplexSelect.vue"]]);
2206
+ const _hoisted_1$8 = { class: "fu-complex-component" };
2207
+ const _hoisted_2$4 = { class: "fu-complex-component__label" };
2208
+ const _hoisted_3$2 = { class: "fu-complex-component__content" };
2209
+ const __default__$c = { name: "FuComplexInput" };
2210
+ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$c), {
2211
+ props: {
2212
+ size: {
2213
+ type: String,
2214
+ validator: validateSize
2215
+ },
2216
+ label: String,
2217
+ field: {
2218
+ type: String,
2219
+ required: true
2220
+ }
2221
+ },
2222
+ setup(__props, { expose }) {
2223
+ const props = __props;
2224
+ const inputValue = ref("");
2225
+ const configSize = useSize();
2226
+ const { t } = useLocale();
2227
+ function getCondition() {
2228
+ if (!inputValue.value)
2229
+ return;
2230
+ let { field: field2, label } = props;
2231
+ let value = inputValue.value;
2232
+ let valueLabel = inputValue.value;
2233
+ return { field: field2, label, value, valueLabel };
2234
+ }
2235
+ function init(v) {
2236
+ inputValue.value = v !== void 0 ? v : "";
2237
+ }
2238
+ const references = inject(referenceKey);
2239
+ const field = props.field;
2240
+ const reference = { field, init, getCondition };
2241
+ references == null ? void 0 : references.value.push(reference);
2242
+ expose({
2243
+ getCondition,
2244
+ init
2245
+ });
2246
+ return (_ctx, _cache) => {
2247
+ const _component_el_input = resolveComponent("el-input");
2248
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
2249
+ createElementVNode("div", _hoisted_2$4, toDisplayString(__props.label), 1),
2250
+ createElementVNode("div", _hoisted_3$2, [
2251
+ createVNode(_component_el_input, mergeProps({
2252
+ modelValue: inputValue.value,
2253
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
2254
+ placeholder: unref(t)("fu.search_bar.please_input"),
2255
+ size: unref(configSize)
2256
+ }, _ctx.$attrs), null, 16, ["modelValue", "placeholder", "size"])
2257
+ ])
2258
+ ]);
2259
+ };
2260
+ }
2261
+ }));
2262
+ var FuComplexInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/complex-components/FuComplexInput.vue"]]);
2263
+ const _hoisted_1$7 = { class: "fu-complex-component" };
2264
+ const _hoisted_2$3 = { class: "fu-complex-component__label" };
2265
+ const _hoisted_3$1 = { class: "fu-complex-component__content" };
2266
+ const __default__$b = { name: "FuComplexDate" };
2267
+ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$b), {
1353
2268
  props: {
1354
- modelValue: [String, Number],
1355
- writeTrigger: {
2269
+ size: {
1356
2270
  type: String,
1357
- default: "onClick",
1358
- validator: (value) => {
1359
- return ["onClick", "onDblclick"].includes(value);
1360
- }
2271
+ validator: validateSize
2272
+ },
2273
+ label: String,
2274
+ field: {
2275
+ type: String,
2276
+ required: true
2277
+ },
2278
+ valueFormat: {
2279
+ type: String,
2280
+ default: "x"
1361
2281
  }
1362
2282
  },
1363
- emits: ["input", "blur"],
1364
- setup(__props, { emit }) {
2283
+ setup(__props, { expose }) {
1365
2284
  const props = __props;
1366
- const data = ref(props.modelValue);
1367
- watch(() => props.modelValue, (v) => {
1368
- data.value = v;
2285
+ const value = ref("");
2286
+ const valueLabel = computed(() => {
2287
+ return dateFormat(value.value[0]) + " ~ " + dateFormat(value.value[1]);
1369
2288
  });
1370
- function input(e) {
1371
- emit("input", data.value, e);
1372
- }
1373
- function blur(read, e) {
1374
- emit("blur", data.value, e);
1375
- read();
2289
+ const { t } = useLocale();
2290
+ const configSize = useSize();
2291
+ function getCondition() {
2292
+ if (!String(value.value))
2293
+ return;
2294
+ let { field: field2, label } = props;
2295
+ return { field: field2, label, value: value.value, valueLabel: valueLabel.value };
1376
2296
  }
1377
- function keydown(read, e) {
1378
- if (e.key === "Enter") {
1379
- read();
1380
- }
2297
+ function init(v) {
2298
+ value.value = v !== void 0 ? v : "";
1381
2299
  }
2300
+ const references = inject(referenceKey);
2301
+ const field = props.field;
2302
+ const reference = { field, init, getCondition };
2303
+ references == null ? void 0 : references.value.push(reference);
2304
+ expose({
2305
+ getCondition,
2306
+ init
2307
+ });
1382
2308
  return (_ctx, _cache) => {
1383
- const _component_el_input = resolveComponent("el-input");
1384
- return openBlock(), createBlock(FuReadWriteSwitch, {
1385
- "write-trigger": __props.writeTrigger,
1386
- data: data.value
1387
- }, {
1388
- default: withCtx(({ read }) => [
1389
- createVNode(_component_el_input, mergeProps({
1390
- modelValue: data.value,
1391
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value = $event)
2309
+ const _component_el_date_picker = resolveComponent("el-date-picker");
2310
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
2311
+ createElementVNode("div", _hoisted_2$3, toDisplayString(__props.label), 1),
2312
+ createElementVNode("div", _hoisted_3$1, [
2313
+ createVNode(_component_el_date_picker, mergeProps({
2314
+ class: "fu-complex-date",
2315
+ modelValue: value.value,
2316
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
1392
2317
  }, _ctx.$attrs, {
1393
- onInput: input,
1394
- onBlur: ($event) => blur(read, $event),
1395
- onKeydown: ($event) => keydown(read, $event)
1396
- }), null, 16, ["modelValue", "onBlur", "onKeydown"])
1397
- ]),
1398
- _: 1
1399
- }, 8, ["write-trigger", "data"]);
2318
+ size: unref(configSize),
2319
+ placeholder: unref(t)("fu.search_bar.select_date"),
2320
+ type: "daterange",
2321
+ "value-format": __props.valueFormat,
2322
+ "start-placeholder": unref(t)("fu.search_bar.start_date"),
2323
+ "end-placeholder": unref(t)("fu.search_bar.end_date")
2324
+ }), null, 16, ["modelValue", "size", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
2325
+ ])
2326
+ ]);
1400
2327
  };
1401
2328
  }
1402
2329
  }));
1403
- var FuInputRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/read-write-switch/FuInputRwSwitch.vue"]]);
1404
- const __default__$8 = { name: "FuSelectRwSwitch" };
1405
- const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$8), {
2330
+ var FuComplexDate = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/complex-components/FuComplexDate.vue"]]);
2331
+ const _hoisted_1$6 = { class: "fu-complex-component" };
2332
+ const _hoisted_2$2 = { class: "fu-complex-component__label" };
2333
+ const _hoisted_3 = { class: "fu-complex-component__content" };
2334
+ const __default__$a = { name: "FuComplexDateTime" };
2335
+ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$a), {
1406
2336
  props: {
1407
- modelValue: [String, Number],
1408
- options: {
1409
- type: Array,
1410
- default: []
2337
+ size: {
2338
+ type: String,
2339
+ validator: validateSize
1411
2340
  },
1412
- writeTrigger: {
2341
+ label: String,
2342
+ field: {
1413
2343
  type: String,
1414
- default: "onClick",
1415
- validator: (value) => {
1416
- return ["onClick", "onDblclick"].includes(value);
1417
- }
2344
+ required: true
2345
+ },
2346
+ valueFormat: {
2347
+ type: String,
2348
+ default: "x"
1418
2349
  }
1419
2350
  },
1420
- emits: ["input", "blur", "change"],
1421
- setup(__props, { emit }) {
2351
+ setup(__props, { expose }) {
1422
2352
  const props = __props;
1423
- const data = ref(props.modelValue);
1424
- watch(() => props.modelValue, (v) => {
1425
- data.value = v;
2353
+ const value = ref("");
2354
+ const configSize = useSize();
2355
+ const valueLabel = computed(() => {
2356
+ return datetimeFormat(value.value[0]) + " ~ " + datetimeFormat(value.value[1]);
1426
2357
  });
1427
- function input(e) {
1428
- emit("input", data.value, e);
1429
- }
1430
- function blur(read, e) {
1431
- setTimeout(() => {
1432
- read();
1433
- }, 100);
1434
- emit("blur", data.value, e);
2358
+ const { t } = useLocale();
2359
+ function getCondition() {
2360
+ if (!String(value.value))
2361
+ return;
2362
+ let { field: field2, label } = props;
2363
+ return { field: field2, label, value: value.value, valueLabel: valueLabel.value };
1435
2364
  }
1436
- function change(read, e) {
1437
- emit("change", data.value, e);
1438
- read();
2365
+ function init(v) {
2366
+ value.value = v !== void 0 ? v : "";
1439
2367
  }
2368
+ const references = inject(referenceKey);
2369
+ const field = props.field;
2370
+ const reference = { field, init, getCondition };
2371
+ references == null ? void 0 : references.value.push(reference);
2372
+ expose({
2373
+ getCondition,
2374
+ init
2375
+ });
1440
2376
  return (_ctx, _cache) => {
1441
- const _component_el_option = resolveComponent("el-option");
1442
- const _component_el_select = resolveComponent("el-select");
1443
- const _component_fu_read_write_switch = resolveComponent("fu-read-write-switch");
1444
- return openBlock(), createBlock(_component_fu_read_write_switch, {
1445
- "write-trigger": __props.writeTrigger,
1446
- data: data.value
1447
- }, {
1448
- read: withCtx(() => [
1449
- renderSlot(_ctx.$slots, "read", {}, () => [
1450
- createTextVNode(toDisplayString(data.value), 1)
1451
- ])
1452
- ]),
1453
- default: withCtx(({ read }) => [
1454
- createVNode(_component_el_select, mergeProps({
1455
- modelValue: data.value,
1456
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value = $event)
2377
+ const _component_el_date_picker = resolveComponent("el-date-picker");
2378
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
2379
+ createElementVNode("div", _hoisted_2$2, toDisplayString(__props.label), 1),
2380
+ createElementVNode("div", _hoisted_3, [
2381
+ createCommentVNode(' :size="configSize" '),
2382
+ createVNode(_component_el_date_picker, mergeProps({
2383
+ class: "fu-complex-date-time",
2384
+ modelValue: value.value,
2385
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
1457
2386
  }, _ctx.$attrs, {
1458
- onInput: input,
1459
- onBlur: ($event) => blur(read, $event),
1460
- onChange: ($event) => change(read, $event)
1461
- }), {
1462
- default: withCtx(() => [
1463
- renderSlot(_ctx.$slots, "default", {}, () => [
1464
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item) => {
1465
- return openBlock(), createBlock(_component_el_option, {
1466
- key: item.value,
1467
- label: item.label,
1468
- value: item.value
1469
- }, null, 8, ["label", "value"]);
1470
- }), 128))
1471
- ])
1472
- ]),
1473
- _: 2
1474
- }, 1040, ["modelValue", "onBlur", "onChange"])
1475
- ]),
1476
- _: 3
1477
- }, 8, ["write-trigger", "data"]);
2387
+ size: unref(configSize),
2388
+ placeholder: unref(t)("fu.search_bar.select_date_time"),
2389
+ type: "datetimerange",
2390
+ "value-format": __props.valueFormat,
2391
+ "start-placeholder": unref(t)("fu.search_bar.start_date_time"),
2392
+ "end-placeholder": unref(t)("fu.search_bar.end_date_time")
2393
+ }), null, 16, ["modelValue", "size", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
2394
+ ])
2395
+ ]);
1478
2396
  };
1479
2397
  }
1480
2398
  }));
1481
- var FuSelectRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/read-write-switch/FuSelectRwSwitch.vue"]]);
1482
- FuReadWriteSwitch.install = (app) => {
1483
- app.component(FuReadWriteSwitch.name, FuReadWriteSwitch);
1484
- app.component(FuInputRwSwitch.name, FuInputRwSwitch);
1485
- app.component(FuSelectRwSwitch.name, FuSelectRwSwitch);
2399
+ var FuComplexDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/search-bar/complex-components/FuComplexDateTime.vue"]]);
2400
+ FuSearchBar.install = (app) => {
2401
+ app.component(FuQuickSearch.name, FuQuickSearch);
2402
+ app.component(FuSearchBar.name, FuSearchBar);
2403
+ app.component(FuSearchBarButton.name, FuSearchBarButton);
2404
+ app.component(FuComplexSelect.name, FuComplexSelect);
2405
+ app.component(FuComplexInput.name, FuComplexInput);
2406
+ app.component(FuComplexDate.name, FuComplexDate);
2407
+ app.component(FuComplexDateTime.name, FuComplexDateTime);
1486
2408
  };
1487
- var __glob_1_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2409
+ var __glob_2_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1488
2410
  __proto__: null,
1489
- "default": FuReadWriteSwitch
2411
+ "default": FuSearchBar
1490
2412
  }, Symbol.toStringTag, { value: "Module" }));
1491
2413
  var _a;
1492
2414
  const isClient = typeof window !== "undefined";
@@ -1564,17 +2486,8 @@ const ClickOutside = {
1564
2486
  nodeList.delete(el);
1565
2487
  }
1566
2488
  };
1567
- const COMPONENTS_TYPE = ["default", "primary", "success", "warning", "danger", "info"];
1568
- const validateType = (value) => {
1569
- if (!value)
1570
- return true;
1571
- if (COMPONENTS_TYPE.includes(value)) {
1572
- return true;
1573
- }
1574
- console.error("types is not contains " + value);
1575
- return false;
1576
- };
1577
2489
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
2490
+ __name: "FuSpeedDialButton",
1578
2491
  props: {
1579
2492
  type: {
1580
2493
  type: String,
@@ -1595,10 +2508,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1595
2508
  },
1596
2509
  setup(__props) {
1597
2510
  return (_ctx, _cache) => {
2511
+ const _component_el_icon = resolveComponent("el-icon");
1598
2512
  return openBlock(), createElementBlock("div", {
1599
2513
  class: normalizeClass([
1600
2514
  "fu-speed-dial-button",
1601
- "fu-speed-dial-button--" + __props.type,
2515
+ "el-button",
2516
+ "el-button--" + __props.type,
1602
2517
  {
1603
2518
  "fu-speed-dial-button--rotate": __props.rotate,
1604
2519
  "is-disabled": __props.disabled,
@@ -1614,22 +2529,27 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1614
2529
  })
1615
2530
  }, [
1616
2531
  renderSlot(_ctx.$slots, "default", {}, () => [
1617
- createElementVNode("i", {
1618
- class: normalizeClass(__props.icon)
1619
- }, null, 2)
2532
+ createVNode(_component_el_icon, null, {
2533
+ default: withCtx(() => [
2534
+ (openBlock(), createBlock(resolveDynamicComponent(__props.icon)))
2535
+ ]),
2536
+ _: 1
2537
+ })
1620
2538
  ])
1621
2539
  ], 6);
1622
2540
  };
1623
2541
  }
1624
2542
  });
1625
- var FuSpeedDialButton = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialButton.vue"]]);
2543
+ var FuSpeedDialButton = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialButton.vue"]]);
2544
+ const SpeedDialKey = Symbol("SpeedDialKey");
1626
2545
  const _hoisted_1$5 = { class: "fu-speed-dial-action-button" };
1627
2546
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
2547
+ __name: "FuSpeedDialActionButton",
1628
2548
  props: {
1629
2549
  index: Number,
1630
2550
  icon: {
1631
2551
  type: String,
1632
- default: "el-icon-plus"
2552
+ default: "Plus"
1633
2553
  },
1634
2554
  titleClass: String,
1635
2555
  titleBgColor: String,
@@ -1642,18 +2562,16 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1642
2562
  emits: ["click"],
1643
2563
  setup(__props, { emit }) {
1644
2564
  const props = __props;
1645
- const FuSpeedDial2 = inject("FuSpeedDial");
2565
+ const speedDialKey = inject(SpeedDialKey);
1646
2566
  const config = computed(() => {
1647
- return FuSpeedDial2.config;
2567
+ return speedDialKey == null ? void 0 : speedDialKey.config;
1648
2568
  });
1649
2569
  const direction = computed(() => {
1650
- return FuSpeedDial2.direction;
1651
- });
1652
- computed(() => {
1653
- return FuSpeedDial2.clickClose;
2570
+ return (speedDialKey == null ? void 0 : speedDialKey.direction.value) || "";
1654
2571
  });
1655
2572
  const titleSize = computed(() => {
1656
- let size = config.value.fab.size + "px";
2573
+ var _a2;
2574
+ let size = ((_a2 = config.value) == null ? void 0 : _a2.fab.size) + "px";
1657
2575
  let style = { position: "absolute", height: size };
1658
2576
  if (["top", "bottom"].includes(direction.value)) {
1659
2577
  style["text-align"] = "right";
@@ -1661,7 +2579,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1661
2579
  } else {
1662
2580
  style["text-align"] = "center";
1663
2581
  style["min-width"] = size;
1664
- if (props.index % 2 === 0) {
2582
+ if (props.index || 0 % 2 === 0) {
1665
2583
  style.top = size;
1666
2584
  } else {
1667
2585
  style.top = "-" + size;
@@ -1670,22 +2588,24 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1670
2588
  return style;
1671
2589
  });
1672
2590
  const titleStyle = computed(() => {
2591
+ var _a2;
1673
2592
  let backgroundColor = props.titleBgColor;
1674
2593
  let color = props.titleColor;
1675
- let fontSize = config.value.item.titleFontSize;
2594
+ let fontSize = (_a2 = config.value) == null ? void 0 : _a2.item.titleFontSize;
1676
2595
  return { backgroundColor, color, fontSize };
1677
2596
  });
1678
2597
  const buttonProps = computed(() => {
2598
+ var _a2, _b;
1679
2599
  let backgroundColor = props.bgColor;
1680
2600
  let color = props.color;
1681
- let fontSize = config.value.item.buttonFontSize;
1682
- let size = config.value.item.size + "px";
2601
+ let fontSize = (_a2 = config.value) == null ? void 0 : _a2.item.buttonFontSize;
2602
+ let size = ((_b = config.value) == null ? void 0 : _b.item.size) + "px";
1683
2603
  return { backgroundColor, color, fontSize, size };
1684
2604
  });
1685
2605
  function click(e) {
1686
- const { index: index2, title } = props;
1687
- emit("click", { index: index2, title }, e);
1688
- FuSpeedDial2.close();
2606
+ const { index, title } = props;
2607
+ emit("click", { index, title }, e);
2608
+ speedDialKey == null ? void 0 : speedDialKey.close();
1689
2609
  }
1690
2610
  return (_ctx, _cache) => {
1691
2611
  return openBlock(), createElementBlock("div", _hoisted_1$5, [
@@ -1712,9 +2632,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1712
2632
  };
1713
2633
  }
1714
2634
  });
1715
- var FuSpeedDialActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialActionButton.vue"]]);
1716
- const __default__$7 = { name: "FuSpeedDialItem" };
1717
- const _sfc_main$c = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$7), {
2635
+ var FuSpeedDialActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialActionButton.vue"]]);
2636
+ const __default__$9 = { name: "FuSpeedDialItem" };
2637
+ const _sfc_main$c = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$9), {
1718
2638
  props: {
1719
2639
  index: {
1720
2640
  type: Number,
@@ -1723,33 +2643,33 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1723
2643
  },
1724
2644
  setup(__props) {
1725
2645
  const props = __props;
1726
- const FuSpeedDial2 = inject("FuSpeedDial");
2646
+ const speedDialKey = inject(SpeedDialKey);
1727
2647
  const config = computed(() => {
1728
- return FuSpeedDial2.config;
2648
+ return speedDialKey == null ? void 0 : speedDialKey.config;
1729
2649
  });
1730
2650
  const direction = computed(() => {
1731
- return FuSpeedDial2.direction;
2651
+ return (speedDialKey == null ? void 0 : speedDialKey.direction.value) || "";
1732
2652
  });
1733
2653
  const isActive = computed(() => {
1734
- return FuSpeedDial2.active;
1735
- });
1736
- computed(() => {
1737
- return FuSpeedDial2.size;
2654
+ var _a2;
2655
+ return (_a2 = speedDialKey == null ? void 0 : speedDialKey.active) == null ? void 0 : _a2.value;
1738
2656
  });
1739
2657
  const spacing = computed(() => {
1740
2658
  return config.value.item.spacing || 0;
1741
2659
  });
1742
2660
  const directionPosition = computed(() => {
2661
+ var _a2, _b, _c, _d;
1743
2662
  if (["top", "left"].includes(direction.value)) {
1744
- return -config.value.fab.size - spacing.value;
2663
+ return -((_b = (_a2 = config.value) == null ? void 0 : _a2.fab) == null ? void 0 : _b.size) - spacing.value;
1745
2664
  }
1746
- return config.value.fab.size + spacing.value;
2665
+ return ((_d = (_c = config.value) == null ? void 0 : _c.fab) == null ? void 0 : _d.size) + spacing.value;
1747
2666
  });
1748
2667
  const itemSize = computed(() => {
1749
- let size2 = config.value.fab.size + "px";
2668
+ var _a2, _b;
2669
+ let size = ((_b = (_a2 = config.value) == null ? void 0 : _a2.fab) == null ? void 0 : _b.size) + "px";
1750
2670
  return {
1751
- width: size2,
1752
- height: size2
2671
+ width: size,
2672
+ height: size
1753
2673
  };
1754
2674
  });
1755
2675
  function setPosition(el, position) {
@@ -1803,13 +2723,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1803
2723
  };
1804
2724
  }
1805
2725
  }));
1806
- var FuSpeedDialItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialItem.vue"]]);
2726
+ var FuSpeedDialItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialItem.vue"]]);
1807
2727
  const _hoisted_1$4 = { class: "fu-speed-dial__content" };
1808
- const __default__$6 = { name: "FuSpeedDial" };
1809
- const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$6), {
2728
+ const __default__$8 = { name: "FuSpeedDial" };
2729
+ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$8), {
1810
2730
  props: {
2731
+ modelValue: Boolean,
1811
2732
  id: String,
1812
- value: Boolean,
1813
2733
  type: {
1814
2734
  type: String,
1815
2735
  default: "primary"
@@ -1818,7 +2738,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1818
2738
  size: {
1819
2739
  type: String,
1820
2740
  default: "default",
1821
- validator: (value) => ["big", "default", "medium", "small"].includes(value)
2741
+ validator: (value) => ["large", "default", "small"].includes(value)
1822
2742
  },
1823
2743
  direction: {
1824
2744
  type: String,
@@ -1827,11 +2747,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1827
2747
  },
1828
2748
  icon: {
1829
2749
  type: String,
1830
- default: "el-icon-plus"
2750
+ default: "Plus"
1831
2751
  },
1832
2752
  activeIcon: {
1833
2753
  type: String,
1834
- default: "el-icon-close"
2754
+ default: "Close"
1835
2755
  },
1836
2756
  movable: {
1837
2757
  type: Boolean,
@@ -1866,7 +2786,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1866
2786
  type: Object,
1867
2787
  default: () => {
1868
2788
  return {
1869
- big: {
2789
+ large: {
1870
2790
  fab: { size: 56, fontSize: "18px" },
1871
2791
  item: { size: 40, spacing: 0, titleFontSize: "14px", buttonFontSize: "18px" }
1872
2792
  },
@@ -1874,12 +2794,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1874
2794
  fab: { size: 40, fontSize: "16px" },
1875
2795
  item: { size: 32, spacing: 0, titleFontSize: "14px", buttonFontSize: "16px" }
1876
2796
  },
1877
- medium: {
1878
- fab: { size: 36, fontSize: "14px" },
1879
- item: { size: 28, spacing: 0, titleFontSize: "12px", buttonFontSize: "14px" }
1880
- },
1881
2797
  small: {
1882
- fab: { size: 32, fontSize: "12px" },
2798
+ fab: { size: 32, fontSize: "12px", padding: 0 },
1883
2799
  item: { size: 24, spacing: 0, titleFontSize: "12px", buttonFontSize: "12px" }
1884
2800
  }
1885
2801
  };
@@ -1891,23 +2807,23 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1891
2807
  const props = __props;
1892
2808
  const slots = useSlots();
1893
2809
  const instance = getCurrentInstance();
1894
- const { zIndex, position, left, top, right, bottom } = props;
1895
2810
  const active = ref(false);
1896
2811
  const moving = ref(false);
1897
- const style = reactive({ zIndex, position, left, top, right, bottom });
1898
- const updateStyle = function() {
1899
- style.value = { zIndex, position, left, top, right, bottom };
1900
- };
1901
- provide("FuSpeedDial", instance);
1902
- watch(() => props.value, (v) => {
2812
+ const { zIndex, position, left, top, right, bottom } = props;
2813
+ const style = ref({ zIndex, position, left, top, right, bottom });
2814
+ watch(() => props.modelValue, (v) => {
1903
2815
  active.value = v;
1904
2816
  });
1905
- watch(() => props.position, updateStyle);
1906
- watch(() => props.zIndex, updateStyle);
1907
- watch(() => props.left, updateStyle);
1908
- watch(() => props.right, updateStyle);
1909
- watch(() => props.top, updateStyle);
1910
- watch(() => props.bottom, updateStyle);
2817
+ watch(() => props.position, () => updateStyle());
2818
+ watch(() => props.zIndex, () => updateStyle());
2819
+ watch(() => props.left, () => updateStyle());
2820
+ watch(() => props.right, () => updateStyle());
2821
+ watch(() => props.top, () => updateStyle());
2822
+ watch(() => props.bottom, () => updateStyle());
2823
+ function updateStyle() {
2824
+ const { zIndex: zIndex2, position: position2, left: left2, top: top2, right: right2, bottom: bottom2 } = props;
2825
+ style.value = { zIndex: zIndex2, position: position2, left: left2, top: top2, right: right2, bottom: bottom2 };
2826
+ }
1911
2827
  const saveKey = computed(() => {
1912
2828
  return "Fu-SD-" + props.localKey;
1913
2829
  });
@@ -1921,13 +2837,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1921
2837
  return props.sizeOptions[props.size] || props.sizeOptions["default"];
1922
2838
  });
1923
2839
  const buttonProps = computed(() => {
1924
- let type = props.type;
1925
2840
  let rotate = true;
1926
- let activeValue = active.value;
1927
2841
  let size = config.value.fab.size + "px";
1928
2842
  let fontSize = config.value.fab.fontSize;
1929
2843
  let icon = props.activeIcon === props.icon ? props.icon : active.value ? props.activeIcon : props.icon;
1930
- return { type, rotate, active: activeValue, size, fontSize, icon };
2844
+ return { type: props.type, rotate, active: active.value, size, fontSize, icon };
1931
2845
  });
1932
2846
  const spacing = computed(() => {
1933
2847
  let spacing2 = config.value.item.spacing || 0;
@@ -1939,18 +2853,18 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1939
2853
  if (["top", "left"].includes(props.direction)) {
1940
2854
  position2 = -config.value.fab.size - spacing.value;
1941
2855
  }
1942
- let style2 = { position: "absolute", zIndex: props.zIndex };
2856
+ let positionStyle = { position: "absolute", zIndex: props.zIndex };
1943
2857
  if (["top", "bottom"].includes(props.direction)) {
1944
- style2.top = position2 + "px";
2858
+ positionStyle.top = position2 + "px";
1945
2859
  } else {
1946
- style2.top = 0;
1947
- style2.left = position2 + "px";
2860
+ positionStyle.top = 0;
2861
+ positionStyle.left = position2 + "px";
1948
2862
  }
1949
- return style2;
2863
+ return positionStyle;
1950
2864
  });
1951
- function toggle(active2) {
2865
+ function toggle(bool) {
1952
2866
  if (!moving.value && hashChildren.value) {
1953
- active2.value = active2 === void 0 ? !active2.value : active2;
2867
+ active.value = bool === void 0 ? !active.value : bool;
1954
2868
  }
1955
2869
  }
1956
2870
  function outsideClickClose() {
@@ -1966,7 +2880,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1966
2880
  emit("click", [props.id, active.value], e);
1967
2881
  }
1968
2882
  function mousedown() {
1969
- if (moving.value) {
2883
+ if (props.movable) {
1970
2884
  document.addEventListener("mousemove", mousemove);
1971
2885
  document.addEventListener("mouseup", mouseup);
1972
2886
  }
@@ -1974,7 +2888,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1974
2888
  function mousemove(e) {
1975
2889
  moving.value = true;
1976
2890
  if (props.position === "fixed") {
1977
- const el = instance.vnode.el;
2891
+ const el = instance == null ? void 0 : instance.vnode.el;
1978
2892
  const rect = el.getBoundingClientRect();
1979
2893
  let left2 = e.clientX - rect.width / 2;
1980
2894
  let top2 = e.clientY - rect.height / 2;
@@ -1984,9 +2898,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1984
2898
  delete style.value.bottom;
1985
2899
  }
1986
2900
  if (props.position === "absolute") {
1987
- const { offsetLeft, offsetTop, clientWidth, clientHeight, offsetParent } = this.$el;
1988
- const maxWidth = offsetParent.clientWidth - clientWidth;
1989
- const maxHeight = offsetParent.clientHeight - clientHeight;
2901
+ const { offsetLeft, offsetTop, clientWidth, clientHeight, offsetParent } = instance == null ? void 0 : instance.vnode.el;
2902
+ const maxWidth = offsetParent && offsetParent.clientWidth || 0 - clientWidth;
2903
+ const maxHeight = offsetParent && offsetParent.clientHeight || 0 - clientHeight;
1990
2904
  let left2 = offsetLeft + e.movementX;
1991
2905
  let top2 = offsetTop + e.movementY;
1992
2906
  if (left2 > 0 && left2 < maxWidth) {
@@ -2021,13 +2935,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2021
2935
  console.warn(saveKey.value + " error", e);
2022
2936
  }
2023
2937
  }
2024
- function itemClick(arg, e) {
2025
- console.log(arg);
2026
- const { index: index2 } = arg;
2027
- if (index2 !== void 0) {
2028
- const item = props.items[index2];
2938
+ function itemClick(index) {
2939
+ if (index !== void 0) {
2940
+ const item = props.items[index];
2029
2941
  if (item.click && typeof item.click === "function")
2030
- return item.click(arg, e);
2942
+ return item.click(index);
2031
2943
  }
2032
2944
  }
2033
2945
  function close() {
@@ -2036,6 +2948,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2036
2948
  }
2037
2949
  emit("close", [props.id, active.value]);
2038
2950
  }
2951
+ provide(SpeedDialKey, {
2952
+ config: config.value,
2953
+ direction: computed(() => props.direction),
2954
+ active,
2955
+ close
2956
+ });
2039
2957
  onMounted(() => {
2040
2958
  readPosition();
2041
2959
  });
@@ -2045,7 +2963,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2045
2963
  return (_ctx, _cache) => {
2046
2964
  return withDirectives((openBlock(), createElementBlock("div", {
2047
2965
  class: "fu-speed-dial",
2048
- style: normalizeStyle(unref(style))
2966
+ style: normalizeStyle(style.value)
2049
2967
  }, [
2050
2968
  createElementVNode("div", _hoisted_1$4, [
2051
2969
  renderSlot(_ctx.$slots, "fab", {}, () => [
@@ -2058,11 +2976,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2058
2976
  style: normalizeStyle(unref(contentPosition))
2059
2977
  }, [
2060
2978
  renderSlot(_ctx.$slots, "default", {}, () => [
2061
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index2) => {
2979
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
2062
2980
  return openBlock(), createBlock(FuSpeedDialItem, mergeProps({
2063
- index: index2,
2064
- key: index2
2065
- }, item, { onClick: itemClick }), null, 16, ["index"]);
2981
+ index,
2982
+ key: index
2983
+ }, item, {
2984
+ onClick: ($event) => itemClick(index)
2985
+ }), null, 16, ["index", "onClick"]);
2066
2986
  }), 128))
2067
2987
  ])
2068
2988
  ], 4)
@@ -2073,12 +2993,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2073
2993
  };
2074
2994
  }
2075
2995
  }));
2076
- var FuSpeedDial = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDial.vue"]]);
2996
+ var FuSpeedDial = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDial.vue"]]);
2077
2997
  FuSpeedDial.install = (app) => {
2078
2998
  app.component(FuSpeedDial.name, FuSpeedDial);
2079
2999
  app.component(FuSpeedDialItem.name, FuSpeedDialItem);
2080
3000
  };
2081
- var __glob_1_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3001
+ var __glob_2_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2082
3002
  __proto__: null,
2083
3003
  "default": FuSpeedDial
2084
3004
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2086,8 +3006,8 @@ const _hoisted_1$3 = {
2086
3006
  key: 0,
2087
3007
  class: "icon"
2088
3008
  };
2089
- const __default__$5 = { name: "FuSplitPane" };
2090
- const _sfc_main$a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$5), {
3009
+ const __default__$7 = { name: "FuSplitPane" };
3010
+ const _sfc_main$a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$7), {
2091
3011
  props: {
2092
3012
  min: {
2093
3013
  type: [Number, String],
@@ -2289,22 +3209,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2289
3209
  };
2290
3210
  }
2291
3211
  }));
2292
- var FuSplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/split-pane/FuSplitPane.vue"]]);
3212
+ var FuSplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/split-pane/FuSplitPane.vue"]]);
2293
3213
  FuSplitPane.install = (app) => {
2294
3214
  app.component(FuSplitPane.name, FuSplitPane);
2295
3215
  };
2296
- var __glob_1_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3216
+ var __glob_2_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2297
3217
  __proto__: null,
2298
3218
  "default": FuSplitPane
2299
3219
  }, Symbol.toStringTag, { value: "Module" }));
2300
- var index = {
2301
- install: (app) => {
2302
- }
2303
- };
2304
- var __glob_1_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2305
- __proto__: null,
2306
- "default": index
2307
- }, Symbol.toStringTag, { value: "Module" }));
2308
3220
  function isFragment(node) {
2309
3221
  return isVNode(node) && node.type === Fragment;
2310
3222
  }
@@ -2369,8 +3281,9 @@ const FuTableBody = (props, context) => {
2369
3281
  });
2370
3282
  return nodes;
2371
3283
  };
2372
- const __default__$4 = { name: "FuTable" };
2373
- const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
3284
+ const LocalKey = Symbol("LocalKey");
3285
+ const __default__$6 = { name: "FuTable" };
3286
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$6), {
2374
3287
  props: {
2375
3288
  columns: Array,
2376
3289
  refresh: {
@@ -2390,7 +3303,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2390
3303
  };
2391
3304
  const updateNodes = (nodes) => {
2392
3305
  nodes.forEach((node) => {
2393
- if (!node.type.key) {
3306
+ if (isValidElementNode(node) && !node.type.key) {
2394
3307
  node.type.key = getLabel(node);
2395
3308
  }
2396
3309
  });
@@ -2465,7 +3378,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2465
3378
  initColumns(children, props.columns);
2466
3379
  }
2467
3380
  });
2468
- provide("localKey", props.localKey);
3381
+ provide(LocalKey, props.localKey);
2469
3382
  onUpdated(() => {
2470
3383
  updateNodes(children);
2471
3384
  updateColumns(children, props.columns);
@@ -2492,15 +3405,15 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2492
3405
  };
2493
3406
  }
2494
3407
  }));
2495
- var FuTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/FuTable.vue"]]);
3408
+ var FuTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/FuTable.vue"]]);
2496
3409
  const tableColumnSelect = (localKey) => {
2497
3410
  const columnsKey = computed(() => {
2498
3411
  return localKey ? "FU-T-" + localKey : "";
2499
3412
  });
2500
- function dragstart(event, index2) {
3413
+ function dragstart(event, index) {
2501
3414
  if (event.dataTransfer) {
2502
3415
  event.dataTransfer.effectAllowed = "move";
2503
- event.dataTransfer.setData("source_index", index2);
3416
+ event.dataTransfer.setData("source_index", index);
2504
3417
  }
2505
3418
  }
2506
3419
  function dragenter(event) {
@@ -2522,11 +3435,11 @@ const tableColumnSelect = (localKey) => {
2522
3435
  event.dataTransfer.clearData();
2523
3436
  }
2524
3437
  }
2525
- function drop(event, list, index2) {
3438
+ function drop(event, list, index) {
2526
3439
  var _a2;
2527
3440
  let target = event.target;
2528
3441
  let source_index = Number((_a2 = event.dataTransfer) == null ? void 0 : _a2.getData("source_index"));
2529
- let target_index = index2;
3442
+ let target_index = index;
2530
3443
  if (target_index > source_index) {
2531
3444
  list.splice(target_index + 1, 0, list[source_index]);
2532
3445
  list.splice(source_index, 1);
@@ -2550,6 +3463,7 @@ const tableColumnSelect = (localKey) => {
2550
3463
  const _hoisted_1$2 = { class: "fu-table-column-select-popper__body" };
2551
3464
  const _hoisted_2$1 = { class: "fu-table-column-select-popper__footer" };
2552
3465
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3466
+ __name: "FuTableColumnSelectPopover",
2553
3467
  props: {
2554
3468
  icon: {
2555
3469
  type: String,
@@ -2568,7 +3482,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2568
3482
  setup(__props) {
2569
3483
  const props = __props;
2570
3484
  const { t } = useLocale();
2571
- const localKey = inject("localKey");
3485
+ const localKey = inject(LocalKey, void 0);
2572
3486
  const {
2573
3487
  columnsKey,
2574
3488
  dragstart,
@@ -2597,11 +3511,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2597
3511
  const _component_el_checkbox = resolveComponent("el-checkbox");
2598
3512
  const _component_el_button = resolveComponent("el-button");
2599
3513
  const _component_el_popover = resolveComponent("el-popover");
2600
- return withDirectives((openBlock(), createBlock(_component_el_popover, {
3514
+ return openBlock(), createBlock(_component_el_popover, {
2601
3515
  class: "fu-table-column-select",
2602
3516
  "popper-class": "fu-table-column-select-popper",
2603
3517
  trigger: __props.trigger,
2604
- "show-arrow": false
3518
+ "show-arrow": false,
3519
+ style: normalizeStyle({ "visibility": unref(hasSelect) ? "visible" : "hidden" })
2605
3520
  }, {
2606
3521
  reference: withCtx(() => [
2607
3522
  createVNode(_component_el_button, {
@@ -2658,25 +3573,19 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2658
3573
  ])
2659
3574
  ]),
2660
3575
  _: 1
2661
- }, 8, ["trigger"])), [
2662
- [vShow, unref(hasSelect)]
2663
- ]);
3576
+ }, 8, ["trigger", "style"]);
2664
3577
  };
2665
3578
  }
2666
3579
  });
2667
- var FuTableColumnSelectPopover = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/table-column-select/FuTableColumnSelectPopover.vue"]]);
3580
+ var FuTableColumnSelectPopover = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/table-column-select/FuTableColumnSelectPopover.vue"]]);
2668
3581
  const _hoisted_1$1 = { style: { "display": "inline-block" } };
2669
3582
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3583
+ __name: "FuTableColumnSelectDialog",
2670
3584
  props: {
2671
3585
  icon: {
2672
3586
  type: String,
2673
3587
  default: "Setting"
2674
3588
  },
2675
- trigger: {
2676
- type: String,
2677
- default: "hover",
2678
- validator: (value) => ["click", "hover"].includes(value)
2679
- },
2680
3589
  columns: {
2681
3590
  type: Array,
2682
3591
  default: () => []
@@ -2684,7 +3593,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2684
3593
  },
2685
3594
  setup(__props) {
2686
3595
  const props = __props;
2687
- const localKey = inject("localKey");
3596
+ const localKey = inject(LocalKey, void 0);
2688
3597
  const { t } = useLocale();
2689
3598
  const cloneColumn = (source, target) => {
2690
3599
  source.forEach((col) => {
@@ -2714,7 +3623,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2714
3623
  visible.value = false;
2715
3624
  }
2716
3625
  function reset() {
2717
- if (columnsKey) {
3626
+ if (columnsKey.value) {
2718
3627
  localStorage.removeItem(columnsKey.value);
2719
3628
  }
2720
3629
  props.columns.splice(0, props.columns.length);
@@ -2726,7 +3635,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2726
3635
  const _component_el_checkbox = resolveComponent("el-checkbox");
2727
3636
  const _component_el_dialog = resolveComponent("el-dialog");
2728
3637
  return openBlock(), createElementBlock("div", _hoisted_1$1, [
2729
- createCommentVNode(' :size="configSize" '),
2730
3638
  createVNode(_component_el_button, {
2731
3639
  class: "fu-search-bar-button",
2732
3640
  icon: __props.icon,
@@ -2803,7 +3711,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2803
3711
  };
2804
3712
  }
2805
3713
  });
2806
- var FuTableColumnSelectDialog = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/table-column-select/FuTableColumnSelectDialog.vue"]]);
3714
+ var FuTableColumnSelectDialog = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/table-column-select/FuTableColumnSelectDialog.vue"]]);
2807
3715
  const _sfc_main$6 = defineComponent({
2808
3716
  name: "FuTableColumnSelect",
2809
3717
  props: ["type"],
@@ -2818,12 +3726,9 @@ const _sfc_main$6 = defineComponent({
2818
3726
  };
2819
3727
  }
2820
3728
  });
2821
- var FuTableColumnSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/table-column-select/FuTableColumnSelect.vue"]]);
2822
- FuTableColumnSelect.install = (app) => {
2823
- app.component(FuTableColumnSelect.name, FuTableColumnSelect);
2824
- };
2825
- const __default__$3 = { name: "FuTablePagination" };
2826
- const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$3), {
3729
+ var FuTableColumnSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/table-column-select/FuTableColumnSelect.vue"]]);
3730
+ const __default__$5 = { name: "FuTablePagination" };
3731
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$5), {
2827
3732
  props: {
2828
3733
  currentPage: {
2829
3734
  type: Number,
@@ -2870,13 +3775,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2870
3775
  };
2871
3776
  }
2872
3777
  }));
2873
- var FuTablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/FuTablePagination.vue"]]);
2874
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3778
+ var FuTablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/FuTablePagination.vue"]]);
3779
+ const __default__$4 = { name: "FuTableButton" };
3780
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
2875
3781
  props: {
2876
- size: {
2877
- type: String,
2878
- default: "default"
2879
- },
2880
3782
  label: String,
2881
3783
  disabled: Boolean,
2882
3784
  icon: Boolean
@@ -2901,9 +3803,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2901
3803
  }, 8, ["content", "disabled"]);
2902
3804
  };
2903
3805
  }
2904
- });
2905
- var FuTableButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/table-operations/FuTableButton.vue"]]);
2906
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3806
+ }));
3807
+ var FuTableButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/table-operations/FuTableButton.vue"]]);
3808
+ const __default__$3 = { name: "FuTableMoreButton" };
3809
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$3), {
2907
3810
  props: {
2908
3811
  row: Object,
2909
3812
  buttons: {
@@ -2977,7 +3880,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2977
3880
  _: 1
2978
3881
  })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2979
3882
  createTextVNode(toDisplayString(unref(t)("fu.table.more")), 1)
2980
- ], 2112))
3883
+ ], 64))
2981
3884
  ]),
2982
3885
  _: 1
2983
3886
  })
@@ -2986,8 +3889,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2986
3889
  });
2987
3890
  };
2988
3891
  }
2989
- });
2990
- var FuTableMoreButton = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/table-operations/FuTableMoreButton.vue"]]);
3892
+ }));
3893
+ var FuTableMoreButton = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/table-operations/FuTableMoreButton.vue"]]);
2991
3894
  const __default__$2 = { name: "FuTableOperations" };
2992
3895
  const _sfc_main$2 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$2), {
2993
3896
  props: {
@@ -2999,7 +3902,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
2999
3902
  minWidth: [String, Number],
3000
3903
  ellipsis: {
3001
3904
  type: Number,
3002
- default: 3
3905
+ default: 2
3003
3906
  },
3004
3907
  buttons: {
3005
3908
  type: Array,
@@ -3077,7 +3980,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
3077
3980
  _: 2
3078
3981
  }, 1024)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3079
3982
  createTextVNode(toDisplayString(btn.label), 1)
3080
- ], 2112))
3983
+ ], 64))
3081
3984
  ]),
3082
3985
  _: 2
3083
3986
  }, 1032, ["icon", "onClick", "disabled", "label", "type"]);
@@ -3094,12 +3997,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
3094
3997
  };
3095
3998
  }
3096
3999
  }));
3097
- var FuTableOperations = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/table-operations/FuTableOperations.vue"]]);
3098
- FuTableOperations.install = (app) => {
3099
- app.component(FuTableOperations.name, FuTableOperations);
3100
- app.component(FuTableButton.name, FuTableButton);
3101
- app.component(FuTableMoreButton.name, FuTableMoreButton);
3102
- };
4000
+ var FuTableOperations = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/table-operations/FuTableOperations.vue"]]);
3103
4001
  const _hoisted_1 = { class: "fu-dropdown-link" };
3104
4002
  const _hoisted_2 = {
3105
4003
  key: 0,
@@ -3155,11 +4053,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
3155
4053
  row
3156
4054
  };
3157
4055
  }
3158
- function show(index2) {
3159
- instance.refs[`dropdown${index2}`].handleOpen();
4056
+ function show(index) {
4057
+ instance.refs[`dropdown${index}`].handleOpen();
3160
4058
  }
3161
- function hide(index2) {
3162
- instance.refs[`dropdown${index2}`].handleClose();
4059
+ function hide(index) {
4060
+ instance.refs[`dropdown${index}`].handleClose();
3163
4061
  }
3164
4062
  expose({
3165
4063
  show,
@@ -3233,18 +4131,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
3233
4131
  };
3234
4132
  }
3235
4133
  }));
3236
- var FuTableColumnDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/table/table-column-dropdown/FuTableColumnDropdown.vue"]]);
3237
- FuTableColumnDropdown.install = (app) => {
3238
- app.component(FuTableColumnDropdown.name, FuTableColumnDropdown);
3239
- };
4134
+ var FuTableColumnDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/table/FuTableColumnDropdown.vue"]]);
3240
4135
  FuTable.install = (app) => {
3241
4136
  app.component(FuTable.name, FuTable);
3242
4137
  app.component(FuTablePagination.name, FuTablePagination);
3243
- app.use(FuTableOperations.install);
3244
- app.use(FuTableColumnSelect.install);
3245
- app.use(FuTableColumnDropdown.install);
4138
+ app.component(FuTableColumnSelect.name, FuTableColumnSelect);
4139
+ app.component(FuTableColumnDropdown.name, FuTableColumnDropdown);
4140
+ app.component(FuTableOperations.name, FuTableOperations);
4141
+ app.component(FuTableButton.name, FuTableButton);
4142
+ app.component(FuTableMoreButton.name, FuTableMoreButton);
3246
4143
  };
3247
- var __glob_1_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4144
+ var __glob_2_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3248
4145
  __proto__: null,
3249
4146
  "default": FuTable
3250
4147
  }, Symbol.toStringTag, { value: "Module" }));
@@ -3303,10 +4200,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
3303
4200
  addable: false
3304
4201
  }, _ctx.$attrs), {
3305
4202
  default: withCtx(() => [
3306
- renderSlot(_ctx.$slots, "default"),
3307
4203
  __props.addable ? (openBlock(), createBlock(_component_el_tab_pane, {
3308
4204
  name: "add",
3309
- key: "add"
4205
+ key: "add",
4206
+ lazy: true
3310
4207
  }, {
3311
4208
  label: withCtx(() => [
3312
4209
  renderSlot(_ctx.$slots, "add", {}, () => [
@@ -3352,7 +4249,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
3352
4249
  }),
3353
4250
  __props.addButtonLabel ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3354
4251
  createTextVNode(toDisplayString(__props.addButtonLabel), 1)
3355
- ], 2112)) : createCommentVNode("v-if", true)
4252
+ ], 64)) : createCommentVNode("v-if", true)
3356
4253
  ]),
3357
4254
  _: 1
3358
4255
  })
@@ -3375,7 +4272,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
3375
4272
  }),
3376
4273
  __props.addButtonLabel ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3377
4274
  createTextVNode(toDisplayString(__props.addButtonLabel), 1)
3378
- ], 2112)) : createCommentVNode("v-if", true)
4275
+ ], 64)) : createCommentVNode("v-if", true)
3379
4276
  ]),
3380
4277
  _: 1
3381
4278
  })
@@ -3383,28 +4280,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
3383
4280
  ])
3384
4281
  ]),
3385
4282
  _: 3
3386
- })) : createCommentVNode("v-if", true)
4283
+ })) : createCommentVNode("v-if", true),
4284
+ renderSlot(_ctx.$slots, "default")
3387
4285
  ]),
3388
4286
  _: 3
3389
4287
  }, 16);
3390
4288
  };
3391
4289
  }
3392
4290
  }));
3393
- var FuTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/wangdan/\u5DE5\u4F5C/fit2cloud-ui-plus/src/components/tabs/FuTabs.vue"]]);
4291
+ var FuTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/tabs/FuTabs.vue"]]);
3394
4292
  FuTabs.install = (app) => {
3395
4293
  app.component(FuTabs.name, FuTabs);
3396
4294
  };
3397
- var __glob_1_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4295
+ var __glob_2_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3398
4296
  __proto__: null,
3399
4297
  "default": FuTabs
3400
4298
  }, Symbol.toStringTag, { value: "Module" }));
3401
4299
  const name = "fit2cloud-ui-plus";
3402
- const version = "0.0.1-beta.8";
4300
+ const version = "1.0.0-beta.2";
3403
4301
  const main = "./lib/fit2cloud-ui-plus.es.js";
3404
4302
  const files = [
3405
4303
  "lib",
3406
- "src"
4304
+ "src",
4305
+ "types"
3407
4306
  ];
4307
+ const types = "./types/src/index.d.ts";
3408
4308
  const author = "fit2cloud";
3409
4309
  const license = "GPL-3.0 License";
3410
4310
  const repository = {
@@ -3414,16 +4314,19 @@ const repository = {
3414
4314
  const scripts = {
3415
4315
  dev: "vite",
3416
4316
  build: "vite build",
3417
- "build-lib": "vite build --mode lib",
4317
+ "build-lib": "vite build --mode lib && vue-tsc --emitDeclarationOnly",
4318
+ "build-docs": "vite build --mode docs",
3418
4319
  preview: "vite preview"
3419
4320
  };
3420
4321
  const dependencies = {
3421
4322
  "@element-plus/icons-vue": "^1.1.4",
3422
- "element-plus": "^2.2.2",
4323
+ "element-plus": "^2.2.14",
3423
4324
  "github-markdown-css": "^5.1.0",
4325
+ "prism-theme-vars": "^0.2.3",
3424
4326
  prismjs: "^1.28.0",
3425
4327
  "vite-plugin-markdown": "^2.0.2",
3426
4328
  vue: "^3.2.37",
4329
+ "vue-clipboard3": "^2.0.0",
3427
4330
  "vue-router": "^4.0.14"
3428
4331
  };
3429
4332
  const devDependencies = {
@@ -3433,7 +4336,7 @@ const devDependencies = {
3433
4336
  "sass-loader": "^12.6.0",
3434
4337
  typescript: "^4.5.4",
3435
4338
  "unplugin-vue-define-options": "^0.6.1",
3436
- vite: "^2.9.5",
4339
+ vite: "^2.9.13",
3437
4340
  "vue-tsc": "^0.34.7"
3438
4341
  };
3439
4342
  var PackageJSON = {
@@ -3442,6 +4345,7 @@ var PackageJSON = {
3442
4345
  "private": false,
3443
4346
  main,
3444
4347
  files,
4348
+ types,
3445
4349
  author,
3446
4350
  license,
3447
4351
  repository,
@@ -3449,12 +4353,13 @@ var PackageJSON = {
3449
4353
  dependencies,
3450
4354
  devDependencies
3451
4355
  };
3452
- const components = { "./components/filter-bar/index.ts": __glob_1_0, "./components/read-write-switch/index.ts": __glob_1_1, "./components/speed-dial/index.ts": __glob_1_2, "./components/split-pane/index.ts": __glob_1_3, "./components/steps/index.ts": __glob_1_4, "./components/table/index.ts": __glob_1_5, "./components/tabs/index.ts": __glob_1_6 };
3453
- const install = (app) => {
4356
+ const components = { "./components/filter-bar/index.ts": __glob_2_0, "./components/icon-button/index.ts": __glob_2_1, "./components/read-write-switch/index.ts": __glob_2_2, "./components/search-bar/index.ts": __glob_2_3, "./components/speed-dial/index.ts": __glob_2_4, "./components/split-pane/index.ts": __glob_2_5, "./components/table/index.ts": __glob_2_6, "./components/tabs/index.ts": __glob_2_7 };
4357
+ const install = (app, config) => {
3454
4358
  Object.keys(components).forEach((key) => {
3455
4359
  let component = components[key].default;
3456
4360
  app.use(component);
3457
4361
  });
4362
+ provideGlobalConfig(config);
3458
4363
  };
3459
4364
  const plugin = {
3460
4365
  name: "Fit2CloudUIPlus",