@fangzhongya/fang-ui 0.1.27 → 0.1.28

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 (214) hide show
  1. package/dist/components/array/index.css +4 -0
  2. package/dist/components/array/src/index2.cjs +5 -5
  3. package/dist/components/array/src/index2.js +2 -2
  4. package/dist/components/audios/index.css +4 -0
  5. package/dist/components/box/index.css +4 -0
  6. package/dist/components/box-adjust/index.css +4 -0
  7. package/dist/components/box-local/index.css +4 -0
  8. package/dist/components/box-mask/index.css +4 -0
  9. package/dist/components/box-title/index.css +4 -0
  10. package/dist/components/buttons/index.css +4 -0
  11. package/dist/components/cascaders/index.css +4 -0
  12. package/dist/components/checks/index.css +4 -0
  13. package/dist/components/common/compons/components.cjs +52 -0
  14. package/dist/components/common/compons/components.d.ts +27 -0
  15. package/dist/components/common/compons/components.js +52 -0
  16. package/dist/components/common/compons/index.scss +23 -0
  17. package/dist/components/common/compons/index2.scss +23 -0
  18. package/dist/components/common/use.cjs +29 -3
  19. package/dist/components/common/use.d.ts +2 -2
  20. package/dist/components/common/use.js +29 -3
  21. package/dist/components/dates/index.css +4 -0
  22. package/dist/components/dates-divide/index.css +4 -0
  23. package/dist/components/dates-picker/index.css +4 -0
  24. package/dist/components/dates2/index.css +4 -0
  25. package/dist/components/dialogs/index.css +4 -0
  26. package/dist/components/edit/index.css +4 -0
  27. package/dist/components/edit-float/index.css +4 -0
  28. package/dist/components/forms/common/config.cjs +11 -1
  29. package/dist/components/forms/common/config.d.ts +1 -0
  30. package/dist/components/forms/common/config.js +11 -1
  31. package/dist/components/forms/index.css +10 -6
  32. package/dist/components/forms/index.scss +2 -1
  33. package/dist/components/forms/src/data.cjs +7 -0
  34. package/dist/components/forms/src/data.d.ts +7 -0
  35. package/dist/components/forms/src/data.js +7 -0
  36. package/dist/components/forms/src/setup.cjs +3 -12
  37. package/dist/components/forms/src/setup.d.ts +1 -1
  38. package/dist/components/forms/src/setup.js +4 -13
  39. package/dist/components/forms/style/index2.scss +3 -1
  40. package/dist/components/forms-div/index.css +4 -0
  41. package/dist/components/forms-div/src/index2.cjs +4 -4
  42. package/dist/components/forms-div/src/index2.js +2 -2
  43. package/dist/components/forms-item/index.css +4 -0
  44. package/dist/components/forms-item/src/indexts.d.ts +1 -1
  45. package/dist/components/forms-item/src/label.cjs +15 -28
  46. package/dist/components/forms-item/src/label.js +16 -29
  47. package/dist/components/full-screen/index.css +4 -0
  48. package/dist/components/history/index.css +4 -0
  49. package/dist/components/icon/index.css +4 -0
  50. package/dist/components/icon-picker/index.css +4 -0
  51. package/dist/components/iframe/index.css +4 -0
  52. package/dist/components/images/index.css +4 -0
  53. package/dist/components/index.cjs +2 -0
  54. package/dist/components/index.d.ts +1 -0
  55. package/dist/components/index.js +2 -0
  56. package/dist/components/index.scss +2 -1
  57. package/dist/components/index2.scss +2 -1
  58. package/dist/components/input-array/index.css +4 -0
  59. package/dist/components/input-history/index.css +4 -0
  60. package/dist/components/input-num/index.css +4 -0
  61. package/dist/components/input-select/index.css +4 -0
  62. package/dist/components/inputs/index.css +4 -0
  63. package/dist/components/{global-config → keep-com}/index.css +4 -0
  64. package/dist/components/labels/index.css +4 -0
  65. package/dist/components/list/index.css +4 -0
  66. package/dist/components/list/src/data.cjs +6 -0
  67. package/dist/components/list/src/data.d.ts +6 -0
  68. package/dist/components/list/src/data.js +6 -0
  69. package/dist/components/list/src/index2.cjs +6 -6
  70. package/dist/components/list/src/index2.js +2 -2
  71. package/dist/components/lists/index.css +4 -0
  72. package/dist/components/listsp/index.css +4 -0
  73. package/dist/components/listspd/index.css +4 -0
  74. package/dist/components/menus/index.css +4 -0
  75. package/dist/components/no-data/index.css +4 -0
  76. package/dist/components/page/index.css +10 -6
  77. package/dist/components/paging/index.css +4 -0
  78. package/dist/components/popup/index.css +4 -0
  79. package/dist/components/retract/index.css +4 -0
  80. package/dist/components/right-key/index.css +4 -0
  81. package/dist/components/scss/common.scss +4 -0
  82. package/dist/components/seamless-scroll/index.css +4 -0
  83. package/dist/components/select-scroll/index.css +4 -0
  84. package/dist/components/selector/index.css +4 -0
  85. package/dist/components/selects/index.css +4 -0
  86. package/dist/components/sliders/index.css +4 -0
  87. package/dist/components/switchs/index.css +4 -0
  88. package/dist/components/tables/common/config.cjs +1 -1
  89. package/dist/components/tables/common/config.js +1 -1
  90. package/dist/components/tables/common/pagin.cjs +74 -32
  91. package/dist/components/tables/common/pagin.d.ts +8 -1
  92. package/dist/components/tables/common/pagin.js +74 -32
  93. package/dist/components/tables/index.css +4 -0
  94. package/dist/components/tables/src/column.cjs +22 -20
  95. package/dist/components/tables/src/column.d.ts +3 -0
  96. package/dist/components/tables/src/column.js +14 -12
  97. package/dist/components/tables/src/data.cjs +15 -0
  98. package/dist/components/tables/src/data.d.ts +13 -0
  99. package/dist/components/tables/src/data.js +15 -0
  100. package/dist/components/tables/src/index2.cjs +17 -9
  101. package/dist/components/tables/src/index2.js +11 -3
  102. package/dist/components/tablesp/index.css +4 -0
  103. package/dist/components/tablespd/index.css +4 -0
  104. package/dist/components/tabless/index.css +4 -0
  105. package/dist/components/tablesv/index.css +4 -0
  106. package/dist/components/tablesv/src/column.cjs +116 -112
  107. package/dist/components/tablesv/src/column.d.ts +3 -1
  108. package/dist/components/tablesv/src/column.js +110 -106
  109. package/dist/components/tablesv/src/data.cjs +44 -0
  110. package/dist/components/tablesv/src/data.d.ts +43 -1
  111. package/dist/components/tablesv/src/data.js +44 -0
  112. package/dist/components/tablesv/src/index2.cjs +37 -14
  113. package/dist/components/tablesv/src/index2.js +36 -13
  114. package/dist/components/tablesv/style/index2.scss +3 -1
  115. package/dist/components/tablesvp/index.css +10 -0
  116. package/dist/components/tablesvp/index.scss +8 -0
  117. package/dist/components/tablesvp/src/index2.cjs +15 -5
  118. package/dist/components/tablesvp/src/index2.js +15 -5
  119. package/dist/components/tablesvpd/index.cjs +9 -0
  120. package/dist/components/tablesvpd/index.css +157 -0
  121. package/dist/components/tablesvpd/index.d.ts +4 -0
  122. package/dist/components/tablesvpd/index.js +9 -0
  123. package/dist/components/tablesvpd/index.scss +41 -0
  124. package/dist/components/tablesvpd/src/data.cjs +13 -0
  125. package/dist/components/tablesvpd/src/data.d.ts +18 -0
  126. package/dist/components/tablesvpd/src/data.js +13 -0
  127. package/dist/components/tablesvpd/src/index.cjs +4 -0
  128. package/dist/components/tablesvpd/src/index.js +4 -0
  129. package/dist/components/tablesvpd/src/index2.cjs +107 -0
  130. package/dist/components/tablesvpd/src/index2.js +107 -0
  131. package/dist/components/tablesvpd/style/index2.scss +4 -0
  132. package/dist/components/uploads/index.css +4 -0
  133. package/dist/components/videos/index.css +4 -0
  134. package/dist/components/window/index.css +4 -0
  135. package/dist/css/array.css +4 -0
  136. package/dist/css/audios.css +4 -0
  137. package/dist/css/box-adjust.css +4 -0
  138. package/dist/css/box-local.css +4 -0
  139. package/dist/css/box-mask.css +4 -0
  140. package/dist/css/box-title.css +4 -0
  141. package/dist/css/box.css +4 -0
  142. package/dist/css/buttons.css +4 -0
  143. package/dist/css/cascaders.css +4 -0
  144. package/dist/css/checks.css +4 -0
  145. package/dist/css/dates-divide.css +4 -0
  146. package/dist/css/dates-picker.css +4 -0
  147. package/dist/css/dates.css +4 -0
  148. package/dist/css/dates2.css +4 -0
  149. package/dist/css/dialogs.css +4 -0
  150. package/dist/css/edit-float.css +4 -0
  151. package/dist/css/edit.css +4 -0
  152. package/dist/css/forms-div.css +4 -0
  153. package/dist/css/forms-item.css +4 -0
  154. package/dist/css/forms.css +10 -6
  155. package/dist/css/full-screen.css +4 -0
  156. package/dist/css/history.css +4 -0
  157. package/dist/css/icon-picker.css +4 -0
  158. package/dist/css/icon.css +4 -0
  159. package/dist/css/iframe.css +4 -0
  160. package/dist/css/images.css +4 -0
  161. package/dist/css/index.css +44 -6
  162. package/dist/css/input-array.css +4 -0
  163. package/dist/css/input-history.css +4 -0
  164. package/dist/css/input-num.css +4 -0
  165. package/dist/css/input-select.css +4 -0
  166. package/dist/css/inputs.css +4 -0
  167. package/dist/css/{global-config.css → keep-com.css} +4 -0
  168. package/dist/css/labels.css +4 -0
  169. package/dist/css/list.css +4 -0
  170. package/dist/css/lists.css +4 -0
  171. package/dist/css/listsp.css +4 -0
  172. package/dist/css/listspd.css +4 -0
  173. package/dist/css/menus.css +4 -0
  174. package/dist/css/no-data.css +4 -0
  175. package/dist/css/page.css +10 -6
  176. package/dist/css/paging.css +4 -0
  177. package/dist/css/popup.css +4 -0
  178. package/dist/css/retract.css +4 -0
  179. package/dist/css/right-key.css +4 -0
  180. package/dist/css/seamless-scroll.css +4 -0
  181. package/dist/css/select-scroll.css +4 -0
  182. package/dist/css/selector.css +4 -0
  183. package/dist/css/selects.css +4 -0
  184. package/dist/css/sliders.css +4 -0
  185. package/dist/css/switchs.css +4 -0
  186. package/dist/css/tables.css +4 -0
  187. package/dist/css/tablesp.css +4 -0
  188. package/dist/css/tablespd.css +4 -0
  189. package/dist/css/tabless.css +4 -0
  190. package/dist/css/tablesv.css +4 -0
  191. package/dist/css/tablesvp.css +10 -0
  192. package/dist/css/tablesvpd.css +157 -0
  193. package/dist/css/uploads.css +4 -0
  194. package/dist/css/videos.css +4 -0
  195. package/dist/css/window.css +4 -0
  196. package/dist/expand/{chunk-MC76Q3TQ.cjs → chunk-3HP2ZDNG.cjs} +3 -1
  197. package/dist/expand/{chunk-CV4O5V2F.js → chunk-7C25SBCF.js} +3 -1
  198. package/dist/expand/components.cjs +5 -5
  199. package/dist/expand/components.js +1 -1
  200. package/dist/expand/config.cjs +2 -2
  201. package/dist/expand/config.js +1 -1
  202. package/dist/hooks/compons/index.cjs +44 -0
  203. package/dist/hooks/compons/index.d.ts +7 -0
  204. package/dist/hooks/compons/index.js +44 -0
  205. package/dist/icons/index.json +1 -1
  206. package/dist/index.cjs +24 -22
  207. package/dist/index.css +44 -6
  208. package/dist/index.js +2 -0
  209. package/package.json +12 -12
  210. package/dist/components/common/compons.cjs +0 -76
  211. package/dist/components/common/compons.d.ts +0 -9
  212. package/dist/components/common/compons.js +0 -76
  213. package/dist/components/common/compons.scss +0 -26
  214. package/dist/components/common/compons2.scss +0 -26
