tabula-vue 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/es/component.mjs +2 -0
  2. package/es/components/dialog/index.d.ts +30 -30
  3. package/es/components/dialog/src/index.vue.d.ts +2 -2
  4. package/es/components/dialog-form/index.d.ts +2 -2
  5. package/es/components/dialog-form/src/index.vue.d.ts +2 -2
  6. package/es/components/display-item/index.d.ts +25 -25
  7. package/es/components/display-item/src/index.vue.d.ts +7 -7
  8. package/es/components/drawer-form/index.d.ts +50 -50
  9. package/es/components/drawer-form/src/index.vue.d.ts +10 -10
  10. package/es/components/form/index.d.ts +99 -99
  11. package/es/components/form/src/form-content.vue.d.ts +12 -12
  12. package/es/components/form/src/index.vue.d.ts +11 -11
  13. package/es/components/form-item/index.d.ts +80 -80
  14. package/es/components/form-item/src/index.vue.d.ts +9 -9
  15. package/es/components/index.d.ts +1 -0
  16. package/es/components/index.mjs +5 -0
  17. package/es/components/input-tag/index.d.ts +6 -6
  18. package/es/components/input-tag/src/index.vue.d.ts +6 -6
  19. package/es/components/layout/index.d.ts +30 -30
  20. package/es/components/layout/src/index.vue.d.ts +10 -10
  21. package/es/components/page/index.d.ts +1613 -1123
  22. package/es/components/page/src/index.vue.d.ts +618 -430
  23. package/es/components/page/src/index.vue2.mjs +31 -10
  24. package/es/components/popover/index.d.ts +49 -49
  25. package/es/components/popover/src/index.vue.d.ts +3 -3
  26. package/es/components/render/index.d.ts +14 -14
  27. package/es/components/render/src/index.vue.d.ts +1 -1
  28. package/es/components/search/index.d.ts +298 -298
  29. package/es/components/search/src/index.vue.d.ts +84 -84
  30. package/es/components/sidebar/index.d.ts +31 -31
  31. package/es/components/sidebar/src/index.vue.d.ts +5 -5
  32. package/es/components/table/index.d.ts +165 -180
  33. package/es/components/table/index.mjs +3 -0
  34. package/es/components/table/src/index.vue.d.ts +12 -21
  35. package/es/components/table/src/index.vue2.mjs +11 -34
  36. package/es/components/table/src/table-action-bar-content.vue.d.ts +78 -0
  37. package/es/components/table/src/table-action-bar-content.vue.mjs +6 -0
  38. package/es/components/table/src/table-action-bar-content.vue2.mjs +395 -0
  39. package/es/components/table/src/table-action-bar.vue.d.ts +4 -4
  40. package/es/components/table/src/table-action-bar.vue2.mjs +30 -353
  41. package/es/components/table/src/table-column-drag-sort.vue.d.ts +1 -1
  42. package/es/components/table/src/table-column-index.vue.d.ts +1 -1
  43. package/es/components/table/src/table-column.vue.d.ts +22 -29
  44. package/es/components/table/src/table-column.vue2.mjs +4 -57
  45. package/es/components/table/src/table-title-bar.vue.d.ts +2 -2
  46. package/es/components/table/src/type.d.ts +0 -11
  47. package/es/components/table/src/use-columns.d.ts +26 -0
  48. package/es/components/table/src/use-columns.mjs +40 -0
  49. package/es/components/table-v2/index.d.ts +174 -0
  50. package/es/components/table-v2/index.mjs +7 -0
  51. package/es/components/table-v2/src/column-converter.d.ts +27 -0
  52. package/es/components/table-v2/src/column-converter.mjs +42 -0
  53. package/es/components/table-v2/src/index.vue.d.ts +157 -0
  54. package/es/components/table-v2/src/index.vue.mjs +6 -0
  55. package/es/components/table-v2/src/index.vue2.mjs +491 -0
  56. package/es/components/table-v2/src/special-columns.d.ts +61 -0
  57. package/es/components/table-v2/src/special-columns.mjs +76 -0
  58. package/es/components/table-v2/src/table-v2-cell.d.ts +104 -0
  59. package/es/components/table-v2/src/table-v2-cell.mjs +139 -0
  60. package/es/components/table-v2/src/table-v2-header-cell.vue.d.ts +61 -0
  61. package/es/components/table-v2/src/table-v2-header-cell.vue.mjs +6 -0
  62. package/es/components/table-v2/src/table-v2-header-cell.vue2.mjs +92 -0
  63. package/es/components/table-v2/src/type.d.ts +95 -0
  64. package/es/components/table-v2/src/type.mjs +1 -0
  65. package/es/components/table-v2/src/use-table-v2-columns.d.ts +43 -0
  66. package/es/components/table-v2/src/use-table-v2-columns.mjs +47 -0
  67. package/es/components/table-v2/style/css.d.ts +17 -0
  68. package/es/components/table-v2/style/css.mjs +17 -0
  69. package/es/components/table-v2/style/index.d.ts +17 -0
  70. package/es/components/table-v2/style/index.mjs +17 -0
  71. package/es/index.mjs +5 -0
  72. package/es/version.d.ts +1 -1
  73. package/es/version.mjs +1 -1
  74. package/index.css +1 -1
  75. package/index.js +1111 -218
  76. package/index.min.js +5 -6
  77. package/index.min.mjs +5 -6
  78. package/index.mjs +1109 -221
  79. package/lib/component.js +40 -38
  80. package/lib/components/dialog/index.d.ts +30 -30
  81. package/lib/components/dialog/src/index.vue.d.ts +2 -2
  82. package/lib/components/dialog-form/index.d.ts +2 -2
  83. package/lib/components/dialog-form/src/index.vue.d.ts +2 -2
  84. package/lib/components/display-item/index.d.ts +25 -25
  85. package/lib/components/display-item/src/index.vue.d.ts +7 -7
  86. package/lib/components/drawer-form/index.d.ts +50 -50
  87. package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
  88. package/lib/components/form/index.d.ts +99 -99
  89. package/lib/components/form/src/form-content.vue.d.ts +12 -12
  90. package/lib/components/form/src/index.vue.d.ts +11 -11
  91. package/lib/components/form-item/index.d.ts +80 -80
  92. package/lib/components/form-item/src/index.vue.d.ts +9 -9
  93. package/lib/components/index.d.ts +1 -0
  94. package/lib/components/index.js +49 -39
  95. package/lib/components/input-tag/index.d.ts +6 -6
  96. package/lib/components/input-tag/src/index.vue.d.ts +6 -6
  97. package/lib/components/layout/index.d.ts +30 -30
  98. package/lib/components/layout/src/index.vue.d.ts +10 -10
  99. package/lib/components/page/index.d.ts +1613 -1123
  100. package/lib/components/page/src/index.vue.d.ts +618 -430
  101. package/lib/components/page/src/index.vue2.js +34 -13
  102. package/lib/components/popover/index.d.ts +49 -49
  103. package/lib/components/popover/src/index.vue.d.ts +3 -3
  104. package/lib/components/render/index.d.ts +14 -14
  105. package/lib/components/render/src/index.vue.d.ts +1 -1
  106. package/lib/components/search/index.d.ts +298 -298
  107. package/lib/components/search/src/index.vue.d.ts +84 -84
  108. package/lib/components/sidebar/index.d.ts +31 -31
  109. package/lib/components/sidebar/src/index.vue.d.ts +5 -5
  110. package/lib/components/table/index.d.ts +165 -180
  111. package/lib/components/table/index.js +6 -0
  112. package/lib/components/table/src/index.vue.d.ts +12 -21
  113. package/lib/components/table/src/index.vue2.js +10 -33
  114. package/lib/components/table/src/table-action-bar-content.vue.d.ts +78 -0
  115. package/lib/components/table/src/table-action-bar-content.vue.js +10 -0
  116. package/lib/components/table/src/table-action-bar-content.vue2.js +399 -0
  117. package/lib/components/table/src/table-action-bar.vue.d.ts +4 -4
  118. package/lib/components/table/src/table-action-bar.vue2.js +28 -351
  119. package/lib/components/table/src/table-column-drag-sort.vue.d.ts +1 -1
  120. package/lib/components/table/src/table-column-index.vue.d.ts +1 -1
  121. package/lib/components/table/src/table-column.vue.d.ts +22 -29
  122. package/lib/components/table/src/table-column.vue2.js +2 -55
  123. package/lib/components/table/src/table-title-bar.vue.d.ts +2 -2
  124. package/lib/components/table/src/type.d.ts +0 -11
  125. package/lib/components/table/src/use-columns.d.ts +26 -0
  126. package/lib/components/table/src/use-columns.js +42 -0
  127. package/lib/components/table-v2/index.d.ts +174 -0
  128. package/lib/components/table-v2/index.js +10 -0
  129. package/lib/components/table-v2/src/column-converter.d.ts +27 -0
  130. package/lib/components/table-v2/src/column-converter.js +44 -0
  131. package/lib/components/table-v2/src/index.vue.d.ts +157 -0
  132. package/lib/components/table-v2/src/index.vue.js +10 -0
  133. package/lib/components/table-v2/src/index.vue2.js +495 -0
  134. package/lib/components/table-v2/src/special-columns.d.ts +61 -0
  135. package/lib/components/table-v2/src/special-columns.js +80 -0
  136. package/lib/components/table-v2/src/table-v2-cell.d.ts +104 -0
  137. package/lib/components/table-v2/src/table-v2-cell.js +143 -0
  138. package/lib/components/table-v2/src/table-v2-header-cell.vue.d.ts +61 -0
  139. package/lib/components/table-v2/src/table-v2-header-cell.vue.js +10 -0
  140. package/lib/components/table-v2/src/table-v2-header-cell.vue2.js +96 -0
  141. package/lib/components/table-v2/src/type.d.ts +95 -0
  142. package/lib/components/table-v2/src/type.js +2 -0
  143. package/lib/components/table-v2/src/use-table-v2-columns.d.ts +43 -0
  144. package/lib/components/table-v2/src/use-table-v2-columns.js +51 -0
  145. package/lib/components/table-v2/style/css.d.ts +17 -0
  146. package/lib/components/table-v2/style/css.js +20 -0
  147. package/lib/components/table-v2/style/index.d.ts +17 -0
  148. package/lib/components/table-v2/style/index.js +20 -0
  149. package/lib/index.js +49 -39
  150. package/lib/version.d.ts +1 -1
  151. package/lib/version.js +1 -1
  152. package/locale/en.js +1 -1
  153. package/locale/en.min.js +1 -1
  154. package/locale/en.min.mjs +1 -1
  155. package/locale/en.mjs +1 -1
  156. package/locale/ja.js +1 -1
  157. package/locale/ja.min.js +1 -1
  158. package/locale/ja.min.mjs +1 -1
  159. package/locale/ja.mjs +1 -1
  160. package/locale/ko.js +1 -1
  161. package/locale/ko.min.js +1 -1
  162. package/locale/ko.min.mjs +1 -1
  163. package/locale/ko.mjs +1 -1
  164. package/locale/zh-cn.js +1 -1
  165. package/locale/zh-cn.min.js +1 -1
  166. package/locale/zh-cn.min.mjs +1 -1
  167. package/locale/zh-cn.mjs +1 -1
  168. package/locale/zh-hk.js +1 -1
  169. package/locale/zh-hk.min.js +1 -1
  170. package/locale/zh-hk.min.mjs +1 -1
  171. package/locale/zh-hk.mjs +1 -1
  172. package/locale/zh-tw.js +1 -1
  173. package/locale/zh-tw.min.js +1 -1
  174. package/locale/zh-tw.min.mjs +1 -1
  175. package/locale/zh-tw.mjs +1 -1
  176. package/package.json +1 -1
  177. package/theme-chalk/index.css +1 -1
  178. package/theme-chalk/plus-table-v2.css +1 -0
  179. package/theme-chalk/src/index.scss +1 -0
  180. package/theme-chalk/src/table-v2.scss +71 -0
