fit2cloud-ui-plus 0.0.1-beta.7 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/README.md +61 -9
  2. package/lib/fit2cloud-ui-plus.es.js +1428 -867
  3. package/lib/fit2cloud-ui-plus.umd.js +1 -1
  4. package/package.json +11 -6
  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 +60 -64
  16. package/src/components/search-bar/FuQuickSearch.vue +39 -18
  17. package/src/components/search-bar/FuSearchBar.vue +85 -97
  18. package/src/components/search-bar/FuSearchBarButton.vue +16 -7
  19. package/src/components/search-bar/FuSearchContions.vue +24 -8
  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 +17 -10
  25. package/src/components/search-bar/types.ts +23 -0
  26. package/src/components/speed-dial/FuSpeedDial.vue +78 -69
  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 +18 -27
  33. package/src/components/table/FuTableBody.ts +17 -19
  34. package/src/components/table/{table-column-dropdown/FuTableColumnDropdown.vue → FuTableColumnDropdown.vue} +0 -0
  35. package/src/components/table/index.ts +11 -7
  36. package/src/components/table/table-column-select/FuTableColumnSelectDialog.vue +3 -9
  37. package/src/components/table/table-column-select/FuTableColumnSelectPopover.vue +4 -3
  38. package/src/components/table/table-operations/FuTableButton.vue +1 -4
  39. package/src/components/table/table-operations/FuTableMoreButton.vue +1 -1
  40. package/src/components/table/table-operations/FuTableOperations.vue +1 -2
  41. package/src/components/table/types.ts +3 -0
  42. package/src/components/tabs/FuTabs.vue +4 -3
  43. package/src/hooks/index.ts +2 -1
  44. package/src/hooks/use-global-config/index.ts +25 -22
  45. package/src/hooks/use-locale/index.ts +1 -1
  46. package/src/hooks/use-size/index.ts +35 -0
  47. package/src/index.ts +5 -2
  48. package/src/styles/common/function.scss +14 -4
  49. package/src/styles/common/mixins.scss +9 -4
  50. package/src/styles/common/variables.scss +56 -17
  51. package/src/styles/components/filter-bar.scss +16 -16
  52. package/src/styles/components/icon-button.scss +66 -0
  53. package/src/styles/components/search-bar.scss +45 -90
  54. package/src/styles/components/speed-dial.scss +1 -51
  55. package/src/styles/components/split-pane.scss +1 -1
  56. package/src/styles/components/steps.scss +2 -2
  57. package/src/styles/components/table.scss +9 -13
  58. package/src/styles/index.scss +2 -1
  59. package/src/styles/themes/default.scss +91 -0
  60. package/src/tools/size.ts +6 -0
  61. package/src/tools/theme.ts +0 -12
  62. package/src/tools/vnode.ts +47 -0
  63. package/types/examples/App.vue.d.ts +2 -0
  64. package/types/examples/components/CodeExample.vue.d.ts +29 -0
  65. package/types/examples/components/DocumentTable.vue.d.ts +14 -0
  66. package/types/examples/components/Markdown.vue.d.ts +12 -0
  67. package/types/examples/layout/components/AppHeader.vue.d.ts +2 -0
  68. package/types/examples/layout/components/Sidebar.vue.d.ts +2 -0
  69. package/types/examples/layout/index.vue.d.ts +2 -0
  70. package/types/examples/main.d.ts +2 -0
  71. package/types/examples/pages/filter-bar/attributes.d.ts +63 -0
  72. package/types/examples/pages/filter-bar/demo/BaseFilterBar.vue.d.ts +2 -0
  73. package/types/examples/pages/filter-bar/demo/SetConditionsDemo.vue.d.ts +2 -0
  74. package/types/examples/pages/filter-bar/demo/SlotDemo.vue.d.ts +2 -0
  75. package/types/examples/pages/filter-bar/index.vue.d.ts +2 -0
  76. package/types/examples/pages/icon-button/attributes.d.ts +45 -0
  77. package/types/examples/pages/icon-button/demo/BaseIconButton.vue.d.ts +2 -0
  78. package/types/examples/pages/icon-button/demo/SlotDemo.vue.d.ts +2 -0
  79. package/types/examples/pages/icon-button/index.vue.d.ts +2 -0
  80. package/types/examples/pages/index.d.ts +3 -0
  81. package/types/examples/pages/read-write-switch/attributes.d.ts +63 -0
  82. package/types/examples/pages/read-write-switch/demo/BaseDemo.vue.d.ts +2 -0
  83. package/types/examples/pages/read-write-switch/demo/CustomContentDemo.vue.d.ts +2 -0
  84. package/types/examples/pages/read-write-switch/demo/InputRwSwitchDemo.vue.d.ts +2 -0
  85. package/types/examples/pages/read-write-switch/demo/ReadSwitchDemo.vue.d.ts +2 -0
  86. package/types/examples/pages/read-write-switch/demo/SelectRwSwitchDemo.vue.d.ts +2 -0
  87. package/types/examples/pages/read-write-switch/demo/TableInnerEditDemo.vue.d.ts +2 -0
  88. package/types/examples/pages/read-write-switch/demo/WriteSwitchDemo.vue.d.ts +2 -0
  89. package/types/examples/pages/read-write-switch/index.vue.d.ts +2 -0
  90. package/types/examples/pages/search/attributes.d.ts +57 -0
  91. package/types/examples/pages/search/demo/BaseSearchbar.vue.d.ts +66 -0
  92. package/types/examples/pages/search/demo/ComplexComponentsDemo.vue.d.ts +60 -0
  93. package/types/examples/pages/search/demo/ComplexSearchDemo.vue.d.ts +84 -0
  94. package/types/examples/pages/search/demo/CustomComponentsDemo.vue.d.ts +50 -0
  95. package/types/examples/pages/search/demo/EchoConditionsDemo.vue.d.ts +52 -0
  96. package/types/examples/pages/search/demo/QuickSearchDemo.vue.d.ts +18 -0
  97. package/types/examples/pages/search/demo/SearchBarButtonDemo.vue.d.ts +54 -0
  98. package/types/examples/pages/search/index.vue.d.ts +150 -0
  99. package/types/examples/pages/search-bar/attributes.d.ts +63 -0
  100. package/types/examples/pages/search-bar/demo/BaseSearchbar.vue.d.ts +31 -0
  101. package/types/examples/pages/search-bar/demo/ComplexSearchDemo.vue.d.ts +40 -0
  102. package/types/examples/pages/search-bar/demo/EchoConditionsDemo.vue.d.ts +32 -0
  103. package/types/examples/pages/search-bar/demo/QuickSearchDemo.vue.d.ts +7 -0
  104. package/types/examples/pages/search-bar/demo/SearchBarButtonDemo.vue.d.ts +32 -0
  105. package/types/examples/pages/search-bar/index.vue.d.ts +2 -0
  106. package/types/examples/pages/speed-dial/attributes.d.ts +63 -0
  107. package/types/examples/pages/speed-dial/demo/BaseSpeedDial.vue.d.ts +2 -0
  108. package/types/examples/pages/speed-dial/demo/SpeedDialCustom.vue.d.ts +2 -0
  109. package/types/examples/pages/speed-dial/demo/SpeedDialPosition.vue.d.ts +2 -0
  110. package/types/examples/pages/speed-dial/demo/SpeedDialTrigger.vue.d.ts +2 -0
  111. package/types/examples/pages/speed-dial/index.vue.d.ts +2 -0
  112. package/types/examples/pages/split-pane/attributes.d.ts +63 -0
  113. package/types/examples/pages/split-pane/demo/BaseSplit.vue.d.ts +2 -0
  114. package/types/examples/pages/split-pane/demo/CustomResizer.vue.d.ts +2 -0
  115. package/types/examples/pages/split-pane/demo/NestSplit.vue.d.ts +2 -0
  116. package/types/examples/pages/split-pane/demo/ResizerType.vue.d.ts +2 -0
  117. package/types/examples/pages/split-pane/index.vue.d.ts +2 -0
  118. package/types/examples/pages/table/attributes.d.ts +121 -0
  119. package/types/examples/pages/table/demo/BaseTable.vue.d.ts +2 -0
  120. package/types/examples/pages/table/demo/DropdownColumn.vue.d.ts +2 -0
  121. package/types/examples/pages/table/demo/DropdownColumnSlot.vue.d.ts +2 -0
  122. package/types/examples/pages/table/demo/SaveSelectColumn.vue.d.ts +2 -0
  123. package/types/examples/pages/table/demo/SelectColumn.vue.d.ts +2 -0
  124. package/types/examples/pages/table/demo/TableOperations.vue.d.ts +2 -0
  125. package/types/examples/pages/table/demo/TablePagination.vue.d.ts +2 -0
  126. package/types/examples/pages/table/index.vue.d.ts +2 -0
  127. package/types/examples/pages/tabs/attributes.d.ts +63 -0
  128. package/types/examples/pages/tabs/demo/AddCloseTab.vue.d.ts +2 -0
  129. package/types/examples/pages/tabs/index.vue.d.ts +2 -0
  130. package/types/examples/router/doc-routes.d.ts +12 -0
  131. package/types/examples/router/index.d.ts +4 -0
  132. package/types/examples/router/styles-routes.d.ts +12 -0
  133. package/types/examples/style-guide/button/BaseButton.vue.d.ts +2 -0
  134. package/types/examples/style-guide/button/IconButton.vue.d.ts +2 -0
  135. package/types/examples/style-guide/button/PlainButton.vue.d.ts +2 -0
  136. package/types/examples/style-guide/button/TextButton.vue.d.ts +2 -0
  137. package/types/examples/style-guide/button/index.vue.d.ts +2 -0
  138. package/types/examples/style-guide/input/BaseInput.vue.d.ts +2 -0
  139. package/types/examples/style-guide/input/SearchInput.vue.d.ts +2 -0
  140. package/types/examples/style-guide/input/Textarea.vue.d.ts +2 -0
  141. package/types/examples/style-guide/input/index.vue.d.ts +2 -0
  142. package/types/examples/style-guide/select/BaseSelect.vue.d.ts +2 -0
  143. package/types/examples/style-guide/select/index.vue.d.ts +2 -0
  144. package/types/plugins/example-transform.d.ts +5 -0
  145. package/types/src/components/filter-bar/FuFilter.vue.d.ts +42 -0
  146. package/types/src/components/filter-bar/FuFilterBar.vue.d.ts +33 -0
  147. package/types/src/components/filter-bar/FuFilterConditions.vue.d.ts +8 -0
  148. package/types/src/components/filter-bar/FuFilterInput.vue.d.ts +17 -0
  149. package/types/src/components/filter-bar/FuSearchInput.vue.d.ts +17 -0
  150. package/types/src/components/filter-bar/filter-components/FuFilterDate.vue.d.ts +36 -0
  151. package/types/src/components/filter-bar/filter-components/FuFilterDateTime.vue.d.ts +36 -0
  152. package/types/src/components/filter-bar/filter-components/FuFilterOption.vue.d.ts +24 -0
  153. package/types/src/components/filter-bar/filter-components/FuFilterSelect.vue.d.ts +66 -0
  154. package/types/src/components/filter-bar/index.d.ts +2 -0
  155. package/types/src/components/filter-bar/types.d.ts +22 -0
  156. package/types/src/components/icon-button/FuIconButton.vue.d.ts +43 -0
  157. package/types/src/components/icon-button/index.d.ts +2 -0
  158. package/types/src/components/read-write-switch/FuInputRwSwitch.vue.d.ts +21 -0
  159. package/types/src/components/read-write-switch/FuReadWriteSwitch.vue.d.ts +23 -0
  160. package/types/src/components/read-write-switch/FuSelectRwSwitch.vue.d.ts +43 -0
  161. package/types/src/components/read-write-switch/index.d.ts +2 -0
  162. package/types/src/components/read-write-switch/types.d.ts +4 -0
  163. package/types/src/components/search-bar/FuComplexSearch.vue.d.ts +22 -0
  164. package/types/src/components/search-bar/FuQuickSearch.vue.d.ts +29 -0
  165. package/types/src/components/search-bar/FuSearchBar.vue.d.ts +58 -0
  166. package/types/src/components/search-bar/FuSearchBarButton.vue.d.ts +14 -0
  167. package/types/src/components/search-bar/FuSearchContions.vue.d.ts +26 -0
  168. package/types/src/components/search-bar/complex-components/FuComplexDate.vue.d.ts +36 -0
  169. package/types/src/components/search-bar/complex-components/FuComplexDateTime.vue.d.ts +36 -0
  170. package/types/src/components/search-bar/complex-components/FuComplexInput.vue.d.ts +26 -0
  171. package/types/src/components/search-bar/complex-components/FuComplexSelect.vue.d.ts +50 -0
  172. package/types/src/components/search-bar/complex-components/index.d.ts +0 -0
  173. package/types/src/components/search-bar/complex-components/mixins.d.ts +6 -0
  174. package/types/src/components/search-bar/index.d.ts +2 -0
  175. package/types/src/components/search-bar/types.d.ts +17 -0
  176. package/types/src/components/speed-dial/FuSpeedDial.vue.d.ts +218 -0
  177. package/types/src/components/speed-dial/FuSpeedDialActionButton.vue.d.ts +32 -0
  178. package/types/src/components/speed-dial/FuSpeedDialButton.vue.d.ts +42 -0
  179. package/types/src/components/speed-dial/FuSpeedDialItem.vue.d.ts +12 -0
  180. package/types/src/components/speed-dial/index.d.ts +2 -0
  181. package/types/src/components/speed-dial/types.d.ts +8 -0
  182. package/types/src/components/split-pane/FuSplitPane.vue.d.ts +59 -0
  183. package/types/src/components/split-pane/index.d.ts +2 -0
  184. package/types/src/components/table/FuTable.vue.d.ts +18 -0
  185. package/types/src/components/table/FuTableBody.d.ts +3 -0
  186. package/types/src/components/table/FuTableColumnDropdown.vue.d.ts +50 -0
  187. package/types/src/components/table/FuTablePagination.vue.d.ts +47 -0
  188. package/types/src/components/table/index.d.ts +2 -0
  189. package/types/src/components/table/table-column-select/FuTableColumnSelect.vue.d.ts +10 -0
  190. package/types/src/components/table/table-column-select/FuTableColumnSelectDialog.vue.d.ts +23 -0
  191. package/types/src/components/table/table-column-select/FuTableColumnSelectPopover.vue.d.ts +34 -0
  192. package/types/src/components/table/table-column-select/utils.d.ts +8 -0
  193. package/types/src/components/table/table-operations/FuTableButton.vue.d.ts +13 -0
  194. package/types/src/components/table/table-operations/FuTableMoreButton.vue.d.ts +37 -0
  195. package/types/src/components/table/table-operations/FuTableOperations.vue.d.ts +46 -0
  196. package/types/src/components/table/types.d.ts +2 -0
  197. package/types/src/components/tabs/FuTabs.vue.d.ts +54 -0
  198. package/types/src/components/tabs/index.d.ts +2 -0
  199. package/types/src/hooks/index.d.ts +3 -0
  200. package/types/src/hooks/use-global-config/index.d.ts +9 -0
  201. package/types/src/hooks/use-locale/index.d.ts +14 -0
  202. package/types/src/hooks/use-size/index.d.ts +9 -0
  203. package/types/src/index.d.ts +8 -0
  204. package/types/src/locale/index.d.ts +10 -0
  205. package/types/src/locale/lang/en.d.ts +59 -0
  206. package/types/src/locale/lang/zh-cn.d.ts +59 -0
  207. package/types/src/locale/lang/zh-tw.d.ts +59 -0
  208. package/types/src/tools/size.d.ts +4 -0
  209. package/types/src/tools/theme.d.ts +1 -0
  210. package/types/src/tools/time.d.ts +2 -0
  211. package/types/src/tools/types.d.ts +8 -0
  212. package/types/src/tools/utils.d.ts +2 -0
  213. package/types/src/tools/vnode.d.ts +9 -0
  214. package/src/components/filter-bar/FuSearchInput.vue +0 -31
  215. package/src/components/search-bar/store.ts +0 -25
  216. package/src/components/steps/FuHorizontalNavigation.vue +0 -18
  217. package/src/components/steps/FuHorizontalSteps.vue +0 -94
  218. package/src/components/steps/FuStep.vue +0 -13
  219. package/src/components/steps/FuSteps.vue +0 -22
  220. package/src/components/steps/FuStepsFooter.ts +0 -79
  221. package/src/components/steps/FuVerticalNavigation.vue +0 -35
  222. package/src/components/steps/FuVerticalSteps.vue +0 -79
  223. package/src/components/steps/Stepper.ts +0 -188
  224. package/src/components/steps/index.ts +0 -11
  225. package/src/components/table/table-column-dropdown/index.ts +0 -7
  226. package/src/components/table/table-column-select/index.ts +0 -8
  227. package/src/components/table/table-operations/index.ts +0 -12
  228. package/src/components/virtual-scroller/FuVirtualHorizontalScroll.js +0 -96
  229. package/src/components/virtual-scroller/FuVirtualScroll.js +0 -15
  230. package/src/components/virtual-scroller/FuVirtualVerticalScroll.js +0 -95
  231. package/src/components/virtual-scroller/index.js +0 -10