@@ -1,7 +1,7 @@
1
1
  import { ExtractPropTypes, Component } from 'vue';
2
2
  export type DefaultSort = {
3
3
  prop: string;
4
- order: 'ascending' | 'descending';
4
+ order: string;
5
5
  };
6
6
  /**
7
7
  * @title FTable 表格
@@ -21,10 +21,27 @@ export declare const dataProps: {
21
21
  type: () => DefaultSort;
22
22
  default(): {};
23
23
  };
24
+ /**
25
+ * @props { String, Number } height='auto' 高度
26
+ */
24
27
  height: {
25
28
  type: (StringConstructor | NumberConstructor)[];
26
29
  default(): string;
27
30
  };
31
+ /**
32
+ * @props { String, Number } maxHeight
33
+ * 最大高度 设置了最大高度 height 值将无效化
34
+ */
35
+ maxHeight: {
36
+ type: StringConstructor;
37
+ };
38
+ /**
39
+ * @props { String, Number } minHeight
40
+ * 最小高度
41
+ */
42
+ minHeight: {
43
+ type: StringConstructor;
44
+ };
28
45
  /**
29
46
  * 加载中
30
47
  */
@@ -89,6 +106,9 @@ export declare const dataProps: {
89
106
  };
90
107
  default(): never[];