@@ -3,21 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var iconsVue = require('@element-plus/icons-vue');
7
6
  var elementPlus = require('element-plus');
8
- require('../../utils/index.js');
9
7
  require('../../../hooks/index.js');
10
- require('../../../constants/index.js');
8
+ var tableActionBarContent = require('./table-action-bar-content.vue.js');
11
9
  var useLocale = require('../../../hooks/useLocale.js');
12
- var form = require('../../../constants/form.js');
13
- var is = require('../../utils/is.js');
14
10
 
15
- const _hoisted_1 = {
16
- key: 0,
17
- class: "plus-table-action-bar__dropdown__link"
18
- };
19
- const _hoisted_2 = { class: "plus-table-action-bar__dropdown__link" };
20
- const _hoisted_3 = { class: "plus-table-action-bar__more-text" };
21
11
  var _sfc_main = /* @__PURE__ */ vue.defineComponent({
22
12
  ...{
23
13
  name: "PlusTableActionBar"
@@ -37,232 +27,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
37
27
  },
38
28
  emits: ["clickAction", "clickActionConfirmCancel"],
39
29
  setup(__props, { emit: __emit }) {
40
- const props = __props;
41
30
  const emit = __emit;
42
31
  const { t } = useLocale.useLocale();
43
- const hideOnClick = vue.ref(true);
44
- const formRefs = vue.inject(form.TableFormRefInjectionKey);
45
- const getButtonKey = (buttonRow, row, index) => {
46
- var _a, _b;
47
- const text = is.isFunction(buttonRow.text) ? buttonRow.text(row, index, buttonRow) : buttonRow.text;
48
- return String((_b = (_a = vue.unref(text)) != null ? _a : buttonRow.code) != null ? _b : "");
49
- };
50
- const getSubButtons = (row, index) => {
51
- const data = props.buttons.filter((item) => {
52
- if (is.isFunction(item.show)) {
53
- const tempFunction = item.show;
54
- const isShow = tempFunction(row, index, item);
55
- return vue.unref(isShow) !== false;
56
- }
57
- return vue.unref(item.show) !== false;
58
- });
59
- const showNumber = is.isFunction(props.showNumber) ? props.showNumber(row, index) : props.showNumber;
60
- const showMore = data.length > showNumber;
61
- if (!showMore) {
62
- return {
63
- showMore,
64
- preButtons: data,
65
- nextButtons: []
66
- };
67
- }
68
- if (props.showLimitIncludeMore) {
69
- return {
70
- showMore,
71
- preButtons: data.slice(0, showNumber - 1),
72
- nextButtons: data.slice(showNumber - 1)
73
- };
74
- }
75
- return {
76
- showMore,
77
- preButtons: data.slice(0, showNumber),
78
- nextButtons: data.slice(showNumber)
79
- };
80
- };
81
- const createCallbackParams = (params, e) => ({
82
- /**
83
- * 解析后的按钮数据中的text
84
- * @version v0.1.17
85
- */
86
- text: params.text,
87
- row: params.row,
88
- buttonRow: params.buttonRow,
89
- index: params.index,
90
- rowIndex: params.index,
91
- e,
92
- formRefs: formRefs.value[params.index],
93
- ...params.rest
94
- });
95
- const getConfirmMsg = (buttonRow, callbackParams) => {
96
- var _a, _b;
97
- let message = t("plus.table.confirmToPerformThisOperation");
98
- let title = t("plus.table.prompt");
99
- let options = void 0;
100
- let appContext = null;
101
- if (is.isPlainObject(buttonRow.confirm)) {
102
- const tempTitle = is.isFunction(buttonRow.confirm.title) ? buttonRow.confirm.title(callbackParams) : buttonRow.confirm.title;
103
- if (tempTitle) {
104
- title = tempTitle;
105
- }
106
- const tempMessage = is.isFunction(buttonRow.confirm.message) ? buttonRow.confirm.message(callbackParams) : buttonRow.confirm.message;
107
- if (tempMessage) {
108
- message = tempMessage;
109
- }
110
- options = (_a = buttonRow.confirm) == null ? void 0 : _a.options;
111
- appContext = (_b = buttonRow.confirm) == null ? void 0 : _b.appContext;
112
- }
113
- return { message, title, options, appContext };
114
- };
115
- const render = (row, buttonRow, index, rest) => {
116
- var _a;
117
- const buttonRowProps = is.isFunction(buttonRow.props) ? buttonRow.props(row, index, buttonRow) : vue.unref(buttonRow.props);
118
- const text = is.isFunction(buttonRow.text) ? vue.unref(buttonRow.text(row, index, buttonRow)) : vue.unref(buttonRow.text);
119
- const params = {
120
- text,
121
- row,
122
- buttonRow,
123
- index,
124
- rest
125
- };
126
- const getPopconfirmTitle = () => props.confirmType === "popconfirm" && buttonRow.confirm ? getConfirmMsg(buttonRow, createCallbackParams(params)).message : text;
127
- if (props.type === "icon") {
128
- return vue.h(
129
- elementPlus.ElTooltip,
130
- { placement: "top", content: text, ...buttonRow.tooltipProps },
131
- () => {
132
- var _a2;
133
- return props.confirmType === "popconfirm" && buttonRow.confirm ? vue.h(
134
- "span",
135
- {
136
- class: "el-icon"
137
- },
138
- vue.h(
139
- elementPlus.ElPopconfirm,
140
- {
141
- trigger: "click",
142
- ...is.isPlainObject(buttonRow.confirm) ? (_a2 = buttonRow.confirm) == null ? void 0 : _a2.popconfirmProps : {},
143
- title: getPopconfirmTitle(),
144
- onConfirm: (event) => handleConfirm(createCallbackParams(params, event)),
145
- onCancel: (event) => handleCancel(createCallbackParams(params, event))
146
- },
147
- {
148
- reference: () => vue.withDirectives(
149
- vue.h(
150
- elementPlus.ElIcon,
151
- {
152
- size: 16,
153
- style: { margin: 0 },
154
- ...buttonRowProps,
155
- onClick: () => {
156
- hideOnClick.value = false;
157
- if (is.isFunction(buttonRow.onClick)) {
158
- buttonRow.onClick(createCallbackParams(params));
159
- }
160
- }
161
- },
162
- () => buttonRow.icon ? vue.h(buttonRow.icon) : ""
163
- ),
164
- buttonRow.directives || []
165
- )
166
- }
167
- )
168
- ) : vue.withDirectives(
169
- vue.h(
170
- elementPlus.ElIcon,
171
- {
172
- size: 16,
173
- ...buttonRowProps,
174
- onClick: (event) => handleClickAction(createCallbackParams(params, event))
175
- },
176
- () => buttonRow.icon ? vue.h(buttonRow.icon) : ""
177
- ),
178
- buttonRow.directives || []
179
- );
180
- }
181
- );
182
- } else {
183
- const Tag = props.type === "button" ? elementPlus.ElButton : elementPlus.ElLink;
184
- const defaultProps = props.type === "link" ? { href: "javaScript:;" } : {};
185
- return props.confirmType === "popconfirm" && buttonRow.confirm ? vue.h(
186
- elementPlus.ElPopconfirm,
187
- {
188
- trigger: "click",
189
- ...is.isPlainObject(buttonRow.confirm) ? (_a = buttonRow.confirm) == null ? void 0 : _a.popconfirmProps : {},
190
- title: getPopconfirmTitle(),
191
- onConfirm: (event) => handleConfirm(createCallbackParams(params, event)),
192
- onCancel: (event) => handleCancel(createCallbackParams(params, event))
193
- },
194
- {
195
- reference: () => vue.withDirectives(
196
- vue.h(
197
- Tag,
198
- {
199
- size: "small",
200
- ...defaultProps,
201
- ...buttonRowProps,
202
- onClick: () => {
203
- hideOnClick.value = false;
204
- if (is.isFunction(buttonRow.onClick)) {
205
- buttonRow.onClick(createCallbackParams(params));
206
- }
207
- }
208
- },
209
- () => text
210
- ),
211
- buttonRow.directives || []
212
- )
213
- }
214
- ) : vue.withDirectives(
215
- vue.h(
216
- Tag,
217
- {
218
- size: "small",
219
- ...defaultProps,
220
- ...buttonRowProps,
221
- onClick: (event) => handleClickAction(createCallbackParams(params, event))
222
- },
223
- () => text
224
- ),
225
- buttonRow.directives || []
226
- );
227
- }
228
- };
229
- const handleConfirm = (callbackParams) => {
230
- if (is.isFunction(callbackParams.buttonRow.onConfirm)) {
231
- callbackParams.buttonRow.onConfirm(callbackParams);
232
- }
233
- emit("clickAction", callbackParams);
234
- };
235
- const handleCancel = (callbackParams) => {
236
- if (is.isFunction(callbackParams.buttonRow.onCancel)) {
237
- callbackParams.buttonRow.onCancel(callbackParams);
238
- }
239
- emit("clickActionConfirmCancel", callbackParams);
240
- };
241
- const handleClickAction = (callbackParams) => {
242
- hideOnClick.value = true;
243
- const { buttonRow } = callbackParams;
244
- if (is.isFunction(buttonRow.onClick)) {
245
- buttonRow.onClick(callbackParams);
246
- }
247
- if (buttonRow.confirm) {
248
- if (props.confirmType === "messageBox") {
249
- const { message, title, options, appContext } = getConfirmMsg(buttonRow, callbackParams);
250
- elementPlus.ElMessageBox.confirm(message, title, options, appContext).then(() => {
251
- if (is.isFunction(buttonRow.onConfirm)) {
252
- buttonRow.onConfirm(callbackParams);
253
- }
254
- emit("clickAction", callbackParams);
255
- }).catch(() => {
256
- if (is.isFunction(buttonRow.onCancel)) {
257
- buttonRow.onCancel(callbackParams);
258
- }
259
- emit("clickActionConfirmCancel", callbackParams);
260
- });
261
- }
262
- } else {
263
- emit("clickAction", callbackParams);
264
- }
265
- };
32
+ const handleClickAction = (data) => emit("clickAction", data);
33
+ const handleClickActionConfirmCancel = (data) => emit("clickActionConfirmCancel", data);
266
34
  return (_ctx, _cache) => {
267
35
  return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), vue.mergeProps({
268
36
  key: "actionBar",
@@ -272,122 +40,31 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
272
40
  width: _ctx.width || 200
273
41
  }, _ctx.actionBarTableColumnProps), {
274
42
  default: vue.withCtx(({ row, $index, ...rest }) => [
275
- vue.createCommentVNode("\n \u7528\u5355\u5143\u7D20\u6570\u7EC4\u8BA9 getSubButtons \u6BCF\u884C\u53EA\u6267\u884C\u4E00\u6B21\uFF1A\n \u539F\u5148 preButtons / showMore / nextButtons \u5404\u8C03\u7528\u4E00\u6B21\uFF0C\n 500 \u884C \xD7 11 \u4E2A\u6309\u94AE \u2248 \u4E0A\u4E07\u6B21 show()\uFF08\u542B\u6743\u9650\u5224\u65AD\uFF09\u3002\n "),
276
- (vue.openBlock(true), vue.createElementBlock(
277
- vue.Fragment,
278
- null,
279
- vue.renderList([getSubButtons(row, $index)], (cell) => {
280
- return vue.openBlock(), vue.createElementBlock(
281
- vue.Fragment,
282
- { key: $index },
283
- [
284
- vue.createCommentVNode(" \u663E\u793A\u51FA\u6765\u7684\u6309\u94AE "),
285
- (vue.openBlock(true), vue.createElementBlock(
286
- vue.Fragment,
287
- null,
288
- vue.renderList(cell.preButtons, (buttonRow) => {
289
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(render(row, buttonRow, $index, rest)), {
290
- key: getButtonKey(buttonRow, row, $index)
291
- });
292
- }),
293
- 128
294
- /* KEYED_FRAGMENT */
295
- )),
296
- vue.createCommentVNode(" \u9690\u85CF\u7684\u6309\u94AE "),
297
- cell.showMore ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdown), {
298
- key: 0,
299
- persistent: false,
300
- trigger: "click",
301
- class: "plus-table-action-bar__dropdown",
302
- "hide-on-click": hideOnClick.value
303
- }, {
304
- dropdown: vue.withCtx(() => [
305
- vue.createVNode(
306
- vue.unref(elementPlus.ElDropdownMenu),
307
- null,
308
- {
309
- default: vue.withCtx(() => [
310
- (vue.openBlock(true), vue.createElementBlock(
311
- vue.Fragment,
312
- null,
313
- vue.renderList(cell.nextButtons, (buttonRow) => {
314
- return vue.openBlock(), vue.createBlock(
315
- vue.unref(elementPlus.ElDropdownItem),
316
- {
317
- key: getButtonKey(buttonRow, row, $index)
318
- },
319
- {
320
- default: vue.withCtx(() => [
321
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(render(row, buttonRow, $index, rest))))
322
- ]),
323
- _: 2
324
- /* DYNAMIC */
325
- },
326
- 1024
327
- /* DYNAMIC_SLOTS */
328
- );
329
- }),
330
- 128
331
- /* KEYED_FRAGMENT */
332
- ))
333
- ]),
334
- _: 2
335
- /* DYNAMIC */
336
- },
337
- 1024
338
- /* DYNAMIC_SLOTS */
339
- )
340
- ]),
341
- default: vue.withCtx(() => [
342
- _ctx.moreType === "icon" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, [
343
- vue.renderSlot(_ctx.$slots, "action-bar-more-icon", {}, () => [
344
- vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
345
- default: vue.withCtx(() => [
346
- vue.createVNode(vue.unref(iconsVue.MoreFilled))
347
- ]),
348
- _: 1
349
- /* STABLE */
350
- })
351
- ])
352
- ])) : (vue.openBlock(), vue.createElementBlock(
353
- vue.Fragment,
354
- { key: 1 },
355
- [
356
- vue.createCommentVNode(" \u9ED8\u8BA4 "),
357
- vue.createElementVNode("span", _hoisted_2, [
358
- vue.createElementVNode(
359
- "span",
360
- _hoisted_3,
361
- vue.toDisplayString(vue.unref(t)("plus.table.more")),
362
- 1
363
- /* TEXT */
364
- ),
365
- vue.renderSlot(_ctx.$slots, "action-bar-more-icon", {}, () => [
366
- vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
367
- default: vue.withCtx(() => [
368
- vue.createVNode(vue.unref(iconsVue.ArrowDownBold))
369
- ]),
370
- _: 1
371
- /* STABLE */
372
- })
373
- ])
374
- ])
375
- ],
376
- 64
377
- /* STABLE_FRAGMENT */
378
- ))
379
- ]),
380
- _: 2
381
- /* DYNAMIC */
382
- }, 1032, ["hide-on-click"])) : vue.createCommentVNode("v-if", true)
383
- ],
384
- 64
385
- /* STABLE_FRAGMENT */
386
- );
387
- }),
388
- 128
389
- /* KEYED_FRAGMENT */
390
- ))
43
+ vue.createCommentVNode(" \u6309\u94AE\u5185\u5BB9\u903B\u8F91\u4E0E PlusTableV2 \u5171\u7528 "),
44
+ vue.createVNode(tableActionBarContent.default, {
45
+ row,
46
+ index: $index,
47
+ rest,
48
+ type: _ctx.type,
49
+ buttons: _ctx.buttons,
50
+ "show-number": _ctx.showNumber,
51
+ "show-limit-include-more": _ctx.showLimitIncludeMore,
52
+ "confirm-type": _ctx.confirmType,
53
+ "more-type": _ctx.moreType,
54
+ onClickAction: handleClickAction,
55
+ onClickActionConfirmCancel: handleClickActionConfirmCancel
56
+ }, vue.createSlots({
57
+ _: 2
58
+ /* DYNAMIC */
59
+ }, [
60
+ _ctx.$slots["action-bar-more-icon"] ? {
61
+ name: "action-bar-more-icon",
62
+ fn: vue.withCtx(() => [
63
+ vue.renderSlot(_ctx.$slots, "action-bar-more-icon")
64
+ ]),
65
+ key: "0"
66
+ } : void 0
67
+ ]), 1032, ["row", "index", "rest", "type", "buttons", "show-number", "show-limit-include-more", "confirm-type", "more-type"])
391
68
  ]),