@@ -0,0 +1,46 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ align: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ width: (StringConstructor | NumberConstructor)[];
7
+ minWidth: (StringConstructor | NumberConstructor)[];
8
+ ellipsis: {
9
+ type: NumberConstructor;
10
+ default: number;
11
+ };
12
+ buttons: {
13
+ type: ArrayConstructor;
14
+ required: true;
15
+ };
16
+ type: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ validator: (value: string) => boolean;
20
+ };
21
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ align: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ width: (StringConstructor | NumberConstructor)[];
27
+ minWidth: (StringConstructor | NumberConstructor)[];
28
+ ellipsis: {
29
+ type: NumberConstructor;
30
+ default: number;
31
+ };
32
+ buttons: {
33
+ type: ArrayConstructor;
34
+ required: true;
35
+ };
36
+ type: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ validator: (value: string) => boolean;
40
+ };
41
+ }>>, {
42
+ type: string;
43
+ align: string;
44
+ ellipsis: number;
45
+ }>;
46
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { InjectionKey } from "vue";
2
+ export declare const LocalKey: InjectionKey<string | undefined>;
@@ -0,0 +1,54 @@
1
+ import { PropType } from "vue";
2
+ import { DropdownProps } from "@/tools/types";
3
+ declare const _default: import("vue").DefineComponent<{
4
+ addType: {
5
+ type: StringConstructor;
6
+ default: string;
7
+ validator: (val: string) => boolean;
8
+ };
9
+ dropdownMenus: {
10
+ type: PropType<DropdownProps[]>;
11
+ default: () => never[];
12
+ };
13
+ addTrigger: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ validator: (val: string) => boolean;
17
+ };
18
+ addIcon: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ addButtonLabel: StringConstructor;
23
+ addable: BooleanConstructor;
24
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "command"[], "command", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ addType: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ validator: (val: string) => boolean;
29
+ };
30
+ dropdownMenus: {
31
+ type: PropType<DropdownProps[]>;
32
+ default: () => never[];
33
+ };
34
+ addTrigger: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ validator: (val: string) => boolean;
38
+ };
39
+ addIcon: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ addButtonLabel: StringConstructor;
44
+ addable: BooleanConstructor;
45
+ }>> & {
46
+ onCommand?: ((...args: any[]) => any) | undefined;
47
+ }, {
48
+ addable: boolean;
49
+ addType: string;
50
+ dropdownMenus: DropdownProps[];
51
+ addTrigger: string;
52
+ addIcon: string;
53
+ }>;
54
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import FuTabs from "./FuTabs.vue";
2
+ export default FuTabs;
@@ -0,0 +1,3 @@
1
+ export * from './use-global-config';
2
+ export * from './use-locale';
3
+ export * from './use-size';
@@ -0,0 +1,9 @@
1
+ import { InjectionKey, Ref, App } from 'vue';
2
+ import { MaybeRef } from "@vueuse/core";
3
+ export declare const globalConfigKey: InjectionKey<Ref<GlobalConfig>>;
4
+ export interface GlobalConfig {
5
+ size?: string;
6
+ locale?: any;
7
+ }
8
+ export declare function useGlobalConfig(key?: keyof any, defaultValue?: undefined): Ref<any>;
9
+ export declare const provideGlobalConfig: (config: MaybeRef<GlobalConfig>, app?: App<any> | undefined) => import("vue").ComputedRef<GlobalConfig>;
@@ -0,0 +1,14 @@
1
+ import type { MaybeRef } from '@vueuse/core';
2
+ import type { Ref } from 'vue';
3
+ import type { Language } from '@/locale';
4
+ export declare type TranslatorOption = Record<string, string | number>;
5
+ export declare type Translator = (path: string, option?: TranslatorOption) => string;
6
+ export declare type LocaleContext = {
7
+ locale: Ref<Language>;
8
+ lang: Ref<string>;
9
+ t: Translator;
10
+ };
11
+ export declare const buildTranslator: (locale: MaybeRef<Language>) => Translator;
12
+ export declare const translate: (path: string, option: undefined | TranslatorOption, locale: Language) => string;
13
+ export declare const buildLocaleContext: (locale: MaybeRef<Language>) => LocaleContext;
14
+ export declare const useLocale: () => LocaleContext;
@@ -0,0 +1,9 @@
1
+ import type { ComputedRef } from 'vue';
2
+ import type { ComponentSize } from '@/tools/size';
3
+ import { MaybeRef } from "@vueuse/core";
4
+ export declare const useProp: <T>(name: string) => ComputedRef<T | undefined>;
5
+ export declare const useSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<'prop' | 'global', boolean>>) => ComputedRef<string>;
6
+ export declare const useSizeProp: {
7
+ type: StringConstructor;
8
+ validator: (val: string) => val is string;
9
+ };
@@ -0,0 +1,8 @@
1
+ import type { App } from 'vue';
2
+ import { GlobalConfig } from "@/hooks";
3
+ declare const plugin: {
4
+ name: string;
5
+ version: string;
6
+ install: (app: App, config: GlobalConfig) => void;
7
+ };
8
+ export default plugin;
@@ -0,0 +1,10 @@
1
+ export { default as en } from './lang/en';
2
+ export { default as zhCn } from './lang/zh-cn';
3
+ export { default as zhTw } from './lang/zh-tw';
4
+ export declare type TranslatePair = {
5
+ [key: string]: string | string[] | TranslatePair;
6
+ };
7
+ export declare type Language = {
8
+ name: string;
9
+ el: TranslatePair;
10
+ };
@@ -0,0 +1,59 @@
1
+ declare const _default: {
2
+ name: string;
3
+ fu: {
4
+ filter_bar: {
5
+ filter: string;
6
+ results: string;
7
+ clear: string;
8
+ drawer_title: string;
9
+ cancel: string;
10
+ search: string;
11
+ select_all: string;
12
+ more: string;
13
+ };
14
+ search_bar: {
15
+ search: string;
16
+ adv_search: string;
17
+ ok: string;
18
+ cancel: string;
19
+ please_select: string;
20
+ please_input: string;
21
+ like: string;
22
+ not_like: string;
23
+ in: string;
24
+ not_in: string;
25
+ gt: string;
26
+ ge: string;
27
+ lt: string;
28
+ le: string;
29
+ eq: string;
30
+ ne: string;
31
+ between: string;
32
+ select_date: string;
33
+ start_date: string;
34
+ end_date: string;
35
+ select_date_time: string;
36
+ start_date_time: string;
37
+ end_date_time: string;
38
+ range_separator: string;
39
+ data_time_error: string;
40
+ clean: string;
41
+ refresh: string;
42
+ };
43
+ table: {
44
+ ok: string;
45
+ reset: string;
46
+ custom_table_fields: string;
47
+ custom_table_fields_desc: string;
48
+ custom_table_rows: string;
49
+ more: string;
50
+ };
51
+ steps: {
52
+ cancel: string;
53
+ next: string;
54
+ prev: string;
55
+ finish: string;
56
+ };
57
+ };
58
+ };
59
+ export default _default;
@@ -0,0 +1,59 @@
1
+ declare const _default: {
2
+ name: string;
3
+ fu: {
4
+ filter_bar: {
5
+ filter: string;
6
+ results: string;
7
+ clear: string;
8
+ drawer_title: string;
9
+ cancel: string;
10
+ search: string;
11
+ select_all: string;
12
+ more: string;
13
+ };
14
+ search_bar: {
15
+ search: string;
16
+ adv_search: string;
17
+ ok: string;
18
+ cancel: string;
19
+ please_select: string;
20
+ please_input: string;
21
+ like: string;
22
+ not_like: string;
23
+ in: string;
24
+ not_in: string;
25
+ gt: string;
26
+ ge: string;
27
+ lt: string;
28
+ le: string;
29
+ eq: string;
30
+ ne: string;
31
+ between: string;
32
+ select_date: string;
33
+ start_date: string;
34
+ end_date: string;
35
+ select_date_time: string;
36
+ start_date_time: string;
37
+ end_date_time: string;
38
+ range_separator: string;
39
+ data_time_error: string;
40
+ clean: string;
41
+ refresh: string;
42
+ };
43
+ table: {
44
+ ok: string;
45
+ reset: string;
46
+ custom_table_fields: string;
47
+ custom_table_fields_desc: string;
48
+ custom_table_rows: string;
49
+ more: string;
50
+ };
51
+ steps: {
52
+ cancel: string;
53
+ next: string;
54
+ prev: string;
55
+ finish: string;
56
+ };
57
+ };
58
+ };
59
+ export default _default;
@@ -0,0 +1,59 @@
1
+ declare const _default: {
2
+ name: string;
3
+ fu: {
4
+ filter_bar: {
5
+ filter: string;
6
+ results: string;
7
+ clear: string;
8
+ drawer_title: string;
9
+ cancel: string;
10
+ search: string;
11
+ select_all: string;
12
+ more: string;
13
+ };
14
+ search_bar: {
15
+ search: string;
16
+ adv_search: string;
17
+ ok: string;
18
+ cancel: string;
19
+ please_select: string;
20
+ please_input: string;
21
+ like: string;
22
+ not_like: string;
23
+ in: string;
24
+ not_in: string;
25
+ gt: string;
26
+ ge: string;
27
+ lt: string;
28
+ le: string;
29
+ eq: string;
30
+ ne: string;
31
+ between: string;
32
+ select_date: string;
33
+ start_date: string;
34
+ end_date: string;
35
+ select_date_time: string;
36
+ start_date_time: string;
37
+ end_date_time: string;
38
+ range_separator: string;
39
+ data_time_error: string;
40
+ clean: string;
41
+ refresh: string;
42
+ };
43
+ table: {
44
+ ok: string;
45
+ reset: string;
46
+ custom_table_fields: string;
47
+ custom_table_fields_desc: string;
48
+ custom_table_rows: string;
49
+ more: string;
50
+ };
51
+ steps: {
52
+ cancel: string;
53
+ next: string;
54
+ prev: string;
55
+ finish: string;
56
+ };
57
+ };
58
+ };
59
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const COMPONENTS_SIZE: string[];
2
+ export declare type ComponentSize = typeof COMPONENTS_SIZE[number];
3
+ export declare const validateSize: (val: string) => val is string;
4
+ export {};
@@ -0,0 +1 @@
1
+ export declare const validateType: (value: string) => boolean;
@@ -0,0 +1,2 @@
1
+ export declare const datetimeFormat: (timestamp: string) => string;
2
+ export declare const dateFormat: (timestamp: string) => string;
@@ -0,0 +1,8 @@
1
+ export interface DropdownProps {
2
+ icon?: string;
3
+ disabled?: boolean;
4
+ divided?: boolean;
5
+ command?: string | number | object;
6
+ label?: string | number;
7
+ [k: string]: any;
8
+ }
@@ -0,0 +1,2 @@
1
+ export declare const uuid: () => string;
2
+ export declare const randomId: () => number;
@@ -0,0 +1,9 @@
1
+ import type { VNode, VNodeNormalizedChildren } from 'vue';
2
+ export declare function isFragment(node: VNode): boolean;
3
+ export declare function isFragment(node: unknown): node is VNode;
4
+ export declare function isComment(node: VNode): boolean;
5
+ export declare function isComment(node: unknown): node is VNode;
6
+ export declare function isValidElementNode(node: VNode): boolean;
7
+ export declare function isValidElementNode(node: unknown): node is VNode;
8
+ export declare function isValidChildren(children: VNodeNormalizedChildren): children is VNodeNormalizedChildren;
9
+ export declare function getChildren(nodes: VNodeNormalizedChildren | VNode[], depth?: number): VNodeNormalizedChildren | VNode[];
@@ -1,31 +0,0 @@
1
- <template>
2
- <el-input class="fu-search-input" prefix-icon="Search" v-model="quick" @input="input" @blur="blur"
3
- @keydown="keydown" v-bind="$attrs" clearable />
4
- </template>
5
-
6
- <script setup lang="ts">
7
- import { ref, watch } from "vue";
8
- defineOptions({ name: "FuSearchInput" });
9
- const props = defineProps({
10
- value: String,
11
- })
12
- const emit = defineEmits(["input", "change"])
13
- const quick = ref("")
14
-
15
- watch(() => props.value, (val: any) => {
16
- quick.value = val
17
- })
18
-
19
- function input(e: Event) {
20
- emit("input", quick.value, e)
21
- }
22
- function blur(e: Event) {
23
- emit("change", quick.value, e)
24
- }
25
- function keydown(e: Event) {
26
- const event = e as KeyboardEvent
27
- if (event.key === "Enter") {
28
- emit("change", quick.value, e)
29
- }
30
- }
31
- </script>
@@ -1,25 +0,0 @@
1
- export interface Options {
2
- field: string
3
- label: string
4
- operator?: string
5
- operatorLabel: string
6
- value: string
7
- valueLabel: string
8
- }
9
-
10
- export default class ComplexCondition {
11
- field: string
12
- label: string
13
- operator?: string
14
- operatorLabel: string
15
- value: string
16
- valueLabel: string
17
- constructor(options: Options) {
18
- this.field = options.field
19
- this.label = options.label
20
- this.operator = options.operator
21
- this.operatorLabel = options.operatorLabel
22
- this.value = options.value
23
- this.valueLabel = options.valueLabel || options.value
24
- }
25
- }
@@ -1,18 +0,0 @@
1
- <template>
2
- <el-steps :active="stepper.index" v-bind="stepper">
3
- <el-step v-for="(step, index) in steps" :key="index" v-bind="step" @click.native="click(index)"
4
- :class="disable(index) && 'fu-step--disable'" />
5
- </el-steps>
6
- </template>
7
-
8
- <script lang="ts" setup>
9
- const props = defineProps({
10
- stepper: Object,
11
- steps: Array,
12
- disable: Function,
13
- })
14
- const emit = defineEmits(["active"])
15
- function click(index: number) {
16
- (!props.disable(index)) && emit("active", index);
17
- }
18
- </script>
@@ -1,94 +0,0 @@
1
- <script>
2
- import FuHorizontalNavigation from "./FuHorizontalNavigation";
3
- import FuStepsFooter from "./FuStepsFooter";
4
- import { Step, Stepper } from "./Stepper";
5
-
6
- export default {
7
- name: "FuHorizontalSteps",
8
- components: { FuHorizontalNavigation, FuStepsFooter },
9
- data() {
10
- return {
11
- stepper: new Stepper(),
12
- };
13
- },
14
- created() {
15
- this.stepper.activeSet.add(0);
16
- },
17
- provide() {
18
- return {
19
- stepper: this.stepper,
20
- };
21
- },
22
- watch: {
23
- "stepper.index"(value) {
24
- this.$emit("change", this.stepper.steps[value]);
25
- },
26
- },
27
- computed: {
28
- heightStyle() {
29
- return {
30
- height: parseInt(this.stepper?.height) + "px" || "auto",
31
- };
32
- },
33
- },
34
- render(h) {
35
- // let currentNode;
36
- let steps = [];
37
- if (this.$slots.default) {
38
- this.$slots.default.forEach((node, index) => {
39
- const options = {
40
- index: index,
41
- ...node.data.attrs,
42
- };
43
- const step = new Step(options);
44
- steps.push(step);
45
- // if (this.stepper.isCurrent(index)) {
46
- // currentNode = node;
47
- // }
48
- });
49
- }
50
- this.stepper.steps = steps;
51
- this.stepper = Object.assign(this.stepper, this.$attrs);
52
- return (
53
- <div class="fu-steps fu-steps--horizontal">
54
- <fu-horizontal-navigation
55
- stepper={this.stepper}
56
- steps={steps}
57
- disable={this.disable}
58
- vOn:active={this.active} />
59
- <div class="fu-steps__wrapper">
60
- <div class="fu-steps__container" style={this.heightStyle}>
61
- <transition name="carousel" mode="out-in">
62
- {this._l(
63
- this.$slots.default,
64
- (item, index) => this.stepper.index === index && item
65
- )}
66
- </transition>
67
- </div>
68
- </div>
69
- <div class="fu-steps__footer">
70
- {this.$slots.footer || <fu-steps-footer vOn:stepperFn={this.$func} />}
71
- </div>
72
- </div>
73
- );
74
- },
75
-
76
- methods: {
77
- active(index) {
78
- this.stepper.active(index);
79
- },
80
- next() {
81
- this.stepper.next();
82
- },
83
- prev() {
84
- this.stepper.prev();
85
- },
86
- disable(index) {
87
- return !this.stepper.isActive(index);
88
- },
89
- $func(name) {
90
- this.$emit(name);
91
- },
92
- },
93
- };
94
- </script>
@@ -1,13 +0,0 @@
1
- <template>
2
- <div class="fu-step" v-loading="loading">
3
- <slot/>
4
- </div>
5
- </template>
6
- <script lang="ts" setup>
7
- import { inject, computed } from 'vue'
8
- defineOptions({ name: "FuStep" });
9
- const stepper = inject('stepper')
10
- const loading = computed(() => {
11
- return stepper?.isLoading || false;
12
- })
13
- </script>
@@ -1,22 +0,0 @@
1
- <script lang="ts">
2
- import { defineComponent, h } from 'vue'
3
- import FuHorizontalSteps from "./FuHorizontalSteps";
4
- import FuVerticalSteps from "./FuVerticalSteps";
5
-
6
- export default defineComponent({
7
- name: 'FuSteps',
8
- props: ["direction"],
9
- setup(props, context) {
10
- const { direction } = props
11
- return () => {
12
- if (direction === "vertical") {
13
- return h(FuVerticalSteps, context.attrs, context.slots)
14
- } else {
15
- return h(FuHorizontalSteps, context.attrs, context.slots)
16
- }
17
- }
18
- }
19
-
20
- })
21
- </script>
22
-
@@ -1,79 +0,0 @@
1
- import {
2
- defineComponent,
3
- h,
4
- inject,
5
- ref,
6
- computed
7
- } from 'vue'
8
- export default defineComponent({
9
- name: "FuStepsFooter",
10
- setup(props, { emit }) {
11
- const stepper = inject('stepper')
12
- const disabledButton = ref(false)
13
-
14
- const isFirst = computed(() => {
15
- return stepper.isFirst(stepper.index);
16
- })
17
- const isLast = computed(() => {
18
- return stepper.isLast(stepper.index);
19
- })
20
-
21
- const showCancel = computed(() => {
22
- return stepper.showCancel !== false;
23
- })
24
-
25
- const disabled = computed(() => {
26
- return stepper?.isLoading || disabledButton.value;
27
- })
28
- const button = (value: string) => {
29
- return h(
30
- 'el-button',
31
- {
32
- disabled: disabled,
33
- size: stepper.buttonSize, // configSize
34
- onClick: () => clickHandle(value)
35
- },
36
- stepper[`${value}ButtonText`]
37
- );
38
- };
39
-
40
- function clickHandle(fnName: string) {
41
- stepper[fnName]
42
- ? stepper[fnName]()
43
- : emit("stepperFn", fnName);
44
- disabledButton.value = true;
45
- setTimeout(() => {
46
- disabledButton.value = false;
47
- }, 500);
48
- }
49
- return () => {
50
- return h(
51
- 'div',
52
- {
53
- class: `fu-steps__footer--${stepper.footerAlign}`,
54
- },
55
- [
56
- h(
57
- 'div',
58
- {
59
- class: 'fu-steps__footer--block',
60
- style: 'margin-right:10px'
61
- },
62
- showCancel && button("cancel")
63
- ),
64
- h(
65
- 'div',
66
- {
67
- class: 'fu-steps__footer--block',
68
- },
69
- [
70
- !isFirst && button("prev"),
71
- isLast ? button("finish") : button("next")
72
- ]
73
- ),
74
- ]
75
- );
76
- }
77
- }
78
- })
79
-