91
108
  };
109
+ rowKey: {
110
+ type: StringConstructor;
111
+ };
92
112
  /**
93
113
  * 行高度
94
114
  */
@@ -106,6 +126,12 @@ export declare const dataProps: {
106
126
  type: ObjectConstructor;
107
127
  default(): {};
108
128
  };
129
+ /**
130
+ * @props { Boolean } isCompons 是否使用默认的配置
131
+ */
132
+ isCompons: {
133
+ type: BooleanConstructor;
134
+ };
109
135
  /**
110
136
  * @props { Object } compons 外部组件集合
111
137
  */
@@ -115,6 +141,22 @@ export declare const dataProps: {
115
141
  };
116
142
  default(): {};
117
143
  };
144
+ /**
145
+ * @props { String } interval='6px'
146
+ * 查询模式的上下间距
147
+ */
148
+ interval: {
149
+ type: StringConstructor;
150
+ default: string;
151
+ };
152
+ /**
153
+ * @props { String } intervalHorizon
154
+ * 查询模式的左右间距
155
+ */
156
+ intervalHorizon: {
157
+ type: StringConstructor;
158
+ default: string;
159
+ };
118
160
  };
119
161
  export type DataProps = ExtractPropTypes<typeof dataProps>;
120
162
  /**
@@ -9,12 +9,29 @@ const dataProps = {
9
9
  return {};
10
10
  }
11
11
  },
12
+ /**
13
+ * @props { String, Number } height='auto' 高度
14
+ */
12
15
  height: {
13
16
  type: [String, Number],
14
17
  default() {
15
18
  return "auto";
16
19
  }
17
20
  },