392
69
  _: 3
393
70
  /* FORWARDED */
@@ -28,7 +28,6 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
28
28
  onDragSortEnd?: ((newIndex: number, oldIndex: number) => any) | undefined;
29
29
  }, {
30
30
  sortable: boolean | SortableOptions;
31
- dragSortableTableColumnProps: RecordType;
32
31
  tableInstance: CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
33
32
  data: {
34
33
  type: PropType<any[]>;
@@ -578,6 +577,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
578
577
  indent: number;
579
578
  flexible: boolean;
580
579
  }> | null;
580
+ dragSortableTableColumnProps: RecordType;
581
581
  }, {}>, {
582
582
  "drag-sort-icon"?(_: {}): any;
583
583
  }>;
@@ -23,9 +23,9 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
23
23
  indexContentStyle: () => {};
24
24
  indexTableColumnProps: () => {};
25
25
  }>>>, {
26
+ pageInfo: PageInfo;
26
27
  indexTableColumnProps: Partial< TableColumnCtx<RecordType>>;
27
28
  indexContentStyle: Partial<CSSProperties> | ((row: RecordType, index: number) => Partial<CSSProperties>);
28
- pageInfo: PageInfo;
29
29
  }, {}>;
30
30
  export default _default;
31
31
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -17,10 +17,6 @@ export interface PlusTableColumnProps {
17
17
  * @version 0.1.31
18
18
  */
19
19
  emptyValue?: PlusColumn['emptyValue'];
20
- /**
21
- * 是否启用纯文本单元格快路径,见 PlusTableProps['plainTextCell']
22
- */
23
- plainTextCell?: boolean;
24
20
  }
