@gx-design-vue/pro-table 0.2.0-alpha.8 → 0.2.0-alpha.9

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