21
+ /**
22
+ * @props { String, Number } maxHeight
23
+ * 最大高度 设置了最大高度 height 值将无效化
24
+ */
25
+ maxHeight: {
26
+ type: String
27
+ },
28
+ /**
29
+ * @props { String, Number } minHeight
30
+ * 最小高度
31
+ */
32
+ minHeight: {
33
+ type: String
34
+ },
18
35
  /**
19
36
  * 加载中
20
37
  */
@@ -54,6 +71,9 @@ const dataProps = {
54
71
  return [];
55
72
  }
56
73
  },
74
+ rowKey: {
75
+ type: String
76
+ },
57
77
  /**
58
78
  * 行高度
59
79
  */
@@ -75,6 +95,12 @@ const dataProps = {
75
95
  return {};
76
96
  }
77
97
  },
98
+ /**
99
+ * @props { Boolean } isCompons 是否使用默认的配置
100
+ */
101
+ isCompons: {
102
+ type: Boolean
103
+ },
78
104
  /**
79
105
  * @props { Object } compons 外部组件集合
80
106
  */
@@ -83,6 +109,22 @@ const dataProps = {
83
109
  default() {
84
110
  return {};
85
111
  }
112
+ },
113
+ /**
114
+ * @props { String } interval='6px'
115
+ * 查询模式的上下间距
116
+ */
117
+ interval: {
118
+ type: String,
119
+ default: "8px"
120
+ },
121
+ /**
122
+ * @props { String } intervalHorizon
123
+ * 查询模式的左右间距
124
+ */
125
+ intervalHorizon: {
126
+ type: String,
127
+ default: "12px"
86
128
  }
87
129
  };
88
130
  const dataEmits = [
@@ -91,6 +133,8 @@ const dataEmits = [
91
133
  "scope-click",
92
134
  "selection-list",
93
135
  "list-events",
136
+ "row-click",
137
+ "cell-click",
94
138
  "selection-change"
95
139
  ];
96
140
  const dataExpose = {};
@@ -2,16 +2,18 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const table = require("vxe-table/es/table");
5
+ require("../../loading/index.cjs");
5
6
  const data = require("./data.cjs");
6
7
  const config = require("../../tables/common/config.cjs");
7
8
  require("./columns.cjs");
8
- const index$3 = require("../../no-data/index.cjs");
9
+ const index$4 = require("../../no-data/index.cjs");
9
10
  const use = require("../../common/use.cjs");
10
11
  const index$1 = require("../../../hooks/inherit/index.cjs");
11
12
  const index = require("../../../hooks/cssname/index.cjs");
12
- const compons = require("../../common/compons.cjs");
13
+ const index$3 = require("../../../hooks/compons/index.cjs");
13
14
  const index$2 = require("../../../hooks/props-default/index.cjs");
14
15
  const columns_vue_vue_type_script_lang = require("./columns2.cjs");
16
+ const index$5 = require("element-plus/es/components/loading/index");
15
17
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
18
  __name: "index",
17
19
  props: index$2.getProps(data.dataProps),
@@ -23,9 +25,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
23
25
  const prs = __props;
24
26
  const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
25
27
  index$2.viewProps(props, data.name);
26
- compons.useCompons(config.provides.compons, props.compons);
28
+ index$3.useCompons(config.provides.compons, props);
27
29
  const tableRef = vue.ref();
28
30
  const emit = __emit;
31
+ console.log("props.maxHeight", props.maxHeight);
29
32
  const rowObj = vue.ref();
30
33
  const isfocus = vue.ref(false);
31
34
  function onClick() {
@@ -80,7 +83,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
80
83
  nocustomize: attrs.assem.__B("nocustomize"),
81
84
  row: {
82
85
  isCurrent: setHover(),
83
- isHover: setHover()
86
+ isHover: setHover(),
87
+ keyField: props.rowKey
84
88
  },
85
89
  column: {
86
90
  minWidth: attrs.assem.minWidth,
@@ -95,10 +99,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
95
99
  },
96
100
  seq: {},
97
101
  checkbox: {
98
- trigger: attrs.assem.noRowSelect ? "cell" : "row"
102
+ trigger: attrs.assem.isRowSelect ? "row" : "cell"
99
103
  },
100
104
  radio: {
101
- trigger: attrs.assem.noRowSelect ? "cell" : "row"
105
+ trigger: attrs.assem.isRowSelect ? "row" : "cell"
102
106
  }
103
107
  });
