@fangzhongya/fang-ui 0.1.19 → 0.1.21

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 (151) hide show
  1. package/dist/components/array/src/data.cjs +4 -0
  2. package/dist/components/array/src/data.d.ts +4 -0
  3. package/dist/components/array/src/data.js +4 -0
  4. package/dist/components/array/src/index2.cjs +22 -21
  5. package/dist/components/array/src/index2.js +12 -11
  6. package/dist/components/common/compons.cjs +4 -2
  7. package/dist/components/common/compons.d.ts +1 -1
  8. package/dist/components/common/compons.js +4 -2
  9. package/dist/components/forms/src/data.cjs +5 -5
  10. package/dist/components/forms/src/data.d.ts +1 -1
  11. package/dist/components/forms/src/data.js +5 -5
  12. package/dist/components/forms/src/index2.cjs +5 -3
  13. package/dist/components/forms/src/index2.js +5 -3
  14. package/dist/components/forms/src/setup.cjs +0 -7
  15. package/dist/components/forms/src/setup.js +0 -7
  16. package/dist/components/forms-div/src/data.cjs +1 -1
  17. package/dist/components/forms-div/src/data.js +1 -1
  18. package/dist/components/forms-div/src/index2.cjs +11 -4
  19. package/dist/components/forms-div/src/index2.js +10 -3
  20. package/dist/components/forms-item/src/data.cjs +1 -1
  21. package/dist/components/forms-item/src/data.js +1 -1
  22. package/dist/components/forms-item/src/index2.cjs +4 -2
  23. package/dist/components/forms-item/src/index2.js +4 -2
  24. package/dist/components/forms-item/src/label.cjs +3 -2
  25. package/dist/components/forms-item/src/label.js +3 -2
  26. package/dist/components/forms-items/src/data.cjs +1 -1
  27. package/dist/components/forms-items/src/data.js +1 -1
  28. package/dist/components/forms-items/src/index2.cjs +4 -2
  29. package/dist/components/forms-items/src/index2.js +4 -2
  30. package/dist/components/global-config/src/data.cjs +12 -0
  31. package/dist/components/global-config/src/data.d.ts +12 -0
  32. package/dist/components/global-config/src/data.js +12 -0
  33. package/dist/components/index.cjs +16 -12
  34. package/dist/components/index.d.ts +2 -0
  35. package/dist/components/index.js +4 -0
  36. package/dist/components/index.scss +2 -0
  37. package/dist/components/index2.scss +2 -0
  38. package/dist/components/list/index.css +12 -0
  39. package/dist/components/list/index.scss +15 -0
  40. package/dist/components/list/src/data.cjs +21 -2
  41. package/dist/components/list/src/data.d.ts +22 -1
  42. package/dist/components/list/src/data.js +21 -2
  43. package/dist/components/list/src/index2.cjs +75 -23
  44. package/dist/components/list/src/index2.js +76 -24
  45. package/dist/components/list/style/index2.scss +1 -0
  46. package/dist/components/lists/index.css +2 -2
  47. package/dist/components/lists/index.scss +7 -2
  48. package/dist/components/lists/src/data.cjs +12 -1
  49. package/dist/components/lists/src/data.d.ts +10 -0
  50. package/dist/components/lists/src/data.js +12 -1
  51. package/dist/components/lists/src/index2.cjs +7 -5
  52. package/dist/components/lists/src/index2.js +7 -5
  53. package/dist/components/listsp/index.css +2 -2
  54. package/dist/components/listsp/src/data.d.ts +1 -5
  55. package/dist/components/listspd/index.cjs +9 -0
  56. package/dist/components/listspd/index.css +99 -0
  57. package/dist/components/listspd/index.d.ts +4 -0
  58. package/dist/components/listspd/index.js +9 -0
  59. package/dist/components/listspd/index.scss +30 -0
  60. package/dist/components/listspd/src/data.cjs +13 -0
  61. package/dist/components/listspd/src/data.d.ts +14 -0
  62. package/dist/components/listspd/src/data.js +13 -0
  63. package/dist/components/listspd/src/index.cjs +4 -0
  64. package/dist/components/listspd/src/index.js +4 -0
  65. package/dist/components/listspd/src/index2.cjs +111 -0
  66. package/dist/components/listspd/src/index2.js +111 -0
  67. package/dist/components/listspd/style/index2.scss +4 -0
  68. package/dist/components/page/index.css +11 -0
  69. package/dist/components/tables/common/config.cjs +1 -1
  70. package/dist/components/tables/common/config.js +1 -1
  71. package/dist/components/tables/common/pagin.cjs +60 -16
  72. package/dist/components/tables/common/pagin.d.ts +8 -0
  73. package/dist/components/tables/common/pagin.js +60 -16
  74. package/dist/components/tables/common/tooltip.cjs +101 -0
  75. package/dist/components/tables/common/tooltip.d.ts +6 -0
  76. package/dist/components/tables/common/tooltip.js +101 -0
  77. package/dist/components/tables/common/util.cjs +3 -3
  78. package/dist/components/tables/common/util.js +3 -3
  79. package/dist/components/tables/src/column.cjs +19 -15
  80. package/dist/components/tables/src/column.d.ts +3 -2
  81. package/dist/components/tables/src/column.js +17 -13
  82. package/dist/components/tables/src/columns3.cjs +16 -32
  83. package/dist/components/tables/src/columns3.js +15 -31
  84. package/dist/components/tables/src/data.cjs +3 -2
  85. package/dist/components/tables/src/data.d.ts +1 -0
  86. package/dist/components/tables/src/data.js +3 -2
  87. package/dist/components/tablespd/index.cjs +9 -0
  88. package/dist/components/tablespd/index.css +88 -0
  89. package/dist/components/tablespd/index.d.ts +4 -0
  90. package/dist/components/tablespd/index.js +9 -0
  91. package/dist/components/tablespd/index.scss +40 -0
  92. package/dist/components/tablespd/src/data.cjs +13 -0
  93. package/dist/components/tablespd/src/data.d.ts +18 -0
  94. package/dist/components/tablespd/src/data.js +13 -0
  95. package/dist/components/tablespd/src/index.cjs +4 -0
  96. package/dist/components/tablespd/src/index.js +4 -0
  97. package/dist/components/tablespd/src/index2.cjs +111 -0
  98. package/dist/components/tablespd/src/index2.js +111 -0
  99. package/dist/components/tablespd/style/index2.scss +4 -0
  100. package/dist/components/tablesv/src/column.cjs +4 -4
  101. package/dist/components/tablesv/src/column.js +3 -3
  102. package/dist/css/index.css +65 -2
  103. package/dist/css/list.css +12 -0
  104. package/dist/css/lists.css +2 -2
  105. package/dist/css/listsp.css +2 -2
  106. package/dist/css/listspd.css +99 -0
  107. package/dist/css/page.css +11 -0
  108. package/dist/css/tablespd.css +88 -0
  109. package/dist/directives/adjust/index.cjs +10 -6
  110. package/dist/directives/adjust/index.js +10 -6
  111. package/dist/directives/index.cjs +6 -4
  112. package/dist/directives/index.d.ts +1 -0
  113. package/dist/directives/index.js +4 -2
  114. package/dist/directives/sortable/index.cjs +45 -0
  115. package/dist/directives/{adjust/index copy 2.d.ts → sortable/index.d.ts} +1 -1
  116. package/dist/directives/sortable/index.js +45 -0
  117. package/dist/expand/{chunk-IEODUGVJ.cjs → chunk-2L4PC7LZ.cjs} +5 -0
  118. package/dist/expand/{chunk-XY53LCPN.js → chunk-RBGCE6BS.js} +5 -0
  119. package/dist/expand/components.cjs +5 -5
  120. package/dist/expand/components.js +1 -1
  121. package/dist/expand/config.cjs +2 -2
  122. package/dist/expand/config.js +1 -1
  123. package/dist/hooks/cssname/index.d.ts +2 -2
  124. package/dist/hooks/index.cjs +0 -1
  125. package/dist/hooks/index.js +1 -2
  126. package/dist/hooks/inherit/index.cjs +0 -8
  127. package/dist/hooks/inherit/index.d.ts +0 -1
  128. package/dist/hooks/inherit/index.js +0 -8
  129. package/dist/icons/index.json +1 -1
  130. package/dist/index.cjs +38 -32
  131. package/dist/index.css +65 -2
  132. package/dist/index.js +8 -2
  133. package/dist/utils/vues/getAttrValue.cjs +11 -0
  134. package/dist/utils/vues/getAttrValue.d.ts +3 -0
  135. package/dist/utils/vues/getAttrValue.js +11 -0
  136. package/dist/utils/vues/index.cjs +2 -0
  137. package/dist/utils/vues/index.d.ts +1 -0
  138. package/dist/utils/vues/index.js +2 -0
  139. package/package.json +4 -2
  140. package/dist/directives/adjust/index copy 3.d.ts +0 -6
  141. package/dist/directives/adjust/index copy 4.d.ts +0 -6
  142. package/dist/directives/adjust/index copy 5.d.ts +0 -6
  143. package/dist/directives/adjust/index copy 6.d.ts +0 -6
  144. package/dist/directives/adjust/index copy 7.d.ts +0 -6
  145. package/dist/directives/adjust/index copy 8.d.ts +0 -6
  146. package/dist/directives/adjust/index copy 9.d.ts +0 -6
  147. package/dist/directives/adjust/index copy.d.ts +0 -6
  148. /package/dist/components/{forms-item → forms-items}/index.css +0 -0
  149. /package/dist/components/{date-picker → keep-com}/index.css +0 -0
  150. /package/dist/css/{forms-item.css → forms-items.css} +0 -0
  151. /package/dist/css/{date-picker.css → keep-com.css} +0 -0
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const vue = require("vue");
4
+ const index = require("../../tooltip/index.cjs");
5
+ const mergeObject = require("@fangzhongya/utils/basic/object/mergeObject");
6
+ exports.removePopper = null;
7
+ const getCell = function(event) {
8
+ var _a;
9
+ return (_a = event.target) == null ? void 0 : _a.closest("td");
10
+ };
11
+ const getContent = function(event) {
12
+ const target = event.target;
13
+ return target.innerText || target.textContent;
14
+ };
15
+ function isGreaterThan(a, b, epsilon = 0.03) {
16
+ return a - b > epsilon;
17
+ }
18
+ const getPadding = (el) => {
19
+ const style = window.getComputedStyle(el, null);
20
+ const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0;
21
+ const paddingRight = Number.parseInt(style.paddingRight, 10) || 0;
22
+ const paddingTop = Number.parseInt(style.paddingTop, 10) || 0;
23
+ const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0;
24
+ return {
25
+ left: paddingLeft,
26
+ right: paddingRight,
27
+ top: paddingTop,
28
+ bottom: paddingBottom
29
+ };
30
+ };
31
+ function hideTooltip(event) {
32
+ const cellChild = event.target;
33
+ cellChild.title = "";
34
+ }
35
+ function isExceed(cellChild, lineClamp = 1) {
36
+ const range = document.createRange();
37
+ range.setStart(cellChild, 0);
38
+ range.setEnd(cellChild, cellChild.childNodes.length);
39
+ const { width: rangeWidth, height: rangeHeight } = range.getBoundingClientRect();
40
+ const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect();
41
+ const { top, left, right, bottom } = getPadding(cellChild);
42
+ const verticalPadding = top + bottom;
43
+ const horizontalPadding = left + right;
44
+ if (lineClamp > 1) {
45
+ if (isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) || isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) || isGreaterThan(cellChild.scrollWidth, cellChildWidth)) {
46
+ return true;
47
+ }
48
+ } else {
49
+ if (isGreaterThan(rangeHeight + verticalPadding, cellChildHeight)) {
50
+ return true;
51
+ }
52
+ }
53
+ return false;
54
+ }
55
+ function showTooltip(event, parentNode, showOverflow, lineClamp = 1, props = {}) {
56
+ const cellChild = event.target;
57
+ if (isExceed(cellChild, lineClamp)) {
58
+ if (showOverflow == "title") {
59
+ cellChild.title = getContent(event);
60
+ } else {
61
+ const trigger = event.target;
62
+ createTablePopper(
63
+ trigger,
64
+ { ...props, content: getContent(event) },
65
+ parentNode
66
+ );
67
+ }
68
+ }
69
+ }
70
+ function createTablePopper(trigger, mergedProps, parentNode) {
71
+ var _a, _b;
72
+ if (((_a = exports.removePopper) == null ? void 0 : _a.trigger) === trigger) {
73
+ const comp = exports.removePopper.vm.component;
74
+ mergeObject.mergeObject(comp.props, mergedProps);
75
+ return;
76
+ }
77
+ (_b = exports.removePopper) == null ? void 0 : _b.call(exports);
78
+ const vm = vue.createVNode(index.Tooltip, {
79
+ virtualTriggering: true,
80
+ virtualRef: trigger,
81
+ appendTo: parentNode,
82
+ placement: "top",
83
+ transition: "none",
84
+ hideAfter: 0,
85
+ ...mergedProps
86
+ });
87
+ const container = document.createElement("div");
88
+ vue.render(vm, container);
89
+ vm.component.exposed.onOpen();
90
+ exports.removePopper = () => {
91
+ vue.render(null, container);
92
+ exports.removePopper = null;
93
+ };
94
+ exports.removePopper.trigger = trigger;
95
+ exports.removePopper.vm = vm;
96
+ }
97
+ exports.createTablePopper = createTablePopper;
98
+ exports.getCell = getCell;
99
+ exports.getContent = getContent;
100
+ exports.hideTooltip = hideTooltip;
101
+ exports.showTooltip = showTooltip;
@@ -0,0 +1,6 @@
1
+ export declare let removePopper: any | null;
2
+ export declare const getCell: (event: Event) => HTMLTableCellElement | null;
3
+ export declare const getContent: (event: Event) => string;
4
+ export declare function hideTooltip(event: MouseEvent): void;
5
+ export declare function showTooltip(event: MouseEvent, parentNode: HTMLElement, showOverflow: string | boolean, lineClamp?: number, props?: ObjAny): void;
6
+ export declare function createTablePopper(trigger: HTMLElement, mergedProps: ObjAny, parentNode: HTMLElement): void;
@@ -0,0 +1,101 @@
1
+ import { createVNode, render } from "vue";
2
+ import { Tooltip } from "../../tooltip/index.js";
3
+ import { mergeObject } from "@fangzhongya/utils/basic/object/mergeObject";
4
+ let removePopper = null;
5
+ const getCell = function(event) {
6
+ var _a;
7
+ return (_a = event.target) == null ? void 0 : _a.closest("td");
8
+ };
9
+ const getContent = function(event) {
10
+ const target = event.target;
11
+ return target.innerText || target.textContent;
12
+ };
13
+ function isGreaterThan(a, b, epsilon = 0.03) {
14
+ return a - b > epsilon;
15
+ }
16
+ const getPadding = (el) => {
17
+ const style = window.getComputedStyle(el, null);
18
+ const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0;
19
+ const paddingRight = Number.parseInt(style.paddingRight, 10) || 0;
20
+ const paddingTop = Number.parseInt(style.paddingTop, 10) || 0;
21
+ const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0;
22
+ return {
23
+ left: paddingLeft,
24
+ right: paddingRight,
25
+ top: paddingTop,
26
+ bottom: paddingBottom
27
+ };
28
+ };
29
+ function hideTooltip(event) {
30
+ const cellChild = event.target;
31
+ cellChild.title = "";
32
+ }
33
+ function isExceed(cellChild, lineClamp = 1) {
34
+ const range = document.createRange();
35
+ range.setStart(cellChild, 0);
36
+ range.setEnd(cellChild, cellChild.childNodes.length);
37
+ const { width: rangeWidth, height: rangeHeight } = range.getBoundingClientRect();
38
+ const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect();
39
+ const { top, left, right, bottom } = getPadding(cellChild);
40
+ const verticalPadding = top + bottom;
41
+ const horizontalPadding = left + right;
42
+ if (lineClamp > 1) {
43
+ if (isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) || isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) || isGreaterThan(cellChild.scrollWidth, cellChildWidth)) {
44
+ return true;
45
+ }
46
+ } else {
47
+ if (isGreaterThan(rangeHeight + verticalPadding, cellChildHeight)) {
48
+ return true;
49
+ }
50
+ }
51
+ return false;
52
+ }
53
+ function showTooltip(event, parentNode, showOverflow, lineClamp = 1, props = {}) {
54
+ const cellChild = event.target;
55
+ if (isExceed(cellChild, lineClamp)) {
56
+ if (showOverflow == "title") {
57
+ cellChild.title = getContent(event);
58
+ } else {
59
+ const trigger = event.target;
60
+ createTablePopper(
61
+ trigger,
62
+ { ...props, content: getContent(event) },
63
+ parentNode
64
+ );
65
+ }
66
+ }
67
+ }
68
+ function createTablePopper(trigger, mergedProps, parentNode) {
69
+ if ((removePopper == null ? void 0 : removePopper.trigger) === trigger) {
70
+ const comp = removePopper.vm.component;
71
+ mergeObject(comp.props, mergedProps);
72
+ return;
73
+ }
74
+ removePopper == null ? void 0 : removePopper();
75
+ const vm = createVNode(Tooltip, {
76
+ virtualTriggering: true,
77
+ virtualRef: trigger,
78
+ appendTo: parentNode,
79
+ placement: "top",
80
+ transition: "none",
81
+ hideAfter: 0,
82
+ ...mergedProps
83
+ });
84
+ const container = document.createElement("div");
85
+ render(vm, container);
86
+ vm.component.exposed.onOpen();
87
+ removePopper = () => {
88
+ render(null, container);
89
+ removePopper = null;
90
+ };
91
+ removePopper.trigger = trigger;
92
+ removePopper.vm = vm;
93
+ }
94
+ export {
95
+ createTablePopper,
96
+ getCell,
97
+ getContent,
98
+ hideTooltip,
99
+ removePopper,
100
+ showTooltip
101
+ };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("vue");
4
4
  require("../../../utils/index.cjs");
