@gx-design-vue/pro-table 0.2.0-alpha.0 → 0.2.0-alpha.10

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 (136) hide show
  1. package/dist/ProTable.d.ts +14 -493
  2. package/dist/ProTable.js +818 -512
  3. package/dist/components/ScrollBar/Bar.d.ts +81 -0
  4. package/dist/components/ScrollBar/Bar.js +84 -0
  5. package/dist/components/ScrollBar/Thumb.d.ts +52 -0
  6. package/dist/components/ScrollBar/{Thumb/index.js → Thumb.js} +67 -58
  7. package/dist/components/ScrollBar/context.d.ts +3 -4
  8. package/dist/components/ScrollBar/context.js +3 -5
  9. package/dist/components/ScrollBar/util.d.ts +6 -5
  10. package/dist/components/ScrollBar/util.js +1 -14
  11. package/dist/components/SearchForm/CollapseToggle.d.ts +55 -0
  12. package/dist/components/SearchForm/CollapseToggle.js +47 -0
  13. package/dist/components/SearchForm/FormItemContainer.d.ts +75 -0
  14. package/dist/components/SearchForm/FormItemContainer.js +225 -0
  15. package/dist/components/SearchForm/FormItemWrapper.d.ts +82 -0
  16. package/dist/components/SearchForm/FormItemWrapper.js +62 -0
  17. package/dist/components/SearchForm/SearchForm.d.ts +130 -0
  18. package/dist/components/SearchForm/SearchForm.js +319 -0
  19. package/dist/components/SearchForm/index.d.ts +2 -0
  20. package/dist/components/SearchForm/index.js +2 -0
  21. package/dist/components/Toolbar/FullscreenIcon.d.ts +26 -0
  22. package/dist/components/Toolbar/FullscreenIcon.js +22 -0
  23. package/dist/components/Toolbar/ListToolBar.d.ts +111 -0
  24. package/dist/components/Toolbar/ListToolBar.js +101 -0
  25. package/dist/components/Toolbar/index.d.ts +103 -0
  26. package/dist/components/Toolbar/index.js +101 -0
  27. package/dist/components/Toolbar/style.d.ts +8 -0
  28. package/dist/components/{ListToolBar → Toolbar}/style.js +32 -27
  29. package/dist/context/TableContext.d.ts +15 -27
  30. package/dist/context/TableContext.js +3 -5
  31. package/dist/hooks/index.d.ts +16 -0
  32. package/dist/hooks/index.js +16 -0
  33. package/dist/hooks/useBreakpoints.d.ts +13 -0
  34. package/dist/hooks/useBreakpoints.js +57 -0
  35. package/dist/hooks/useCellRender.d.ts +13 -0
  36. package/dist/hooks/useCellRender.js +28 -0
  37. package/dist/hooks/useColumnResize.d.ts +30 -0
  38. package/dist/hooks/useColumnResize.js +110 -0
  39. package/dist/hooks/useColumns.d.ts +35 -24
  40. package/dist/hooks/useColumns.js +89 -58
  41. package/dist/hooks/useFetchData.d.ts +40 -65
  42. package/dist/hooks/useFetchData.js +157 -174
  43. package/dist/hooks/useFitPage.d.ts +19 -0
  44. package/dist/hooks/useFitPage.js +90 -0
  45. package/dist/hooks/useKeepAliveReload.d.ts +21 -0
  46. package/dist/hooks/useKeepAliveReload.js +24 -0
  47. package/dist/hooks/useLoading.d.ts +18 -7
  48. package/dist/hooks/useLoading.js +27 -11
  49. package/dist/hooks/usePagination.d.ts +10 -7
  50. package/dist/hooks/usePagination.js +38 -29
  51. package/dist/hooks/useRequestOptions.d.ts +18 -0
  52. package/dist/hooks/useRequestOptions.js +39 -0
  53. package/dist/hooks/useRowSelection.d.ts +27 -15
  54. package/dist/hooks/useRowSelection.js +93 -80
  55. package/dist/hooks/useTable.d.ts +35 -77
  56. package/dist/hooks/useTable.js +72 -50
  57. package/dist/hooks/useTableForm.d.ts +15 -82
  58. package/dist/hooks/useTableForm.js +93 -55
  59. package/dist/hooks/useTableScroll.d.ts +33 -31
  60. package/dist/hooks/useTableScroll.js +71 -28
  61. package/dist/hooks/useTableSize.d.ts +17 -7
  62. package/dist/hooks/useTableSize.js +21 -9
  63. package/dist/index.d.ts +10 -7
  64. package/dist/index.js +9 -4
  65. package/dist/interface.d.ts +499 -0
  66. package/dist/interface.js +1 -0
  67. package/dist/pro-table.esm.js +3579 -3834
  68. package/dist/pro-table.js +1 -1
  69. package/dist/style/fit-page.d.ts +4 -2
  70. package/dist/style/fit-page.js +10 -5
  71. package/dist/style/index.d.ts +4 -6
  72. package/dist/style/index.js +24 -76
  73. package/dist/style/list.d.ts +4 -2
  74. package/dist/style/list.js +2 -12
  75. package/dist/style/resizable.d.ts +8 -0
  76. package/dist/style/resizable.js +18 -0
  77. package/dist/style/scroll.d.ts +4 -2
  78. package/dist/style/scroll.js +9 -9
  79. package/dist/style/search.d.ts +8 -0
  80. package/dist/{components/Form/style.js → style/search.js} +22 -9
  81. package/dist/theme/augment.d.ts +8 -0
  82. package/dist/theme/augment.js +1 -0
  83. package/dist/theme/interface/components.d.ts +8 -0
  84. package/dist/theme/interface/components.js +1 -0
  85. package/dist/utils/dateFormat.d.ts +9 -0
  86. package/dist/utils/dateFormat.js +29 -0
  87. package/dist/utils/formConstants.d.ts +9 -0
  88. package/dist/utils/formConstants.js +29 -0
  89. package/dist/utils/valueFormat.d.ts +9 -0
  90. package/dist/utils/valueFormat.js +27 -0
  91. package/package.json +11 -10
  92. package/dist/components/Form/components/RequestSelect.d.ts +0 -50
  93. package/dist/components/Form/components/RequestSelect.js +0 -58
  94. package/dist/components/Form/hooks/useForm.d.ts +0 -11
  95. package/dist/components/Form/hooks/useForm.js +0 -32
  96. package/dist/components/Form/index.d.ts +0 -33
  97. package/dist/components/Form/index.js +0 -479
  98. package/dist/components/Form/style.d.ts +0 -6
  99. package/dist/components/Form/utils/config.d.ts +0 -9
  100. package/dist/components/Form/utils/config.js +0 -30
  101. package/dist/components/Form/utils/dateFormat.d.ts +0 -22
  102. package/dist/components/Form/utils/dateFormat.js +0 -45
  103. package/dist/components/ListToolBar/index.d.ts +0 -60
  104. package/dist/components/ListToolBar/index.js +0 -123
  105. package/dist/components/ListToolBar/style.d.ts +0 -6
  106. package/dist/components/ScrollBar/Bar/index.d.ts +0 -49
  107. package/dist/components/ScrollBar/Bar/index.js +0 -71
  108. package/dist/components/ScrollBar/Bar/props.d.ts +0 -25
  109. package/dist/components/ScrollBar/Bar/props.js +0 -18
  110. package/dist/components/ScrollBar/Thumb/index.d.ts +0 -40
  111. package/dist/components/ScrollBar/Thumb/props.d.ts +0 -20
  112. package/dist/components/ScrollBar/Thumb/props.js +0 -18
  113. package/dist/components/TableCell/index.d.ts +0 -37
  114. package/dist/components/TableCell/index.js +0 -72
  115. package/dist/components/ToolBar/FullscreenIcon.d.ts +0 -7
  116. package/dist/components/ToolBar/FullscreenIcon.js +0 -14
  117. package/dist/components/ToolBar/index.d.ts +0 -34
  118. package/dist/components/ToolBar/index.js +0 -100
  119. package/dist/hooks/tryOnActivated.d.ts +0 -6
  120. package/dist/hooks/tryOnActivated.js +0 -14
  121. package/dist/hooks/useDebounceFn.d.ts +0 -8
  122. package/dist/hooks/useDebounceFn.js +0 -34
  123. package/dist/hooks/useScrollArea.d.ts +0 -24
  124. package/dist/hooks/useScrollArea.js +0 -104
  125. package/dist/props.d.ts +0 -340
  126. package/dist/props.js +0 -251
  127. package/dist/types/ColumnTypings.d.ts +0 -127
  128. package/dist/types/ColumnTypings.js +0 -1
  129. package/dist/types/SlotsTypings.d.ts +0 -63
  130. package/dist/types/SlotsTypings.js +0 -13
  131. package/dist/types/TableTypings.d.ts +0 -359
  132. package/dist/types/TableTypings.js +0 -1
  133. package/dist/types/index.d.ts +0 -9
  134. package/dist/types/index.js +0 -1
  135. package/dist/utils/utils.d.ts +0 -10
  136. package/dist/utils/utils.js +0 -91