104
108
  const rowStyle = vue.computed(() => {
@@ -166,9 +170,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
166
170
  }
167
171
  function onCellClick(scope) {
168
172
  rowObj.value = scope.row;
173
+ emit("cell-click", scope.row, scope.row, scope);
169
174
  }
170
175
  function toggleRowSelection(row) {
171
- tableRef.value.toggleRowSelection(row);
172
176
  }
173
177
  function clearSelection() {
174
178
  tableRef.value.clearCheckboxRow();
@@ -176,6 +180,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
176
180
  function clearRadioRow() {
177
181
  tableRef.value.clearRadioRow();
178
182
  }
183
+ function getSelections() {
184
+ }
185
+ function clearSort() {
186
+ tableRef.value.clearSort();
187
+ }
188
+ function setCurrentRow(row) {
189
+ tableRef.value.setRadioRow(row);
190
+ }
191
+ function clearCurrentRow() {
192
+ tableRef.value.clearRadioRow();
193
+ tableRef.value.clearCurrentRow();
194
+ }
179
195
  vue.onMounted(() => {
180
196
  if (window) {
181
197
  window.addEventListener("click", () => {
@@ -186,19 +202,24 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
186
202
  __expose({
187
203
  ...data.dataExpose,
188
204
  clearSelection,
189
- clearRadioRow
205
+ clearRadioRow,
206
+ clearSort,
207
+ setCurrentRow,
208
+ clearCurrentRow,
209
+ getSelections,
210
+ toggleRowSelection
190
211
  });
191
212
  return (_ctx, _cache) => {
192
213
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
193
214
  class: vue.unref(cs).z()
194
215
  }, vue.unref(attrs).root), [
195
- vue.createVNode(vue.unref(table.VxeTable), vue.mergeProps(vue.unref(attrs).assem, {
216
+ vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(table.VxeTable), vue.mergeProps(vue.unref(attrs).assem, {
217
+ size: size.value,
196
218
  ref_key: "tableRef",
197
219
  ref: tableRef,
198
- height: vue.unref(props).height == "auto" ? "" : vue.unref(props).height,
199
220
  class: [vue.unref(cs).z("table"), vue.unref(cs).is("absolute", vue.unref(props).adaptive)],
200
- size: size.value,
201
- loading: vue.unref(props).loading,
221
+ height: vue.unref(props).maxHeight ? void 0 : vue.unref(props).height,
222
+ "max-height": vue.unref(props).maxHeight,
202
223
  "column-config": config$1.value.column,
203
224
  "row-style": rowStyle.value,
204
225
  "row-config": config$1.value.row,
@@ -215,7 +236,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
215
236
  }), {
216
237
  empty: vue.withCtx(() => [
217
238
  vue.renderSlot(_ctx.$slots, "no-data", {}, () => [
218
- vue.createVNode(vue.unref(index$3.NoData))
239
+ vue.createVNode(vue.unref(index$4.NoData))
219
240
  ])
220
241
  ]),
221
242
  default: vue.withCtx(() => [
@@ -241,7 +262,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
241
262
  ]), 1032, ["table", "vxeconfig", "value", "list", "options"])
242
263
  ]),
243
264
  _: 3
244
- }, 16, ["height", "class", "size", "loading", "column-config", "row-style", "row-config", "seq-config", "sort-config", "checkbox-config", "radio-config", "data"])
265
+ }, 16, ["size", "class", "height", "max-height", "column-config", "row-style", "row-config", "seq-config", "sort-config", "checkbox-config", "radio-config", "data"])), [
266
+ [vue.unref(index$5.vLoading), vue.unref(props).loading]
267
+ ])
245
268
  ], 16);
246
269
  };
247
270
  }