5
- const index = require("../../../hooks/inherit/index.cjs");
5
+ const getAttrValue = require("../../../utils/vues/getAttrValue.cjs");
6
6
  const firstUpper = require("@fangzhongya/utils/basic/string/firstUpper");
7
7
  const splitUpper = require("@fangzhongya/utils/basic/string/splitUpper");
8
8
  const isArray = require("@fangzhongya/utils/basic/array/isArray");
@@ -11,7 +11,7 @@ function setMinWidth(obj, props) {
11
11
  if (obj.width) {
12
12
  return;
13
13
  }
14
- const minWidth = index.useAttrValue(obj, "minWidth");
14
+ const minWidth = getAttrValue.getAttrValue(obj, "minWidth");
15
15
  if (minWidth) {
16
16
  if (typeof minWidth == "function") {
17
17
  return minWidth(obj, config);
@@ -21,7 +21,7 @@ function setMinWidth(obj, props) {
21
21
  return minWidth;
22
22
  }
23
23
  } else {
24
- const minWidth2 = index.useAttrValue(config, "minWidth");
24
+ const minWidth2 = getAttrValue.getAttrValue(config, "minWidth");
25
25
  if (minWidth2) {
26
26
  return minWidth2;
27
27
  } else {
@@ -1,6 +1,6 @@
1
1
  import { withModifiers } from "vue";
2
2
  import "../../../utils/index.js";
3
- import { useAttrValue } from "../../../hooks/inherit/index.js";
3
+ import { getAttrValue } from "../../../utils/vues/getAttrValue.js";
4
4
  import { firstUpper } from "@fangzhongya/utils/basic/string/firstUpper";
5
5
  import { splitUpper } from "@fangzhongya/utils/basic/string/splitUpper";
6
6
  import { isArray } from "@fangzhongya/utils/basic/array/isArray";
@@ -9,7 +9,7 @@ function setMinWidth(obj, props) {
9
9
  if (obj.width) {
10
10
  return;
11
11
  }
12
- const minWidth = useAttrValue(obj, "minWidth");
12
+ const minWidth = getAttrValue(obj, "minWidth");
13
13
  if (minWidth) {
14
14
  if (typeof minWidth == "function") {
15
15
  return minWidth(obj, config);
@@ -19,7 +19,7 @@ function setMinWidth(obj, props) {
19
19
  return minWidth;
20
20
  }
21
21
  } else {
22
- const minWidth2 = useAttrValue(config, "minWidth");
22
+ const minWidth2 = getAttrValue(config, "minWidth");
23
23
  if (minWidth2) {
24
24
  return minWidth2;
25
25
  } else {
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("vue");
4
4
  const util = require("../common/util.cjs");
5
- const index$1 = require("../../table-column/index.cjs");
5
+ const index = require("../../table-column/index.cjs");
6
6
  const use = require("../../common/use.cjs");
7
- const index = require("../../../hooks/inherit/index.cjs");
7
+ const getAttrValue = require("../../../utils/vues/getAttrValue.cjs");
8
8
  const compons = require("../../common/compons.cjs");
9
9
  const config = require("../common/config.cjs");
10
10
  const noProps = ["children", "class", "minWidth", "label"];
@@ -12,9 +12,9 @@ function setProps(obj, props) {
12
12
  const table = props.table;
13
13
  const robj = {};
14
14
  const issort = table["sort"];
15
- robj["showOverflowTooltip"] = table["showOverflowTooltip"];
15
+ robj["showOverflowTooltip"] = Boolean(getAttrValue.getAttrValue(obj, "showOverflow")) || getAttrValue.getAttrValue(table, "showOverflowTooltip") || Boolean(getAttrValue.getAttrValue(table, "showOverflow"));
16
16
  robj["header-align"] = table["align"];
17
- robj["align"] = index.useAttrValue(obj, "headerAlign") || table["align"];
17
+ robj["align"] = getAttrValue.getAttrValue(obj, "headerAlign") || table["align"];
18
18
  Object.keys(obj).forEach((key) => {
19
19
  if (!noProps.includes(key)) {
20
20
  if (obj[key] !== "") {
@@ -99,28 +99,32 @@ function setHeader(obj, scope, slots, emit, props, index2) {
99
99
  index2
100
100
  );
101
101
  }
102
- function getDom(obj, emit, propss, slots, index2) {
103
- const props = setProps(obj, propss);
102
+ function getTableColumn(obj, emit, props, slots, index$1, def) {
103
+ if (obj.type == "selection") {
104
+ def = void 0;
105
+ }
104
106
  return vue.h(
105
- index$1.TableColumn,
107
+ index.TableColumn,
106
108
  {
107
- ...props,
109
+ ...setProps(obj, props),
108
110
  className: obj.class,
109
- minWidth: util.setMinWidth(obj, propss)
111
+ minWidth: util.setMinWidth(obj, props)
110
112
  },
111
113
  {
112
- default: (scope) => {
113
- return setSslot(obj, scope, emit, slots, propss, index2);
114
- },
114
+ default: def,
115
115
  header: (scope) => {
116
- return setHeader(obj, scope, slots, emit, propss, index2);
116
+ return setHeader(obj, scope, slots, emit, props, index$1);
117
117
  }
118
118
  }
119
119
  );
120
120
  }
121
+ function getDom(obj, emit, props, slots, index2) {
122
+ return getTableColumn(obj, emit, props, slots, index2, (scope) => {
123
+ return setSslot(obj, scope, emit, slots, props, index2);
124
+ });
125
+ }
121
126
  function columnRender(obj, emit, props, slots, index2) {
122
127
  return getDom(obj, emit, props, slots, index2);
123
128
  }
124
129
  exports.columnRender = columnRender;
125
- exports.setHeader = setHeader;
126
- exports.setProps = setProps;
130
+ exports.getTableColumn = getTableColumn;
@@ -1,6 +1,7 @@
1
1
  import { VNode, RendererNode, RendererElement } from 'vue';
2
- export declare function setProps(obj: ListObj, props: ObjAny): ObjAny;
3
- export declare function setHeader(obj: ListObj, scope: ObjAny, slots: ObjAny, emit: Function, props: ObjAny, index: number): any;
2
+ export declare function getTableColumn(obj: ListObj, emit: Function, props: ObjAny, slots: ObjAny, index: number, def?: Function): VNode<RendererNode, RendererElement, {
3
+ [key: string]: any;
4
+ }>;
4
5
  export declare function columnRender(obj: ListObj, emit: Function, props: ObjAny, slots: ObjAny, index: number): VNode<RendererNode, RendererElement, {
5
6
  [key: string]: any;
6
7
  }>;
@@ -2,7 +2,7 @@ import { h } from "vue";
2
2
  import { setMinWidth } from "../common/util.js";
3
3
  import { TableColumn } from "../../table-column/index.js";
4
4
  import { useSetSlot, useSetCompon, useGetDomValue, useGetDomLabel } from "../../common/use.js";
5
- import { useAttrValue } from "../../../hooks/inherit/index.js";
5
+ import { getAttrValue } from "../../../utils/vues/getAttrValue.js";
6
6
  import { useGetCompons } from "../../common/compons.js";
7
7
  import { provides } from "../common/config.js";
8
8
  const noProps = ["children", "class", "minWidth", "label"];
@@ -10,9 +10,9 @@ function setProps(obj, props) {
10
10
  const table = props.table;
11
11
  const robj = {};
12
12
  const issort = table["sort"];
13
- robj["showOverflowTooltip"] = table["showOverflowTooltip"];
13
+ robj["showOverflowTooltip"] = Boolean(getAttrValue(obj, "showOverflow")) || getAttrValue(table, "showOverflowTooltip") || Boolean(getAttrValue(table, "showOverflow"));
14
14
  robj["header-align"] = table["align"];
15
- robj["align"] = useAttrValue(obj, "headerAlign") || table["align"];
15
+ robj["align"] = getAttrValue(obj, "headerAlign") || table["align"];
16
16
  Object.keys(obj).forEach((key) => {
17
17
  if (!noProps.includes(key)) {
18
18
  if (obj[key] !== "") {
@@ -97,30 +97,34 @@ function setHeader(obj, scope, slots, emit, props, index) {
97
97
  index
98
98
  );
99
99
  }
100
- function getDom(obj, emit, propss, slots, index) {
101
- const props = setProps(obj, propss);
100
+ function getTableColumn(obj, emit, props, slots, index, def) {
101
+ if (obj.type == "selection") {
102
+ def = void 0;
103
+ }
102
104
  return h(
103
105
  TableColumn,
104
106
  {
105
- ...props,
107
+ ...setProps(obj, props),
106
108
  className: obj.class,
107
- minWidth: setMinWidth(obj, propss)
109
+ minWidth: setMinWidth(obj, props)
108
110
  },
109
111
  {
110
- default: (scope) => {
111
- return setSslot(obj, scope, emit, slots, propss, index);
112
- },
112
+ default: def,
113
113
  header: (scope) => {
114
- return setHeader(obj, scope, slots, emit, propss, index);
114
+ return setHeader(obj, scope, slots, emit, props, index);
115
115
  }
116
116
  }
117
117
  );
118
118
  }
119
+ function getDom(obj, emit, props, slots, index) {
120
+ return getTableColumn(obj, emit, props, slots, index, (scope) => {
121
+ return setSslot(obj, scope, emit, slots, props, index);
122
+ });
123
+ }
119
124
  function columnRender(obj, emit, props, slots, index) {
120
125
  return getDom(obj, emit, props, slots, index);
121
126
  }
122
127
  export {
123
128
  columnRender,
124
- setHeader,
125
- setProps
129
+ getTableColumn
126
130
  };
@@ -1,13 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const vue = require("vue");
4
- const util = require("../common/util.cjs");
5
3
  const use = require("../../common/use.cjs");
6
- const index = require("../../table-column/index.cjs");
7
4
  const column = require("./column.cjs");
8
5
  function getLists(arrs, emit, props, slots, listobj) {
9
6
  let arr = [];
10
- arrs == null ? void 0 : arrs.forEach((obj, index$1) => {
7
+ arrs == null ? void 0 : arrs.forEach((obj, index) => {
11
8
  if (listobj) {
12
9
  obj.father = obj.father ?? listobj;
13
10
  }
@@ -25,39 +22,26 @@ function getLists(arrs, emit, props, slots, listobj) {
25
22
  );
26
23
  } else {
27
24
  arr.push(
28
- vue.h(
29
- index.TableColumn,
30
- {
31
- ...column.setProps(obj, props),
32
- className: obj.class,
33
- minWidth: util.setMinWidth(obj, props)
34
- },
35
- {
36
- default: (scope) => {
37
- return getLists(
38
- obj.children,
39
- emit,
40
- props,
41
- slots,
42
- obj
43
- );
44
- },
45
- header: (scope) => {
46
- return column.setHeader(
47
- obj,
48
- scope,
49
- slots,
50
- emit,
51
- props,
52
- index$1
53
- );
54
- }
25
+ column.getTableColumn(
26
+ obj,
27
+ emit,
28
+ props,
29
+ slots,
30
+ index,
31
+ (scope) => {
32
+ return getLists(
33
+ obj.children,
34
+ emit,
35
+ props,
36
+ slots,
37
+ obj
38
+ );
55
39
  }
56
40
  )
57
41
  );
58
42
  }
59
43
  } else {
60
- const dom = column.columnRender(obj, emit, props, slots, index$1);
44
+ const dom = column.columnRender(obj, emit, props, slots, index);
61
45
  if (dom) {
62
46
  arr.push(dom);
63
47
  }
@@ -1,8 +1,5 @@
1
- import { h } from "vue";
2
- import { setMinWidth } from "../common/util.js";
3
1
  import { useHide } from "../../common/use.js";
4
- import { TableColumn } from "../../table-column/index.js";
5
- import { setProps, setHeader, columnRender } from "./column.js";
2
+ import { getTableColumn, columnRender } from "./column.js";
6
3
  function getLists(arrs, emit, props, slots, listobj) {
7
4
  let arr = [];
8
5
  arrs == null ? void 0 : arrs.forEach((obj, index) => {
@@ -23,33 +20,20 @@ function getLists(arrs, emit, props, slots, listobj) {
23
20
  );
24
21
  } else {
25
22
  arr.push(
26
- h(
27
- TableColumn,
28
- {
29
- ...setProps(obj, props),
30
- className: obj.class,
31
- minWidth: setMinWidth(obj, props)
32
- },
33
- {
34
- default: (scope) => {
35
- return getLists(
36
- obj.children,
37
- emit,
38
- props,
39
- slots,
40
- obj
41
- );
42
- },
43
- header: (scope) => {
44
- return setHeader(
45
- obj,
46
- scope,
47
- slots,
48
- emit,
49
- props,
50
- index
51
- );
52
- }
23
+ getTableColumn(
24
+ obj,
25
+ emit,
26
+ props,
27
+ slots,
28
+ index,
29
+ (scope) => {
30
+ return getLists(
31
+ obj.children,
32
+ emit,
33
+ props,
34
+ slots,
35
+ obj
36
+ );
53
37
  }
54
38
  )
55
39
  );
@@ -103,14 +103,15 @@ const dataProps = {
103
103
  */
104
104
  interval: {
105
105
  type: String,
106
- default: "6px"
106
+ default: "8px"
107
107
  },
108
108
  /**
109
109
  * @props { String } intervalHorizon
110
110
  * 查询模式的左右间距
111
111
  */
112
112
  intervalHorizon: {
113
- type: String
113
+ type: String,
114
+ default: "12px"
114
115
  }
115
116
  };
116
117
  const dataEmits = [
@@ -142,6 +142,7 @@ export declare const dataProps: {
142
142
  */
143
143
  intervalHorizon: {
144
144
  type: StringConstructor;
145
+ default: string;
145
146
  };
146
147
  };
147
148
  export type DataProps = ExtractPropTypes<typeof dataProps>;
@@ -101,14 +101,15 @@ const dataProps = {
101
101
  */
102
102
  interval: {
103
103
  type: String,
104
- default: "6px"
104
+ default: "8px"
105
105
  },
106
106
  /**
107
107
  * @props { String } intervalHorizon
108
108
  * 查询模式的左右间距
109
109
  */
110
110
  intervalHorizon: {
111
- type: String
111
+ type: String,
112
+ default: "12px"
112
113
  }
113
114
  };
114
115
  const dataEmits = [
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ ;/* empty css */
4
+ require("./src/index.cjs");
5
+ const withInstall = require("../../utils/vues/withInstall.cjs");
6
+ const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
7
+ const Tablespd = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "Tablespd");
8
+ exports.Tablespd = Tablespd;
9
+ exports.default = Tablespd;