25
21
  export interface PlusTableColumnEmits {
26
22
  (e: 'formChange', data: FormChangeCallBackParams): void;
@@ -31,7 +27,6 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
31
27
  editable: boolean;
32
28
  subPageInfo: () => {};
33
29
  emptyValue: undefined;
34
- plainTextCell: boolean;
35
30
  }>, {
36
31
  plusDisplayItemInstance: Ref<({
37
32
  $: ComponentInternalInstance;
@@ -42,15 +37,15 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
42
37
  rest: RecordType;
43
38
  column: PlusColumn;
44
39
  emptyValue: string | number;
45
- editable: boolean | "click" | "dblclick";
46
40
  row: RecordType;
41
+ editable: boolean | "click" | "dblclick";
47
42
  }> & Omit<{
48
43
  readonly index: number;
49
44
  readonly formProps: PlusFormProps;
50
45
  readonly rest: RecordType;
51
46
  readonly column: PlusColumn;
52
- readonly editable: boolean | "click" | "dblclick";
53
47
  readonly row: RecordType;
48
+ readonly editable: boolean | "click" | "dblclick";
54
49
  readonly emptyValue?: string | number | undefined;
55
50
  onChange?: ((data: {
56
51
  value: FieldValueType;
@@ -82,22 +77,22 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
82
77
  type: PropType<string | number>;
83
78
  default: undefined;
84
79
  };
85
- editable: {
86
- type: PropType<boolean | "click" | "dblclick">;
87
- default: boolean;
88
- };
89
80
  row: {
90
81
  type: PropType<RecordType>;
91
82
  required: true;
92
83
  default: () => {};
93
84
  };
85
+ editable: {
86
+ type: PropType<boolean | "click" | "dblclick">;
87
+ default: boolean;
88
+ };
94
89
  }>> & {
95
90
  onChange?: ((data: {
96
91
  value: FieldValueType;
97
92
  prop: string;
98
93
  row: RecordType;
99
94
  }) => any) | undefined;
100
- }, "index" | "formProps" | "rest" | "column" | "emptyValue" | "editable" | "row">;
95
+ }, "index" | "formProps" | "rest" | "column" | "emptyValue" | "row" | "editable">;
101
96
  $attrs: {
102
97
  [x: string]: unknown;
103
98
  };
@@ -140,15 +135,15 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
140
135
  type: PropType<string | number>;
141
136
  default: undefined;
142
137
  };
143
- editable: {
144
- type: PropType<boolean | "click" | "dblclick">;
145
- default: boolean;
146
- };
147
138
  row: {
148
139
  type: PropType<RecordType>;
149
140
  required: true;
150
141
  default: () => {};
151
142
  };
143
+ editable: {
144
+ type: PropType<boolean | "click" | "dblclick">;
145
+ default: boolean;
146
+ };
152
147
  }>> & {
153
148
  onChange?: ((data: {
154
149
  value: FieldValueType;
@@ -178,8 +173,8 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
178
173
  rest: RecordType;
179
174
  column: PlusColumn;
180
175
  emptyValue: string | number;
181
- editable: boolean | "click" | "dblclick";
182
176
  row: RecordType;
177
+ editable: boolean | "click" | "dblclick";
183
178
  }, {}, string, {}> & {
184
179
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
185
180
  created?: ((() => void) | (() => void)[]) | undefined;
@@ -225,15 +220,15 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
225
220
  type: PropType<string | number>;
226
221
  default: undefined;
227
222
  };
228
- editable: {
229
- type: PropType<boolean | "click" | "dblclick">;
230
- default: boolean;
231
- };
232
223
  row: {
233
224
  type: PropType<RecordType>;
234
225
  required: true;
235
226
  default: () => {};
236
227
  };
228
+ editable: {
229
+ type: PropType<boolean | "click" | "dblclick">;
230
+ default: boolean;
231
+ };
237
232
  }>> & {
238
233
  onChange?: ((data: {
239
234
  value: FieldValueType;
@@ -253,7 +248,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
253
248
  };
254
249
  }> & {} & ComponentCustomProperties & {} & {
255
250
  $slots: Partial<Record<string, (_: {
256
- column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "label" | "index" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "fieldSlots" | "fieldChildrenSlot" | "modelValue" | "hasLabel" | "clearable" | "valueType" | "renderField" | "renderLabel" | "renderErrorMessage" | "optionsMap" | "defaultValue">> & {
251
+ column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "label" | "index" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "fieldSlots" | "fieldChildrenSlot" | "modelValue" | "hasLabel" | "clearable" | "defaultValue" | "renderField" | "valueType" | "optionsMap" | "renderLabel" | "renderErrorMessage">> & {
257
252
  readonly label: string | ComputedRef<string>;
258
253
  readonly modelValue: string | number | boolean | RecordType | Date | string[] | boolean[] | number[] | Date[] | [Date, Date] | [number, number] | [string, string] | string[][] | number[][] | null;
259
254
  readonly hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
@@ -282,7 +277,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
282
277
  };
283
278
  rows: number;
284
279
  autocomplete: string;
285
- type: "" | "number" | "default" | "checkbox" | "radio" | "textarea" | "text" | "circle" | "color" | "button" | "success" | "warning" | "info" | "primary" | "danger" | "reset" | "submit" | "search" | "time" | "image" | "line" | "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "range" | "dashboard" | "hidden" | "datetime-local" | "email" | "file" | "password" | "tel" | "url";
280
+ type: "" | "number" | "default" | "checkbox" | "radio" | "textarea" | "text" | "circle" | "color" | "button" | "success" | "warning" | "info" | "primary" | "danger" | "reset" | "submit" | "search" | "time" | "image" | "line" | "hidden" | "range" | "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "dashboard" | "datetime-local" | "email" | "file" | "password" | "tel" | "url";
286
281
  loading: EpPropMergeType<BooleanConstructor, unknown, unknown> | EpPropMergeType<StringConstructor, "lazy" | "eager", unknown> | undefined;
287
282
  step: string | number;
288
283
  format: string | ProgressFn | undefined;
@@ -352,7 +347,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
352
347
  index: number;
353
348
  defaultValue: any;
354
349
  }) => any>> & Partial<Record<string, (_: {
355
- column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "label" | "index" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "fieldSlots" | "fieldChildrenSlot" | "modelValue" | "hasLabel" | "clearable" | "valueType" | "renderField" | "renderLabel" | "renderErrorMessage" | "optionsMap" | "defaultValue">> & {
350
+ column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "label" | "index" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "fieldSlots" | "fieldChildrenSlot" | "modelValue" | "hasLabel" | "clearable" | "defaultValue" | "renderField" | "valueType" | "optionsMap" | "renderLabel" | "renderErrorMessage">> & {
356
351
  readonly label: string | ComputedRef<string>;
357
352
  readonly modelValue: string | number | boolean | RecordType | Date | string[] | boolean[] | number[] | Date[] | [Date, Date] | [number, number] | [string, string] | string[][] | number[][] | null;
358
353
  readonly hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
@@ -381,7 +376,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
381
376
  };
382
377
  rows: number;
383
378
  autocomplete: string;
384
- type: "" | "number" | "default" | "checkbox" | "radio" | "textarea" | "text" | "circle" | "color" | "button" | "success" | "warning" | "info" | "primary" | "danger" | "reset" | "submit" | "search" | "time" | "image" | "line" | "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "range" | "dashboard" | "hidden" | "datetime-local" | "email" | "file" | "password" | "tel" | "url";
379
+ type: "" | "number" | "default" | "checkbox" | "radio" | "textarea" | "text" | "circle" | "color" | "button" | "success" | "warning" | "info" | "primary" | "danger" | "reset" | "submit" | "search" | "time" | "image" | "line" | "hidden" | "range" | "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "dashboard" | "datetime-local" | "email" | "file" | "password" | "tel" | "url";
385
380
  loading: EpPropMergeType<BooleanConstructor, unknown, unknown> | EpPropMergeType<StringConstructor, "lazy" | "eager", unknown> | undefined;
386
381
  step: string | number;
387
382
  format: string | ProgressFn | undefined;
@@ -451,7 +446,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
451
446
  index: number;
452
447
  defaultValue: any;
453
448
  }) => any>> & Partial<Record<string, (_: {
454
- column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "label" | "index" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "fieldSlots" | "fieldChildrenSlot" | "modelValue" | "hasLabel" | "clearable" | "valueType" | "renderField" | "renderLabel" | "renderErrorMessage" | "optionsMap" | "defaultValue">> & {
449
+ column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "label" | "index" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "fieldSlots" | "fieldChildrenSlot" | "modelValue" | "hasLabel" | "clearable" | "defaultValue" | "renderField" | "valueType" | "optionsMap" | "renderLabel" | "renderErrorMessage">> & {
455
450
  readonly label: string | ComputedRef<string>;
456
451
  readonly modelValue: string | number | boolean | RecordType | Date | string[] | boolean[] | number[] | Date[] | [Date, Date] | [number, number] | [string, string] | string[][] | number[][] | null;
457
452
  readonly hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
@@ -480,7 +475,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
480
475
  };
481
476
  rows: number;
482
477
  autocomplete: string;
483
- type: "" | "number" | "default" | "checkbox" | "radio" | "textarea" | "text" | "circle" | "color" | "button" | "success" | "warning" | "info" | "primary" | "danger" | "reset" | "submit" | "search" | "time" | "image" | "line" | "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "range" | "dashboard" | "hidden" | "datetime-local" | "email" | "file" | "password" | "tel" | "url";
478
+ type: "" | "number" | "default" | "checkbox" | "radio" | "textarea" | "text" | "circle" | "color" | "button" | "success" | "warning" | "info" | "primary" | "danger" | "reset" | "submit" | "search" | "time" | "image" | "line" | "hidden" | "range" | "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "dashboard" | "datetime-local" | "email" | "file" | "password" | "tel" | "url";
484
479
  loading: EpPropMergeType<BooleanConstructor, unknown, unknown> | EpPropMergeType<StringConstructor, "lazy" | "eager", unknown> | undefined;
485
480
  step: string | number;
486
481
  format: string | ProgressFn | undefined;
@@ -571,14 +566,12 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
571
566
  editable: boolean;
572
567
  subPageInfo: () => {};
573
568
  emptyValue: undefined;
574
- plainTextCell: boolean;
575
569
  }>>> & {
576
570
  onFormChange?: ((data: FormChangeCallBackParams) => any) | undefined;
577
571
  }, {
578
572
  columns: PlusColumn[];
579
573
  emptyValue: string | number;
580
574
  editable: boolean | "click" | "dblclick";
581
- plainTextCell: boolean;
582
575
  tableDataLength: number;
583
576
  subPageInfo: Partial<PageInfo>;
584
577
  }, {}>, Partial<Record<string, (_: any) => any>> & Partial<Record<NonNullable<string | number>, (_: any) => any>> & Partial<Record<NonNullable<string | number>, (_: {