@@ -1,60 +0,0 @@
1
- import { DefaultRender } from "../../types/SlotsTypings.js";
2
- import { ProTableProps, TableActionPlacement } from "../../types/TableTypings.js";
3
- import "../../index.js";
4
- import * as vue156 from "vue";
5
- import { PropType } from "vue";
6
- import { VueNode } from "@gx-design-vue/pro-utils";
7
- import * as vue_jsx_runtime0 from "vue/jsx-runtime";
8
-
9
- //#region src/components/ListToolBar/index.d.ts
10
- interface ListToolBarSetting {
11
- icon: VueNode;
12
- tooltip?: string;
13
- key?: string;
14
- onClick?: (key?: string) => void;
15
- }
16
- declare const ListToolBar: vue156.DefineComponent<vue156.ExtractPropTypes<{
17
- actions: PropType<VueNode[]>;
18
- settings: PropType<VueNode[]>;
19
- headerTitle: {
20
- type: PropType<ProTableProps["headerTitle"]>;
21
- default: () => any;
22
- };
23
- listToolAfter: {
24
- type: PropType<ProTableProps["listToolAfter"]>;
25
- default: () => any;
26
- };
27
- headerTitleTip: {
28
- type: PropType<ProTableProps["headerTitleTip"]>;
29
- default: () => any;
30
- };
31
- titleTipText: {
32
- type: PropType<ProTableProps["titleTipText"]>;
33
- };
34
- actionsPlacement: PropType<TableActionPlacement>;
35
- }>, () => vue_jsx_runtime0.JSX.Element, {}, {}, {}, vue156.ComponentOptionsMixin, vue156.ComponentOptionsMixin, {}, string, vue156.PublicProps, Readonly<vue156.ExtractPropTypes<{
36
- actions: PropType<VueNode[]>;
37
- settings: PropType<VueNode[]>;
38
- headerTitle: {
39
- type: PropType<ProTableProps["headerTitle"]>;
40
- default: () => any;
41
- };
42
- listToolAfter: {
43
- type: PropType<ProTableProps["listToolAfter"]>;
44
- default: () => any;
45
- };
46
- headerTitleTip: {
47
- type: PropType<ProTableProps["headerTitleTip"]>;
48
- default: () => any;
49
- };
50
- titleTipText: {
51
- type: PropType<ProTableProps["titleTipText"]>;
52
- };
53
- actionsPlacement: PropType<TableActionPlacement>;
54
- }>> & Readonly<{}>, {
55
- headerTitle: DefaultRender;
56
- headerTitleTip: DefaultRender;
57
- listToolAfter: DefaultRender;
58
- }, {}, {}, {}, string, vue156.ComponentProvideOptions, true, {}, any>;
59
- //#endregion
60
- export { ListToolBarSetting, ListToolBar as default };
@@ -1,123 +0,0 @@
1
- import { useTableContext } from "../../context/TableContext.js";
2
- import { proTableProps } from "../../props.js";
3
- import { computed, createVNode, defineComponent, isVNode, ref, watchEffect } from "vue";
4
- import { useBreakpoint } from "@gx-design-vue/pro-hooks";
5
- import { classNames as classNames$1, isBoolean } from "@gx-design-vue/pro-utils";
6
- import { useElementBounding } from "@vueuse/core";
7
- import { Tooltip } from "ant-design-vue";
8
- import { InfoCircleOutlined } from "@ant-design/icons-vue";
9
-
10
- //#region src/components/ListToolBar/index.tsx
11
- /**
12
- * 获取配置区域 DOM Item
13
- *
14
- * @param setting 配置项
15
- */
16
- function getSettingItem(setting) {
17
- if (isVNode(setting)) return setting;
18
- if (setting) {
19
- const { icon, tooltip, onClick, key } = setting;
20
- if (icon && tooltip) return createVNode(Tooltip, {
21
- "title": tooltip,
22
- "key": key
23
- }, { default: () => [createVNode("span", {
24
- "key": key,
25
- "onClick": () => {
26
- if (onClick) onClick(key);
27
- }
28
- }, [icon])] });
29
- return icon;
30
- }
31
- return null;
32
- }
33
- const ListToolBar = /* @__PURE__ */ defineComponent({
34
- props: {
35
- actions: [Array],
36
- settings: [Array],
37
- headerTitle: proTableProps.headerTitle,
38
- listToolAfter: proTableProps.listToolAfter,
39
- headerTitleTip: proTableProps.headerTitleTip,
40
- titleTipText: proTableProps.titleTipText,
41
- actionsPlacement: String
42
- },
43
- setup(props) {
44
- const listToolBarEl = ref();
45
- const { height } = useElementBounding(listToolBarEl);
46
- const screens = useBreakpoint();
47
- const { isMobile, tableListToolsHeight, classNames, styles, hashId, prefixCls } = useTableContext();
48
- const baseClassName = `${prefixCls}-list-toolbar`;
49
- watchEffect(() => {
50
- tableListToolsHeight.value = height.value || 0;
51
- });
52
- const hasTitle = computed(() => !!(props.headerTitleTip || props.headerTitle));
53
- const actionDom = computed(() => {
54
- if (!Array.isArray(props.actions) || props.actions?.length < 1) return {
55
- left: null,
56
- right: null
57
- };
58
- const left = props.actions.filter((child) => isVNode(child)).filter((child) => (child?.props?.placement || props.actionsPlacement) === "left");
59
- const right = props.actions.filter((child) => isVNode(child)).filter((child) => (child?.props?.placement || props.actionsPlacement) === "right");
60
- return {
61
- left: left.length ? createVNode("div", { "class": classNames$1(`${baseClassName}-actions`, hashId.value) }, [left]) : null,
62
- right: right.length ? createVNode("div", { "class": classNames$1(`${baseClassName}-actions`, hashId.value) }, [right]) : null
63
- };
64
- });
65
- const hasLeft = computed(() => {
66
- return !!(props.headerTitleTip || props.headerTitle || actionDom.value.left);
67
- });
68
- const hasRight = computed(() => {
69
- return !!(props.settings?.length || actionDom.value.right);
70
- });
71
- const leftTitleDom = () => {
72
- if (!hasLeft.value && hasRight.value) return createVNode("div", { "class": classNames$1(`${baseClassName}-left`, hashId.value) }, null);
73
- const actions = actionDom.value.left;
74
- const classs = classNames$1(`${baseClassName}-left ${hashId.value}`, classNames.value?.toolbarLeft);
75
- const style = styles.value?.toolbarLeft;
76
- if (hasTitle.value) return createVNode("div", {
77
- "class": classs,
78
- "style": style
79
- }, [createVNode("div", { "class": classNames$1(`${baseClassName}-title`, hashId.value) }, [props.headerTitle, props.headerTitleTip && createVNode(Tooltip, { "title": props.titleTipText }, { default: () => [isBoolean(props.headerTitleTip) && props.headerTitleTip ? createVNode(InfoCircleOutlined, null, null) : props.headerTitleTip] })]), actions]);
80
- return createVNode("div", {
81
- "class": classs,
82
- "style": style
83
- }, [actions]);
84
- };
85
- const rightTitleDom = () => {
86
- if (!hasRight.value) return null;
87
- const actions = actionDom.value.right;
88
- return createVNode("div", {
89
- "class": classNames$1(`${baseClassName}-right ${hashId.value}`, classNames.value?.toolbarRight),
90
- "style": {
91
- alignItems: screens.value.lg ? "center" : "flex-end",
92
- flexDirection: screens.value.lg ? "row" : "column",
93
- ...styles.value?.toolbarRight || {}
94
- }
95
- }, [actions, props.settings?.length ? createVNode("div", { "class": classNames$1(`${baseClassName}-setting-items`, hashId.value) }, [props.settings.map((setting, index) => {
96
- const settingItem = getSettingItem(setting);
97
- return createVNode("div", {
98
- "key": index,
99
- "class": classNames$1(`${baseClassName}-setting-item`, hashId.value)
100
- }, [settingItem]);
101
- })]) : null]);
102
- };
103
- const titleNode = () => {
104
- if (!hasRight.value && !hasLeft.value) return null;
105
- return createVNode("div", { "class": classNames$1(hashId.value, `${baseClassName}-container`, isMobile.value && `${baseClassName}-container-mobile`) }, [leftTitleDom(), rightTitleDom()]);
106
- };
107
- return () => {
108
- return createVNode("div", {
109
- "ref": listToolBarEl,
110
- "class": classNames$1(`${baseClassName} ${hashId.value}`, props.listToolAfter && `${baseClassName}-with-after`, classNames.value?.toolbar),
111
- "style": styles.value?.toolbar
112
- }, [titleNode(), props.listToolAfter && createVNode("div", {
113
- "class": classNames$1(`${baseClassName}-after ${hashId.value}`, classNames.value?.toolbarAfter),
114
- "style": styles.value?.toolbarAfter
115
- }, [props.listToolAfter])]);
116
- };
117
- }
118
- });
119
- ListToolBar.inheritAttrs = false;
120
- var ListToolBar_default = ListToolBar;
121
-
122
- //#endregion
123
- export { ListToolBar_default as default };
@@ -1,6 +0,0 @@
1
- import { GenerateStyle } from "@gx-design-vue/pro-provider";
2
-
3
- //#region src/components/ListToolBar/style.d.ts
4
- declare const genListToolBarStyle: GenerateStyle;
5
- //#endregion
6
- export { genListToolBarStyle };
@@ -1,49 +0,0 @@
1
- import { barProps } from "./props.js";
2
- import * as vue170 from "vue";
3
- import { ExtractPropTypes } from "vue";
4
- import * as vue_jsx_runtime2 from "vue/jsx-runtime";
5
-
6
- //#region src/components/ScrollBar/Bar/index.d.ts
7
- type BarProps = ExtractPropTypes<typeof barProps>;
8
- declare const Bar: vue170.DefineComponent<ExtractPropTypes<{
9
- always: {
10
- type: BooleanConstructor;
11
- default: boolean;
12
- };
13
- minSize: {
14
- type: vue170.PropType<number>;
15
- default: number;
16
- };
17
- barStyle: {
18
- type: vue170.PropType<{
19
- x: vue170.CSSProperties;
20
- y: vue170.CSSProperties;
21
- }>;
22
- default: () => {};
23
- };
24
- }>, () => vue_jsx_runtime2.JSX.Element, {}, {}, {}, vue170.ComponentOptionsMixin, vue170.ComponentOptionsMixin, {}, string, vue170.PublicProps, Readonly<ExtractPropTypes<{
25
- always: {
26
- type: BooleanConstructor;
27
- default: boolean;
28
- };
29
- minSize: {
30
- type: vue170.PropType<number>;
31
- default: number;
32
- };
33
- barStyle: {
34
- type: vue170.PropType<{
35
- x: vue170.CSSProperties;
36
- y: vue170.CSSProperties;
37
- }>;
38
- default: () => {};
39
- };
40
- }>> & Readonly<{}>, {
41
- always: boolean;
42
- barStyle: {
43
- x: vue170.CSSProperties;
44
- y: vue170.CSSProperties;
45
- };
46
- minSize: number;
47
- }, {}, {}, {}, string, vue170.ComponentProvideOptions, true, {}, any>;
48
- //#endregion
49
- export { BarProps, Bar as default };
@@ -1,71 +0,0 @@
1
- import { useTableContext } from "../../../context/TableContext.js";
2
- import { useScrollBarContext } from "../context.js";
3
- import { GAP } from "../util.js";
4
- import Thumb_default from "../Thumb/index.js";
5
- import { barProps } from "./props.js";
6
- import { Fragment, createVNode, defineComponent, nextTick, onMounted, ref } from "vue";
7
-
8
- //#region src/components/ScrollBar/Bar/index.tsx
9
- const Bar = /* @__PURE__ */ defineComponent({
10
- inheritAttrs: false,
11
- props: barProps,
12
- setup(props, { expose }) {
13
- const { tableScrollState } = useTableContext();
14
- const scrollbar = useScrollBarContext();
15
- const moveX = ref(0);
16
- const moveY = ref(0);
17
- const sizeWidth = ref("");
18
- const sizeHeight = ref("");
19
- const ratioY = ref(1);
20
- const ratioX = ref(1);
21
- const handleScroll = (wrap) => {
22
- if (wrap) {
23
- const offsetHeight = wrap.offsetHeight - GAP;
24
- const offsetWidth = wrap.offsetWidth - GAP;
25
- moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
26
- moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
27
- }
28
- };
29
- const update = () => {
30
- const wrap = scrollbar?.wrapElement;
31
- if (!wrap?.value) return;
32
- const offsetHeight = wrap.value.offsetHeight - GAP;
33
- const offsetWidth = wrap.value.offsetWidth - GAP;
34
- const originalHeight = offsetHeight ** 2 / wrap.value.scrollHeight;
35
- const originalWidth = offsetWidth ** 2 / wrap.value.scrollWidth;
36
- const height = Math.max(originalHeight, props.minSize);
37
- const width = Math.max(originalWidth, props.minSize);
38
- ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
39
- ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
40
- sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : "";
41
- sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : "";
42
- };
43
- onMounted(() => {
44
- nextTick(() => {
45
- update();
46
- });
47
- });
48
- expose({
49
- update,
50
- handleScroll
51
- });
52
- return () => createVNode(Fragment, null, [createVNode(Thumb_default, {
53
- "move": moveX.value,
54
- "barStyle": props.barStyle.x,
55
- "ratio": ratioX.value,
56
- "size": sizeWidth.value,
57
- "always": props.always
58
- }, null), !!tableScrollState.value.y && createVNode(Thumb_default, {
59
- "move": moveY.value,
60
- "barStyle": props.barStyle.y,
61
- "ratio": ratioY.value,
62
- "size": sizeHeight.value,
63
- "vertical": true,
64
- "always": props.always
65
- }, null)]);
66
- }
67
- });
68
- var Bar_default = Bar;
69
-
70
- //#endregion
71
- export { Bar_default as default };
@@ -1,25 +0,0 @@
1
- import { CSSProperties, PropType } from "vue";
2
-
3
- //#region src/components/ScrollBar/Bar/props.d.ts
4
- declare const barProps: {
5
- always: {
6
- type: BooleanConstructor;
7
- default: boolean;
8
- };
9
- minSize: {
10
- type: PropType<number>;
11
- default: number;
12
- };
13
- /**
14
- * @description style of bar
15
- */
16
- barStyle: {
17
- type: PropType<{
18
- x: CSSProperties;
19
- y: CSSProperties;
20
- }>;
21
- default: () => {};
22
- };
23
- };
24
- //#endregion
25
- export { barProps };
@@ -1,18 +0,0 @@
1
- //#region src/components/ScrollBar/Bar/props.ts
2
- const barProps = {
3
- always: {
4
- type: Boolean,
5
- default: true
6
- },
7
- minSize: {
8
- type: Number,
9
- default: 20
10
- },
11
- barStyle: {
12
- type: [Object],
13
- default: () => ({})
14
- }
15
- };
16
-
17
- //#endregion
18
- export { barProps };
@@ -1,40 +0,0 @@
1
- import { thumbProps } from "./props.js";
2
- import * as vue163 from "vue";
3
- import { CSSProperties, ExtractPropTypes } from "vue";
4
- import * as vue_jsx_runtime1 from "vue/jsx-runtime";
5
-
6
- //#region src/components/ScrollBar/Thumb/index.d.ts
7
- type ThumbProps = ExtractPropTypes<typeof thumbProps>;
8
- declare const Thumb: vue163.DefineComponent<ExtractPropTypes<{
9
- vertical: BooleanConstructor;
10
- size: StringConstructor;
11
- move: NumberConstructor;
12
- ratio: {
13
- type: NumberConstructor;
14
- required: boolean;
15
- };
16
- always: BooleanConstructor;
17
- barStyle: {
18
- type: vue163.PropType<CSSProperties>;
19
- default: () => {};
20
- };
21
- }>, () => vue_jsx_runtime1.JSX.Element, {}, {}, {}, vue163.ComponentOptionsMixin, vue163.ComponentOptionsMixin, {}, string, vue163.PublicProps, Readonly<ExtractPropTypes<{
22
- vertical: BooleanConstructor;
23
- size: StringConstructor;
24
- move: NumberConstructor;
25
- ratio: {
26
- type: NumberConstructor;
27
- required: boolean;
28
- };
29
- always: BooleanConstructor;
30
- barStyle: {
31
- type: vue163.PropType<CSSProperties>;
32
- default: () => {};
33
- };
34
- }>> & Readonly<{}>, {
35
- vertical: boolean;
36
- always: boolean;
37
- barStyle: CSSProperties;
38
- }, {}, {}, {}, string, vue163.ComponentProvideOptions, true, {}, any>;
39
- //#endregion
40
- export { ThumbProps, Thumb as default };
@@ -1,20 +0,0 @@
1
- import { CSSProperties, ExtractPropTypes, PropType } from "vue";
2
-
3
- //#region src/components/ScrollBar/Thumb/props.d.ts
4
- declare const thumbProps: {
5
- vertical: BooleanConstructor;
6
- size: StringConstructor;
7
- move: NumberConstructor;
8
- ratio: {
9
- type: NumberConstructor;
10
- required: boolean;
11
- };
12
- always: BooleanConstructor;
13
- barStyle: {
14
- type: PropType<CSSProperties>;
15
- default: () => {};
16
- };
17
- };
18
- type ThumbProps = ExtractPropTypes<typeof thumbProps>;
19
- //#endregion
20
- export { ThumbProps, thumbProps };
@@ -1,18 +0,0 @@
1
- //#region src/components/ScrollBar/Thumb/props.ts
2
- const thumbProps = {
3
- vertical: Boolean,
4
- size: String,
5
- move: Number,
6
- ratio: {
7
- type: Number,
8
- required: true
9
- },
10
- always: Boolean,
11
- barStyle: {
12
- type: [Object],
13
- default: () => ({})
14
- }
15
- };
16
-
17
- //#endregion
18
- export { thumbProps };
@@ -1,37 +0,0 @@
1
- import { ProColumnType } from "../../types/ColumnTypings.js";
2
- import * as vue195 from "vue";
3
- import { PropType } from "vue";
4
- import * as vue_jsx_runtime3 from "vue/jsx-runtime";
5
-
6
- //#region src/components/TableCell/index.d.ts
7
- declare const TableCell: vue195.DefineComponent<vue195.ExtractPropTypes<{
8
- text: PropType<any>;
9
- className: {
10
- type: PropType<string>;
11
- required: true;
12
- };
13
- hashId: {
14
- type: PropType<string>;
15
- required: true;
16
- };
17
- column: {
18
- type: PropType<ProColumnType>;
19
- required: true;
20
- };
21
- }>, () => vue_jsx_runtime3.JSX.Element, {}, {}, {}, vue195.ComponentOptionsMixin, vue195.ComponentOptionsMixin, {}, string, vue195.PublicProps, Readonly<vue195.ExtractPropTypes<{
22
- text: PropType<any>;
23
- className: {
24
- type: PropType<string>;
25
- required: true;
26
- };
27
- hashId: {
28
- type: PropType<string>;
29
- required: true;
30
- };
31
- column: {
32
- type: PropType<ProColumnType>;
33
- required: true;
34
- };
35
- }>> & Readonly<{}>, {}, {}, {}, {}, string, vue195.ComponentProvideOptions, true, {}, any>;
36
- //#endregion
37
- export { TableCell as default };
@@ -1,72 +0,0 @@
1
- import { computed, createVNode, defineComponent, isVNode, mergeProps, ref } from "vue";
2
- import { useProConfigContext } from "@gx-design-vue/pro-provider";
3
- import { classNames, getTextWidth, isArray, isNumber, isObject, isString } from "@gx-design-vue/pro-utils";
4
- import { Tooltip, theme } from "ant-design-vue";
5
-
6
- //#region src/components/TableCell/index.tsx
7
- function _isSlot(s) {
8
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
9
- }
10
- const useToken = theme.useToken;
11
- const TableCell = /* @__PURE__ */ defineComponent({
12
- name: "TableCell",
13
- props: {
14
- text: [
15
- String,
16
- Object,
17
- Array
18
- ],
19
- className: {
20
- type: String,
21
- required: true
22
- },
23
- hashId: {
24
- type: String,
25
- required: true
26
- },
27
- column: {
28
- type: Object,
29
- required: true
30
- }
31
- },
32
- inheritAttrs: false,
33
- setup(props) {
34
- const proConfigContext = useProConfigContext();
35
- const { token } = useToken();
36
- const parentEl = ref();
37
- const originStr = computed(() => {
38
- return isArray(props.text) ? typeof props.text?.[0]?.children === "string" ? props.text?.[0]?.children : "" : props.text ? props.text.toString() : "";
39
- });
40
- const tooltipProps = computed(() => {
41
- return props.column.tooltip === false ? {} : props.column.tooltip;
42
- });
43
- const hiddenLine = computed(() => {
44
- return props.column.tooltip === false ? 1 : isNumber(tooltipProps.value?.hiddenLine) && tooltipProps.value?.hiddenLine > 0 ? tooltipProps.value?.hiddenLine : 1;
45
- });
46
- function checkIsOverflow() {
47
- if (props.column?.tooltip === false) return false;
48
- const columnWidth = parentEl.value ? parentEl.value.clientWidth : 0;
49
- const rootWidth = isNumber(tooltipProps.value?.width) ? tooltipProps.value?.width : columnWidth;
50
- const textWidth = isString(originStr.value) ? getTextWidth(originStr.value, { cssObject: {
51
- fontSize: "14px",
52
- lineHeight: "22px",
53
- fontFamily: proConfigContext?.token?.value?.fontFamily || token?.value?.fontFamily,
54
- wordBreak: "break-word",
55
- ...tooltipProps.value?.targetStyle || {}
56
- } }) : 0;
57
- return rootWidth && textWidth ? textWidth > rootWidth : true;
58
- }
59
- return () => {
60
- const textRender = createVNode("div", { "class": classNames(`${props.className}-ellipsis-text`, props.hashId) }, [props.text]);
61
- return createVNode("div", {
62
- "ref": parentEl,
63
- "class": classNames(`${props.className}-ellipsis`, props.hashId, tooltipProps.value?.class),
64
- "style": { "-webkit-line-clamp": hiddenLine.value }
65
- }, [checkIsOverflow() ? createVNode(Tooltip, mergeProps({ "title": props.text }, isObject(props.column.tooltip) ? props.column.tooltip : {}, { "destroyTooltipOnHide": true }), _isSlot(textRender) ? textRender : { default: () => [textRender] }) : textRender]);
66
- };
67
- }
68
- });
69
- var TableCell_default = TableCell;
70
-
71
- //#endregion
72
- export { TableCell_default as default };
@@ -1,7 +0,0 @@
1
- import * as vue151 from "vue";
2
- import * as vue_jsx_runtime0 from "vue/jsx-runtime";
3
-
4
- //#region src/components/ToolBar/FullscreenIcon.d.ts
5
- declare const FullScreenIcon: vue151.DefineComponent<{}, () => vue_jsx_runtime0.JSX.Element, {}, {}, {}, vue151.ComponentOptionsMixin, vue151.ComponentOptionsMixin, {}, string, vue151.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue151.ComponentProvideOptions, true, {}, any>;
6
- //#endregion
7
- export { FullScreenIcon as default };
@@ -1,14 +0,0 @@
1
- import { createVNode, defineComponent } from "vue";
2
- import { useFullscreen } from "@vueuse/core";
3
- import { Tooltip } from "ant-design-vue";
4
- import { FullscreenExitOutlined, FullscreenOutlined } from "@ant-design/icons-vue";
5
-
6
- //#region src/components/ToolBar/FullscreenIcon.tsx
7
- const FullScreenIcon = /* @__PURE__ */ defineComponent({ setup() {
8
- const { isFullscreen } = useFullscreen();
9
- return () => isFullscreen.value ? createVNode(Tooltip, { "title": "退出全屏" }, { default: () => [createVNode(FullscreenExitOutlined, null, null)] }) : createVNode(Tooltip, { "title": "全屏" }, { default: () => [createVNode(FullscreenOutlined, null, null)] });
10
- } });
11
- var FullscreenIcon_default = FullScreenIcon;
12
-
13
- //#endregion
14
- export { FullscreenIcon_default as default };
@@ -1,34 +0,0 @@
1
- import { OptionConfig, ProTableProps, TableActionPlacement } from "../../types/TableTypings.js";
2
- import * as vue202 from "vue";
3
- import { PropType, VNode } from "vue";
4
- import * as vue_jsx_runtime4 from "vue/jsx-runtime";
5
-
6
- //#region src/components/ToolBar/index.d.ts
7
- type OptionsFunctionType = () => void;
8
- interface ToolBarProps {
9
- actionsRender?: VNode[];
10
- headerTitle?: ProTableProps['headerTitle'];
11
- listToolAfter?: ProTableProps['listToolAfter'];
12
- headerTitleTip?: ProTableProps['headerTitleTip'];
13
- titleTipText?: ProTableProps['titleTipText'];
14
- options?: OptionConfig | boolean;
15
- }
16
- declare const ToolbarRender: vue202.DefineComponent<vue202.ExtractPropTypes<{
17
- options: PropType<ProTableProps["options"]>;
18
- actionsPlacement: PropType<TableActionPlacement>;
19
- headerTitle: PropType<ProTableProps["headerTitle"]>;
20
- listToolAfter: PropType<ProTableProps["listToolAfter"]>;
21
- headerTitleTip: PropType<ProTableProps["headerTitleTip"]>;
22
- titleTipText: PropType<ProTableProps["titleTipText"]>;
23
- actionsRender: PropType<ToolBarProps["actionsRender"]>;
24
- }>, () => vue_jsx_runtime4.JSX.Element, {}, {}, {}, vue202.ComponentOptionsMixin, vue202.ComponentOptionsMixin, {}, string, vue202.PublicProps, Readonly<vue202.ExtractPropTypes<{
25
- options: PropType<ProTableProps["options"]>;
26
- actionsPlacement: PropType<TableActionPlacement>;
27
- headerTitle: PropType<ProTableProps["headerTitle"]>;
28
- listToolAfter: PropType<ProTableProps["listToolAfter"]>;
29
- headerTitleTip: PropType<ProTableProps["headerTitleTip"]>;
30
- titleTipText: PropType<ProTableProps["titleTipText"]>;
31
- actionsRender: PropType<ToolBarProps["actionsRender"]>;
32
- }>> & Readonly<{}>, {}, {}, {}, {}, string, vue202.ComponentProvideOptions, true, {}, any>;
33
- //#endregion
34
- export { OptionsFunctionType, ToolBarProps, ToolbarRender as default };