@@ -1,5 +1,6 @@
1
- import { defineComponent, useSlots, useAttrs, ref, computed, watch, onMounted, createElementBlock, openBlock, mergeProps, unref, createVNode, withModifiers, withCtx, createSlots, renderList, renderSlot, normalizeProps, guardReactiveProps } from "vue";
1
+ import { defineComponent, useSlots, useAttrs, ref, computed, watch, onMounted, createElementBlock, openBlock, mergeProps, unref, withDirectives, createBlock, withModifiers, withCtx, createVNode, createSlots, renderList, renderSlot, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { VxeTable } from "vxe-table/es/table";
3
+ import "../../loading/index.js";
3
4
  import { name, dataProps, dataExpose, dataEmits } from "./data.js";
4
5
  import { provides } from "../../tables/common/config.js";
5
6
  import "./columns.js";
@@ -7,9 +8,10 @@ import { NoData } from "../../no-data/index.js";
7
8
  import { useObjComponSelected } from "../../common/use.js";
8
9
  import { useInherit } from "../../../hooks/inherit/index.js";
9
10
  import { useCssName } from "../../../hooks/cssname/index.js";
10
- import { useCompons } from "../../common/compons.js";
11
+ import { useCompons } from "../../../hooks/compons/index.js";
11
12
  import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
12
13
  import _sfc_main$1 from "./columns2.js";
14
+ import { vLoading } from "element-plus/es/components/loading/index";
13
15
  const _sfc_main = /* @__PURE__ */ defineComponent({
14
16
  __name: "index",
15
17
  props: getProps(dataProps),
@@ -21,9 +23,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
23
  const prs = __props;
22
24
  const props = usePropsDefault(name, prs, dataProps);
23
25
  viewProps(props, name);
24
- useCompons(provides.compons, props.compons);
26
+ useCompons(provides.compons, props);
25
27
  const tableRef = ref();
26
28
  const emit = __emit;
29
+ console.log("props.maxHeight", props.maxHeight);
27
30
  const rowObj = ref();
28
31
  const isfocus = ref(false);
29
32
  function onClick() {
@@ -78,7 +81,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
78
81
  nocustomize: attrs.assem.__B("nocustomize"),
79
82
  row: {
80
83
  isCurrent: setHover(),
81
- isHover: setHover()
84
+ isHover: setHover(),
85
+ keyField: props.rowKey
82
86
  },
83
87
  column: {
84
88
  minWidth: attrs.assem.minWidth,
@@ -93,10 +97,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93
97
  },
94
98
  seq: {},
95
99
  checkbox: {
96
- trigger: attrs.assem.noRowSelect ? "cell" : "row"
100
+ trigger: attrs.assem.isRowSelect ? "row" : "cell"
97
101
  },
98
102
  radio: {
99
- trigger: attrs.assem.noRowSelect ? "cell" : "row"
103
+ trigger: attrs.assem.isRowSelect ? "row" : "cell"
100
104
  }
101
105
  });
102
106
  const rowStyle = computed(() => {
@@ -164,9 +168,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
164
168
  }
165
169
  function onCellClick(scope) {
166
170
  rowObj.value = scope.row;
171
+ emit("cell-click", scope.row, scope.row, scope);
167
172
  }
168
173
  function toggleRowSelection(row) {
169
- tableRef.value.toggleRowSelection(row);
170
174
  }
171
175
  function clearSelection() {
172
176
  tableRef.value.clearCheckboxRow();
@@ -174,6 +178,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
174
178
  function clearRadioRow() {
175
179
  tableRef.value.clearRadioRow();
176
180
  }
181
+ function getSelections() {
182
+ }
183
+ function clearSort() {
184
+ tableRef.value.clearSort();
185
+ }
186
+ function setCurrentRow(row) {
187
+ tableRef.value.setRadioRow(row);
188
+ }
189
+ function clearCurrentRow() {
190
+ tableRef.value.clearRadioRow();
191
+ tableRef.value.clearCurrentRow();
192
+ }
177
193
  onMounted(() => {
178
194
  if (window) {
179
195
  window.addEventListener("click", () => {
@@ -184,19 +200,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
184
200
  __expose({
185
201
  ...dataExpose,
186
202
  clearSelection,
187
- clearRadioRow
203
+ clearRadioRow,
204
+ clearSort,
205
+ setCurrentRow,
206
+ clearCurrentRow,
207
+ getSelections,
208
+ toggleRowSelection
188
209
  });
189
210
  return (_ctx, _cache) => {
190
211
  return openBlock(), createElementBlock("div", mergeProps({
191
212
  class: unref(cs).z()
192
213
  }, unref(attrs).root), [
193
- createVNode(unref(VxeTable), mergeProps(unref(attrs).assem, {
214
+ withDirectives((openBlock(), createBlock(unref(VxeTable), mergeProps(unref(attrs).assem, {
215
+ size: size.value,
194
216
  ref_key: "tableRef",
195
217
  ref: tableRef,
196
- height: unref(props).height == "auto" ? "" : unref(props).height,
197
218
  class: [unref(cs).z("table"), unref(cs).is("absolute", unref(props).adaptive)],
198
- size: size.value,
199
- loading: unref(props).loading,
219
+ height: unref(props).maxHeight ? void 0 : unref(props).height,
220
+ "max-height": unref(props).maxHeight,
200
221
  "column-config": config.value.column,
201
222
  "row-style": rowStyle.value,
202
223
  "row-config": config.value.row,
@@ -239,7 +260,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
239
260
  ]), 1032, ["table", "vxeconfig", "value", "list", "options"])
240
261
  ]),
241
262
  _: 3
242
- }, 16, ["height", "class", "size", "loading", "column-config", "row-style", "row-config", "seq-config", "sort-config", "checkbox-config", "radio-config", "data"])
263
+ }, 16, ["size", "class", "height", "max-height", "column-config", "row-style", "row-config", "seq-config", "sort-config", "checkbox-config", "radio-config", "data"])), [
264
+ [unref(vLoading), unref(props).loading]
265
+ ])
243
266
  ], 16);
244
267
  };
245
268
  }
@@ -1,5 +1,7 @@
1
- @use 'vxe-table/styles/index.scss' as *;
1
+ @use 'vxe-table/es/style.css' as *;
2
2
  @use '../../tooltip/style/index2.scss' as *;
3
3
  @use '../../radio/style/index2.scss' as *;
4
4
  @use '../../checkbox/style/index2.scss' as *;
5
+ @use '../../loading/style/index2.scss' as *;
6
+ @use '../../button/style/index2.scss' as *;
5
7
  @use '../index.scss' as *;
@@ -17,6 +17,10 @@
17
17
  padding: 20px 20px;
18
18
  }
19
19
 
20
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
20
24
  .tablesv {
21
25
  width: 100%;
22
26
  min-height: 100px;
@@ -139,6 +143,12 @@
139
143
  .tablesvp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
140
144
  display: none;
141
145
  }
146
+ .tablesvp-main.is-scroll .v-scroll-add {
147
+ text-align: center;
148
+ padding: 10px;
149
+ color: #999;
150
+ background-color: #eee;
151
+ }
142
152
  .tablesvp-paginat {
143
153
  overflow: hidden;
144
154
  }
@@ -23,6 +23,14 @@ $tablesvp: 'tablesvp';
23
23
  }
24
24
  }
25
25
  }
26
+ &.#{is('scroll')} {
27
+ .v-scroll-add {
28
+ text-align: center;
29
+ padding: 10px;
30
+ color: #999;
31
+ background-color: #eee;
32
+ }
33
+ }
26
34
  }
27
35
  &-paginat {
28
36
  overflow: hidden;
@@ -2,7 +2,8 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const index$3 = require("../../tablesv/index.cjs");
5
- const index$4 = require("../../paging/index.cjs");
5
+ const index$5 = require("../../paging/index.cjs");
6
+ const index$4 = require("../../../directives/scroll/index.cjs");
6
7
  const data = require("./data.cjs");
7
8
  const pagin = require("../../tables/common/pagin.cjs");
8
9
  const index$1 = require("../../../hooks/cssname/index.cjs");
@@ -34,11 +35,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
34
35
  onSortChange,
35
36
  onListEvents,
36
37
  onChange,
38
+ onCellClick,
37
39
  pagconfig,
38
40
  formEvent,
39
41
  onSizeChange,
40
42
  onCurrentChange,
41
43
  paginat,
44
+ scroll,
42
45
  data: data$1
43
46
  } = pagin.useInit(props, emit, refTable, getLocale);
44
47
  __expose({
@@ -53,11 +56,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
53
56
  class: vue.normalizeClass(vue.unref(cs).z()),
54
57
  style: vue.normalizeStyle(vue.unref(cs).vdo({ height: vue.unref(height) }))
55
58
  }, [
56
- vue.createVNode(vue.unref(index$3.Tablesv), vue.mergeProps(vue.unref(tableConfig).config, vue.toHandlers(vue.unref(formEvent)), {
59
+ vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$3.Tablesv), vue.mergeProps(vue.unref(tableConfig).config, vue.toHandlers(vue.unref(formEvent)), {
57
60
  height: vue.unref(height) == "auto" ? "auto" : "100%",
58
61
  ref_key: "refTable",
59
62
  ref: refTable,
60
- class: [vue.unref(cs).z("main")],
63
+ class: [
64
+ vue.unref(cs).z("main"),
65
+ vue.unref(cs).is("scroll", vue.unref(paginat).is && vue.unref(paginat).scroll)
66
+ ],
67
+ "scroll-selector": ".vxe-table--render-wrapper .vxe-table--body-wrapper",
61
68
  size: (_a = vue.unref(tableConfig).config) == null ? void 0 : _a.size,
62
69
  value: vue.unref(data$1).list,
63
70
  list: vue.unref(tableList),
@@ -66,6 +73,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
66
73
  options: vue.unref(props).options,
67
74
  compons: vue.unref(props).compons,
68
75
  onSortChange: vue.unref(onSortChange),
76
+ onCellClick: vue.unref(onCellClick),
69
77
  onRadioChange: vue.unref(onRadioChange),
70
78
  onSelectionChange: vue.unref(onChange),
71
79
  onListEvents: vue.unref(onListEvents)
@@ -78,8 +86,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
78
86
  ])
79
87
  };
80
88
  })
81
- ]), 1040, ["height", "class", "size", "value", "list", "paginat", "loading", "options", "compons", "onSortChange", "onRadioChange", "onSelectionChange", "onListEvents"]),
82
- ((_c = vue.unref(tableConfig).paginat) == null ? void 0 : _c.is) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.Paging), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
89
+ ]), 1040, ["height", "class", "size", "value", "list", "paginat", "loading", "options", "compons", "onSortChange", "onCellClick", "onRadioChange", "onSelectionChange", "onListEvents"])), [
90
+ [vue.unref(index$4.default), vue.unref(scroll)]
91
+ ]),
92
+ ((_c = vue.unref(paginat)) == null ? void 0 : _c.is) && !vue.unref(paginat).scroll ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.Paging), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
83
93
  class: vue.unref(cs).z("paginat"),
84
94
  paginat: vue.unref(paginat),
85
95
  total: vue.unref(data$1).total,
@@ -1,6 +1,7 @@
1
- import { defineComponent, useSlots, ref, createElementBlock, openBlock, normalizeStyle, unref, normalizeClass, createVNode, createBlock, createCommentVNode, mergeProps, toHandlers, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
1
+ import { defineComponent, useSlots, ref, createElementBlock, openBlock, normalizeStyle, unref, normalizeClass, withDirectives, createBlock, createCommentVNode, mergeProps, toHandlers, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { Tablesv } from "../../tablesv/index.js";
3
3
  import { Paging } from "../../paging/index.js";
4
+ import vScroll from "../../../directives/scroll/index.js";
4
5
  import { name } from "./data.js";
5
6
  import { dataProps, useInit, dataEmit } from "../../tables/common/pagin.js";
6
7
  import { useCssName } from "../../../hooks/cssname/index.js";
@@ -32,11 +33,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
33
  onSortChange,
33
34
  onListEvents,
34
35
  onChange,
36
+ onCellClick,
35
37
  pagconfig,
36
38
  formEvent,
37
39
  onSizeChange,
38
40
  onCurrentChange,
39
41
  paginat,
42
+ scroll,
40
43
  data
41
44
  } = useInit(props, emit, refTable, getLocale);
42
45
  __expose({
@@ -51,11 +54,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
54
  class: normalizeClass(unref(cs).z()),
52
55
  style: normalizeStyle(unref(cs).vdo({ height: unref(height) }))
53
56
  }, [
54
- createVNode(unref(Tablesv), mergeProps(unref(tableConfig).config, toHandlers(unref(formEvent)), {
57
+ withDirectives((openBlock(), createBlock(unref(Tablesv), mergeProps(unref(tableConfig).config, toHandlers(unref(formEvent)), {
55
58
  height: unref(height) == "auto" ? "auto" : "100%",
56
59
  ref_key: "refTable",
57
60
  ref: refTable,
58
- class: [unref(cs).z("main")],
61
+ class: [
62
+ unref(cs).z("main"),
63
+ unref(cs).is("scroll", unref(paginat).is && unref(paginat).scroll)
64
+ ],
65
+ "scroll-selector": ".vxe-table--render-wrapper .vxe-table--body-wrapper",
59
66
  size: (_a = unref(tableConfig).config) == null ? void 0 : _a.size,
60
67
  value: unref(data).list,
61
68
  list: unref(tableList),
@@ -64,6 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
71
  options: unref(props).options,
65
72
  compons: unref(props).compons,
66
73
  onSortChange: unref(onSortChange),
74
+ onCellClick: unref(onCellClick),
67
75
  onRadioChange: unref(onRadioChange),
68
76
  onSelectionChange: unref(onChange),
69
77
  onListEvents: unref(onListEvents)
@@ -76,8 +84,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76
84
  ])
77
85
  };
78
86
  })
79
- ]), 1040, ["height", "class", "size", "value", "list", "paginat", "loading", "options", "compons", "onSortChange", "onRadioChange", "onSelectionChange", "onListEvents"]),
80
- ((_c = unref(tableConfig).paginat) == null ? void 0 : _c.is) ? (openBlock(), createBlock(unref(Paging), mergeProps({ key: 0 }, unref(pagconfig), {
87
+ ]), 1040, ["height", "class", "size", "value", "list", "paginat", "loading", "options", "compons", "onSortChange", "onCellClick", "onRadioChange", "onSelectionChange", "onListEvents"])), [
88
+ [unref(vScroll), unref(scroll)]
89
+ ]),
90
+ ((_c = unref(paginat)) == null ? void 0 : _c.is) && !unref(paginat).scroll ? (openBlock(), createBlock(unref(Paging), mergeProps({ key: 0 }, unref(pagconfig), {
81
91
  class: unref(cs).z("paginat"),
82
92
  paginat: unref(paginat),
83
93
  total: unref(data).total,
@@ -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 Tablesvpd = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "Tablesvpd");
8
+ exports.Tablesvpd = Tablesvpd;
9
+ exports.default = Tablesvpd;