@fangzhongya/fang-ui 0.0.27 → 0.0.29

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 (110) hide show
  1. package/dist/components/array/src/index.cjs +6 -9
  2. package/dist/components/array/src/index.js +6 -9
  3. package/dist/components/button/index.d.ts +1 -1
  4. package/dist/components/button/src/index.d.ts +2 -2
  5. package/dist/components/cascader/index.d.ts +1 -1
  6. package/dist/components/cascader/src/index.d.ts +2 -2
  7. package/dist/components/checks/src/index.cjs +4 -4
  8. package/dist/components/checks/src/index.js +4 -4
  9. package/dist/components/common/list.cjs +2 -3
  10. package/dist/components/common/list.js +2 -3
  11. package/dist/components/common/use.cjs +11 -11
  12. package/dist/components/common/use.js +11 -11
  13. package/dist/components/cs-slot/src/index.cjs +6 -6
  14. package/dist/components/cs-slot/src/index.js +6 -6
  15. package/dist/components/dates/index.css +1 -1
  16. package/dist/components/dates/index.scss +4 -6
  17. package/dist/components/dialog/src/index.cjs +7 -11
  18. package/dist/components/dialog/src/index.js +8 -12
  19. package/dist/components/dialog/style/index2.scss +3 -0
  20. package/dist/components/edit-float/src/index2.cjs +2 -2
  21. package/dist/components/edit-float/src/index2.js +2 -2
  22. package/dist/components/el-tables/src/columns3.cjs +1 -1
  23. package/dist/components/el-tables/src/columns3.js +1 -1
  24. package/dist/components/el-tables/src/index.cjs +2 -3
  25. package/dist/components/el-tables/src/index.js +2 -3
  26. package/dist/components/forms/src/data.cjs +1 -1
  27. package/dist/components/forms/src/data.js +1 -1
  28. package/dist/components/forms/src/index.cjs +2 -2
  29. package/dist/components/forms/src/index.js +2 -2
  30. package/dist/components/forms/src/setup.cjs +5 -8
  31. package/dist/components/forms/src/setup.js +5 -8
  32. package/dist/components/forms/src/util.cjs +1 -2
  33. package/dist/components/forms/src/util.js +1 -2
  34. package/dist/components/forms-drag/src/index.cjs +2 -2
  35. package/dist/components/forms-drag/src/index.js +2 -2
  36. package/dist/components/forms-item/src/index.cjs +1 -1
  37. package/dist/components/forms-item/src/index.js +1 -1
  38. package/dist/components/forms-items/src/index.cjs +2 -2
  39. package/dist/components/forms-items/src/index.js +2 -2
  40. package/dist/components/global-config/src/index.cjs +1 -1
  41. package/dist/components/global-config/src/index.js +1 -1
  42. package/dist/components/icon-picker/src/index.cjs +4 -6
  43. package/dist/components/icon-picker/src/index.js +4 -6
  44. package/dist/components/input/index.d.ts +2 -2
  45. package/dist/components/input/src/index.d.ts +4 -4
  46. package/dist/components/input-history/src/util.d.ts +17 -0
  47. package/dist/components/input-number/index.d.ts +1 -1
  48. package/dist/components/input-number/src/index.d.ts +2 -2
  49. package/dist/components/input-select/index.d.ts +2 -2
  50. package/dist/components/input-select/src/index.d.ts +4 -4
  51. package/dist/components/input-select/src/index2.cjs +1 -1
  52. package/dist/components/input-select/src/index2.js +1 -1
  53. package/dist/components/labels/src/index2.cjs +1 -2
  54. package/dist/components/labels/src/index2.js +1 -2
  55. package/dist/components/menus/src/menu-ll.cjs +1 -1
  56. package/dist/components/menus/src/menu-ll.js +1 -1
  57. package/dist/components/page/src/index.cjs +65 -85
  58. package/dist/components/page/src/index.js +65 -85
  59. package/dist/components/page/src/set-column2.cjs +2 -2
  60. package/dist/components/page/src/set-column2.js +2 -2
  61. package/dist/components/right-key/index.d.ts +15 -0
  62. package/dist/components/right-key/src/data.cjs +5 -1
  63. package/dist/components/right-key/src/data.d.ts +4 -0
  64. package/dist/components/right-key/src/data.js +5 -1
  65. package/dist/components/right-key/src/index.cjs +6 -1
  66. package/dist/components/right-key/src/index.d.ts +9 -0
  67. package/dist/components/right-key/src/index.js +6 -1
  68. package/dist/components/role-select/src/index.cjs +1 -1
  69. package/dist/components/role-select/src/index.js +1 -1
  70. package/dist/components/selector/src/index2.cjs +2 -2
  71. package/dist/components/selector/src/index2.js +2 -2
  72. package/dist/components/selects/src/index.cjs +1 -1
  73. package/dist/components/selects/src/index.js +1 -1
  74. package/dist/components/stick-window/src/index.cjs +1 -1
  75. package/dist/components/stick-window/src/index.js +1 -1
  76. package/dist/components/switchs/src/index.cjs +4 -4
  77. package/dist/components/switchs/src/index.js +4 -4
  78. package/dist/components/table-list/src/table-list.cjs +10 -15
  79. package/dist/components/table-list/src/table-list.js +10 -15
  80. package/dist/components/tables/common/pagin.cjs +40 -57
  81. package/dist/components/tables/common/pagin.js +40 -57
  82. package/dist/components/tables/common/table-but.cjs +1 -2
  83. package/dist/components/tables/common/table-but.js +1 -2
  84. package/dist/components/tables/common/table-color.cjs +4 -5
  85. package/dist/components/tables/common/table-color.js +4 -5
  86. package/dist/components/tables/common/table-list.cjs +1 -2
  87. package/dist/components/tables/common/table-list.js +1 -2
  88. package/dist/components/tables/common/util.cjs +2 -3
  89. package/dist/components/tables/common/util.js +2 -3
  90. package/dist/components/tables/src/index.cjs +4 -5
  91. package/dist/components/tables/src/index.js +4 -5
  92. package/dist/components/tables-form/src/columns3.cjs +1 -1
  93. package/dist/components/tables-form/src/columns3.js +1 -1
  94. package/dist/components/tables-form/src/index.cjs +4 -7
  95. package/dist/components/tables-form/src/index.js +4 -7
  96. package/dist/components/tables-pagin/src/index.cjs +3 -4
  97. package/dist/components/tables-pagin/src/index.js +3 -4
  98. package/dist/components/tooltip/index.d.ts +1 -1
  99. package/dist/components/tooltip/src/index.d.ts +2 -2
  100. package/dist/components/vxe-tables/src/columns3.cjs +1 -1
  101. package/dist/components/vxe-tables/src/columns3.js +1 -1
  102. package/dist/components/vxe-tables/src/index.cjs +2 -3
  103. package/dist/components/vxe-tables/src/index.js +2 -3
  104. package/dist/directives/adjust/index.cjs +1 -2
  105. package/dist/directives/adjust/index.js +1 -2
  106. package/dist/hooks/global-config/index.cjs +2 -5
  107. package/dist/hooks/global-config/index.js +2 -5
  108. package/dist/index.css +1 -1
  109. package/package.json +13 -13
  110. /package/dist/components/{forms-items → forms-item}/index.css +0 -0
@@ -52,7 +52,6 @@ const dataProps = {
52
52
  };
53
53
  const dataEmit = ["list-events", "selection"];
54
54
  const useInit = (props2, emit, refTable, isEl) => {
55
- var _a, _b;
56
55
  const loading = ref(false);
57
56
  const mpagconfig = {
58
57
  pageSize: 10,
@@ -87,34 +86,33 @@ const useInit = (props2, emit, refTable, isEl) => {
87
86
  desc: "desc",
88
87
  descending: "desc"
89
88
  };
90
- const tableList = ref(((_a = props2.configs) == null ? void 0 : _a.list) ?? props2.list);
91
- const tableConfig = ref(((_b = props2.configs) == null ? void 0 : _b.config) ?? props2.config);
89
+ const tableList = ref(props2.configs?.list ?? props2.list);
90
+ const tableConfig = ref(props2.configs?.config ?? props2.config);
92
91
  const width = {
93
92
  index: 66,
94
93
  selection: 46
95
94
  };
96
95
  const setList = () => {
97
- var _a2, _b2, _c, _d, _e, _f;
98
96
  const configs = props2.configs;
99
- const list = (configs == null ? void 0 : configs.list) ?? props2.list;
100
- const config = (configs == null ? void 0 : configs.config) ?? props2.config;
101
- if (((_a2 = config.config) == null ? void 0 : _a2.ischecked) || ((_b2 = config.config) == null ? void 0 : _b2.isserial)) {
102
- let isx = (_c = config.config) == null ? void 0 : _c.ischecked;
103
- let iss = (_d = config.config) == null ? void 0 : _d.isserial;
97
+ const list = configs?.list ?? props2.list;
98
+ const config = configs?.config ?? props2.config;
99
+ if (config.config?.ischecked || config.config?.isserial) {
100
+ let isx = config.config?.ischecked;
101
+ let iss = config.config?.isserial;
104
102
  let i = -1;
105
103
  for (let t = 0; t < list.length; t++) {
106
104
  const obj = list[t];
107
- if ((obj == null ? void 0 : obj.type) == "selection") {
105
+ if (obj?.type == "selection") {
108
106
  if (!obj.width) {
109
107
  obj.width = width.selection;
110
108
  }
111
109
  if (!obj.selectable) {
112
- obj.selectable = (_e = config.config) == null ? void 0 : _e.selectable;
110
+ obj.selectable = config.config?.selectable;
113
111
  }
114
112
  i = t;
115
113
  isx = false;
116
114
  }
117
- if ((obj == null ? void 0 : obj.type) == "index") {
115
+ if (obj?.type == "index") {
118
116
  if (!obj.width) {
119
117
  obj.width = width.index;
120
118
  }
@@ -145,7 +143,7 @@ const useInit = (props2, emit, refTable, isEl) => {
145
143
  list.unshift({
146
144
  type: "selection",
147
145
  width: width.selection,
148
- selectable: (_f = config.config) == null ? void 0 : _f.selectable,
146
+ selectable: config.config?.selectable,
149
147
  fixed: true
150
148
  });
151
149
  }
@@ -153,10 +151,9 @@ const useInit = (props2, emit, refTable, isEl) => {
153
151
  tableList.value = list;
154
152
  };
155
153
  const setConfig = () => {
156
- var _a2;
157
154
  const configs = props2.configs;
158
- const config = (configs == null ? void 0 : configs.config) ?? props2.config;
159
- if ((_a2 = config.config) == null ? void 0 : _a2.defaultSort) {
155
+ const config = configs?.config ?? props2.config;
156
+ if (config.config?.defaultSort) {
160
157
  const v = config.config.defaultSort;
161
158
  paginat.order = orderMap[v.order] ?? "";
162
159
  paginat.prop = v.prop;
@@ -197,21 +194,19 @@ const useInit = (props2, emit, refTable, isEl) => {
197
194
  }
198
195
  });
199
196
  function onChange(arr) {
200
- var _a2;
201
- if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
197
+ if (!tableConfig.value.config?.isradio) {
202
198
  console.log("onChange");
203
199
  emit("selection", arr);
204
200
  }
205
201
  }
206
202
  function onRowClick(row, obj) {
207
- var _a2, _b2, _c, _d;
208
- if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.noRowSelect)) {
209
- const selectable = (_b2 = tableConfig.value.config) == null ? void 0 : _b2.selectable;
203
+ if (!tableConfig.value.config?.noRowSelect) {
204
+ const selectable = tableConfig.value.config?.selectable;
210
205
  if (selectable) {
211
206
  const index = data.list.findIndex((obj2) => {
212
207
  });
213
208
  if (selectable(row, index)) {
214
- if ((_c = tableConfig.value.config) == null ? void 0 : _c.isradio) {
209
+ if (tableConfig.value.config?.isradio) {
215
210
  refTable.value.clearSelection();
216
211
  refTable.value.toggleRowSelection(row, true);
217
212
  console.log("onRowClick");
@@ -221,7 +216,7 @@ const useInit = (props2, emit, refTable, isEl) => {
221
216
  }
222
217
  }
223
218
  } else {
224
- if ((_d = tableConfig.value.config) == null ? void 0 : _d.isradio) {
219
+ if (tableConfig.value.config?.isradio) {
225
220
  refTable.value.clearSelection();
226
221
  refTable.value.toggleRowSelection(row, true);
227
222
  console.log("onRowClick");
@@ -233,17 +228,15 @@ const useInit = (props2, emit, refTable, isEl) => {
233
228
  }
234
229
  }
235
230
  function empty() {
236
- var _a2, _b2, _c;
237
- if (istype.value && ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
238
- (_b2 = refTable.value) == null ? void 0 : _b2.clearRadioRow();
231
+ if (istype.value && tableConfig.value.config?.isradio) {
232
+ refTable.value?.clearRadioRow();
239
233
  }
240
- (_c = refTable.value) == null ? void 0 : _c.clearSelection();
234
+ refTable.value?.clearSelection();
241
235
  console.log("empty");
242
236
  emit("selection", []);
243
237
  }
244
238
  function onSelect(s, row) {
245
- var _a2;
246
- if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
239
+ if (tableConfig.value.config?.isradio) {
247
240
  refTable.value.clearSelection();
248
241
  refTable.value.toggleRowSelection(row, true);
249
242
  console.log("onSelect");
@@ -251,19 +244,17 @@ const useInit = (props2, emit, refTable, isEl) => {
251
244
  }
252
245
  }
253
246
  function onRadioChange(obj) {
254
- var _a2;
255
- if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
247
+ if (tableConfig.value.config?.isradio) {
256
248
  console.log("onRadioChange");
257
249
  emit("selection", [obj.row]);
258
250
  }
259
251
  }
260
252
  function defaultSort(arr) {
261
- var _a2, _b2, _c, _d, _e;
262
- if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.sort)) {
253
+ if (!tableConfig.value.config?.sort) {
263
254
  return arr;
264
255
  } else {
265
- const prop = (_c = (_b2 = tableConfig.value.config) == null ? void 0 : _b2.defaultSort) == null ? void 0 : _c.prop;
266
- const order = orderMap[(_e = (_d = tableConfig.value.config) == null ? void 0 : _d.defaultSort) == null ? void 0 : _e.order] || "";
256
+ const prop = tableConfig.value.config?.defaultSort?.prop;
257
+ const order = orderMap[tableConfig.value.config?.defaultSort?.order] || "";
267
258
  if (prop && order) {
268
259
  const vs = arr.sort((ao, bo) => {
269
260
  const a = ao[prop];
@@ -286,8 +277,7 @@ const useInit = (props2, emit, refTable, isEl) => {
286
277
  }
287
278
  }
288
279
  function onSortChange(obj) {
289
- var _a2;
290
- if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.sort)) {
280
+ if (!tableConfig.value.config?.sort) {
291
281
  paginat.order = orderMap[obj.order] || "";
292
282
  paginat.prop = obj.field || obj.prop;
293
283
  paginat.current = 1;
@@ -310,13 +300,11 @@ const useInit = (props2, emit, refTable, isEl) => {
310
300
  getData({}, callback);
311
301
  }
312
302
  function clean() {
313
- var _a2;
314
- (_a2 = refTable.value) == null ? void 0 : _a2.clearSelection();
303
+ refTable.value?.clearSelection();
315
304
  console.log("clean");
316
305
  emit("selection", []);
317
306
  }
318
307
  function getParam(param) {
319
- var _a2;
320
308
  const arr = [
321
309
  "current",
322
310
  "pageSize",
@@ -325,7 +313,7 @@ const useInit = (props2, emit, refTable, isEl) => {
325
313
  ];
326
314
  let data2 = {};
327
315
  if (typeof tableConfig.value.ajax === "object") {
328
- data2 = ((_a2 = tableConfig.value.ajax) == null ? void 0 : _a2.data) ?? {};
316
+ data2 = tableConfig.value.ajax?.data ?? {};
329
317
  }
330
318
  for (const key of arr) {
331
319
  const current = data2[key] ?? mpagconfig.data[key];
@@ -334,14 +322,13 @@ const useInit = (props2, emit, refTable, isEl) => {
334
322
  return param;
335
323
  }
336
324
  function getData(p = {}, callback) {
337
- var _a2, _b2;
338
325
  clean();
339
326
  loading.value = true;
340
327
  let ajaxConfig = props2.ajaxConfig;
341
328
  let ajax = props2.ajax;
342
329
  if (typeof tableConfig.value.ajax === "object") {
343
- ajaxConfig = ajaxConfig ?? ((_a2 = tableConfig.value.ajax) == null ? void 0 : _a2.config);
344
- ajax = ajax ?? ((_b2 = tableConfig.value.ajax) == null ? void 0 : _b2.url);
330
+ ajaxConfig = ajaxConfig ?? tableConfig.value.ajax?.config;
331
+ ajax = ajax ?? tableConfig.value.ajax?.url;
345
332
  } else {
346
333
  ajax = ajax ?? tableConfig.value.ajax;
347
334
  }
@@ -359,16 +346,15 @@ const useInit = (props2, emit, refTable, isEl) => {
359
346
  ...p
360
347
  })
361
348
  ).then((list) => {
362
- var _a3;
363
- let dlist = (list == null ? void 0 : list.list) || [];
349
+ let dlist = list?.list || [];
364
350
  if (dlist instanceof Array === false) {
365
351
  dlist = [dlist];
366
352
  }
367
- if (((_a3 = tableConfig.value.paginat) == null ? void 0 : _a3.is) && dlist.length > paginat.pageSize) {
353
+ if (tableConfig.value.paginat?.is && dlist.length > paginat.pageSize) {
368
354
  dlist = dlist.slice(0, paginat.pageSize);
369
355
  }
370
356
  data.list = defaultSort(dlist);
371
- data.total = (list == null ? void 0 : list.total) || dlist.length;
357
+ data.total = list?.total || dlist.length;
372
358
  loading.value = false;
373
359
  if (callback) {
374
360
  callback(data);
@@ -381,10 +367,9 @@ const useInit = (props2, emit, refTable, isEl) => {
381
367
  });
382
368
  }
383
369
  function inParamFilter(obj) {
384
- var _a2;
385
370
  let before = props2.onRequestBefore;
386
371
  if (typeof tableConfig.value.ajax === "object") {
387
- before = before ?? ((_a2 = tableConfig.value.ajax) == null ? void 0 : _a2.onRequestBefore);
372
+ before = before ?? tableConfig.value.ajax?.onRequestBefore;
388
373
  }
389
374
  if (before) {
390
375
  return executionMethod(before, obj);
@@ -393,18 +378,17 @@ const useInit = (props2, emit, refTable, isEl) => {
393
378
  }
394
379
  }
395
380
  function inDataFilter(data2, obj) {
396
- var _a2, _b2;
397
381
  let after = props2.onRequestAfter;
398
382
  let ajaxData = {};
399
383
  if (typeof tableConfig.value.ajax === "object") {
400
- ajaxData = ((_a2 = tableConfig.value.ajax) == null ? void 0 : _a2.data) ?? {};
401
- after = after ?? ((_b2 = tableConfig.value.ajax) == null ? void 0 : _b2.onRequestAfter);
384
+ ajaxData = tableConfig.value.ajax?.data ?? {};
385
+ after = after ?? tableConfig.value.ajax?.onRequestAfter;
402
386
  }
403
387
  if (after) {
404
388
  return executionMethod(after, data2, obj);
405
389
  } else {
406
- const l = (ajaxData == null ? void 0 : ajaxData.list) ?? mpagconfig.data.list;
407
- const t = (ajaxData == null ? void 0 : ajaxData.total) ?? mpagconfig.data.total;
390
+ const l = ajaxData?.list ?? mpagconfig.data.list;
391
+ const t = ajaxData?.total ?? mpagconfig.data.total;
408
392
  const list = getObjValue(l, data2) ?? data2;
409
393
  const total = t == "" ? list.length : getObjValue(t, data2);
410
394
  return {
@@ -417,8 +401,7 @@ const useInit = (props2, emit, refTable, isEl) => {
417
401
  initData();
418
402
  }
419
403
  const height = computed(() => {
420
- var _a2;
421
- return ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.height) ?? "auto";
404
+ return tableConfig.value.config?.height ?? "auto";
422
405
  });
423
406
  return {
424
407
  height,
@@ -73,14 +73,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
73
73
  emit("scope-click", obj, props.tableScope, props.tableListObj, "but");
74
74
  }
75
75
  const valueArr = vue.computed(() => {
76
- var _a;
77
76
  const prop = props.tableListObj.prop || "";
78
77
  const row = props.tableScope.row || {};
79
78
  const column = props.tableScope.column || {};
80
79
  const cellValue = row[prop];
81
80
  const index = props.tableScope.$index;
82
81
  const formatter = props.tableListObj.formatter;
83
- const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
82
+ const configFormatter = props.tableListObj.config?.formatter;
84
83
  if (configFormatter) {
85
84
  const arr = configFormatter(row, column, cellValue, index);
86
85
  return setValue(arr);
@@ -71,14 +71,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
71
  emit("scope-click", obj, props.tableScope, props.tableListObj, "but");
72
72
  }
73
73
  const valueArr = computed(() => {
74
- var _a;
75
74
  const prop = props.tableListObj.prop || "";
76
75
  const row = props.tableScope.row || {};
77
76
  const column = props.tableScope.column || {};
78
77
  const cellValue = row[prop];
79
78
  const index = props.tableScope.$index;
80
79
  const formatter = props.tableListObj.formatter;
81
- const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
80
+ const configFormatter = props.tableListObj.config?.formatter;
82
81
  if (configFormatter) {
83
82
  const arr = configFormatter(row, column, cellValue, index);
84
83
  return setValue(arr);
@@ -56,14 +56,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
56
56
  }
57
57
  }
58
58
  const valueObj = vue.computed(() => {
59
- var _a, _b, _c, _d;
60
59
  const prop = props.tableListObj.prop || "";
61
- const row = ((_a = props.tableScope) == null ? void 0 : _a.row) || {};
62
- const column = ((_b = props.tableScope) == null ? void 0 : _b.column) || {};
60
+ const row = props.tableScope?.row || {};
61
+ const column = props.tableScope?.column || {};
63
62
  const cellValue = row[prop];
64
- const index = (_c = props.tableScope) == null ? void 0 : _c.$index;
63
+ const index = props.tableScope?.$index;
65
64
  const formatter = props.tableListObj.formatter;
66
- const configFormatter = (_d = props.tableListObj.config) == null ? void 0 : _d.formatter;
65
+ const configFormatter = props.tableListObj.config?.formatter;
67
66
  if (configFormatter) {
68
67
  const obj = configFormatter(row, column, cellValue, index);
69
68
  let css;
@@ -54,14 +54,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
54
  }
55
55
  }
56
56
  const valueObj = computed(() => {
57
- var _a, _b, _c, _d;
58
57
  const prop = props.tableListObj.prop || "";
59
- const row = ((_a = props.tableScope) == null ? void 0 : _a.row) || {};
60
- const column = ((_b = props.tableScope) == null ? void 0 : _b.column) || {};
58
+ const row = props.tableScope?.row || {};
59
+ const column = props.tableScope?.column || {};
61
60
  const cellValue = row[prop];
62
- const index = (_c = props.tableScope) == null ? void 0 : _c.$index;
61
+ const index = props.tableScope?.$index;
63
62
  const formatter = props.tableListObj.formatter;
64
- const configFormatter = (_d = props.tableListObj.config) == null ? void 0 : _d.formatter;
63
+ const configFormatter = props.tableListObj.config?.formatter;
65
64
  if (configFormatter) {
66
65
  const obj = configFormatter(row, column, cellValue, index);
67
66
  let css;
@@ -61,14 +61,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
61
61
  }
62
62
  }
63
63
  const valueArr = vue.computed(() => {
64
- var _a;
65
64
  const prop = props.tableListObj.prop || "";
66
65
  const row = props.tableScope.row || {};
67
66
  const column = props.tableScope.column || {};
68
67
  const cellValue = row[prop];
69
68
  const index = props.tableScope.$index;
70
69
  const formatter = props.tableListObj.formatter;
71
- const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
70
+ const configFormatter = props.tableListObj.config?.formatter;
72
71
  if (configFormatter) {
73
72
  const arr = configFormatter(row, column, cellValue, index);
74
73
  return setValue(arr);
@@ -59,14 +59,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  }
60
60
  }
61
61
  const valueArr = computed(() => {
62
- var _a;
63
62
  const prop = props.tableListObj.prop || "";
64
63
  const row = props.tableScope.row || {};
65
64
  const column = props.tableScope.column || {};
66
65
  const cellValue = row[prop];
67
66
  const index = props.tableScope.$index;
68
67
  const formatter = props.tableListObj.formatter;
69
- const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
68
+ const configFormatter = props.tableListObj.config?.formatter;
70
69
  if (configFormatter) {
71
70
  const arr = configFormatter(row, column, cellValue, index);
72
71
  return setValue(arr);
@@ -19,7 +19,7 @@ require("@fangzhongya/utils/css/setObjStyle");
19
19
  require("@fangzhongya/utils/css/getCss");
20
20
  const index = require("../../../hooks/inherit/index.cjs");
21
21
  function setMinWidth(obj, props) {
22
- const config = (props == null ? void 0 : props.table) ?? {};
22
+ const config = props?.table ?? {};
23
23
  if (obj.width) {
24
24
  return;
25
25
  }
@@ -58,8 +58,7 @@ const eventAliasObj = {
58
58
  },
59
59
  // .once - 最多触发一次处理函数。
60
60
  once(event) {
61
- var _a;
62
- if ((_a = event.currentTarget) == null ? void 0 : _a.__once__) {
61
+ if (event.currentTarget?.__once__) {
63
62
  return false;
64
63
  } else {
65
64
  if (event.currentTarget) {
@@ -17,7 +17,7 @@ import "@fangzhongya/utils/css/setObjStyle";
17
17
  import "@fangzhongya/utils/css/getCss";
18
18
  import { useAttrValue } from "../../../hooks/inherit/index.js";
19
19
  function setMinWidth(obj, props) {
20
- const config = (props == null ? void 0 : props.table) ?? {};
20
+ const config = props?.table ?? {};
21
21
  if (obj.width) {
22
22
  return;
23
23
  }
@@ -56,8 +56,7 @@ const eventAliasObj = {
56
56
  },
57
57
  // .once - 最多触发一次处理函数。
58
58
  once(event) {
59
- var _a;
60
- if ((_a = event.currentTarget) == null ? void 0 : _a.__once__) {
59
+ if (event.currentTarget?.__once__) {
61
60
  return false;
62
61
  } else {
63
62
  if (event.currentTarget) {
@@ -44,7 +44,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
44
44
  empty
45
45
  });
46
46
  return (_ctx, _cache) => {
47
- var _a, _b, _c, _d;
48
47
  return vue.openBlock(), vue.createElementBlock("div", {
49
48
  class: vue.normalizeClass(vue.unref(cs).z())
50
49
  }, [
@@ -52,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
52
51
  ref_key: "refTable",
53
52
  ref: refTable,
54
53
  class: [vue.unref(cs).z("main")],
55
- size: (_a = vue.unref(tableConfig).config) == null ? void 0 : _a.size,
54
+ size: vue.unref(tableConfig).config?.size,
56
55
  value: vue.unref(data).list,
57
56
  list: vue.unref(tableList),
58
57
  paginat: vue.unref(paginat),
@@ -77,11 +76,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
77
76
  ref: refTable,
78
77
  class: [
79
78
  vue.unref(cs).z("main"),
80
- vue.unref(cs).is("radio", (_b = vue.unref(tableConfig).config) == null ? void 0 : _b.isradio)
79
+ vue.unref(cs).is("radio", vue.unref(tableConfig).config?.isradio)
81
80
  ],
82
81
  value: vue.unref(data).list,
83
82
  list: vue.unref(tableList),
84
- size: (_c = vue.unref(tableConfig).config) == null ? void 0 : _c.size,
83
+ size: vue.unref(tableConfig).config?.size,
85
84
  paginat: vue.unref(paginat),
86
85
  loading: vue.unref(loading),
87
86
  options: props.options,
@@ -101,7 +100,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
101
100
  };
102
101
  })
103
102
  ]), 1040, ["class", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])),
104
- ((_d = vue.unref(tableConfig).paginat) == null ? void 0 : _d.is) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.Pagin), vue.mergeProps({ key: 2 }, vue.unref(pagconfig), {
103
+ vue.unref(tableConfig).paginat?.is ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.Pagin), vue.mergeProps({ key: 2 }, vue.unref(pagconfig), {
105
104
  class: vue.unref(cs).z("paginat"),
106
105
  paginat: vue.unref(paginat),
107
106
  total: vue.unref(data).total,
@@ -42,7 +42,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  empty
43
43
  });
44
44
  return (_ctx, _cache) => {
45
- var _a, _b, _c, _d;
46
45
  return openBlock(), createElementBlock("div", {
47
46
  class: normalizeClass(unref(cs).z())
48
47
  }, [
@@ -50,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
49
  ref_key: "refTable",
51
50
  ref: refTable,
52
51
  class: [unref(cs).z("main")],
53
- size: (_a = unref(tableConfig).config) == null ? void 0 : _a.size,
52
+ size: unref(tableConfig).config?.size,
54
53
  value: unref(data).list,
55
54
  list: unref(tableList),
56
55
  paginat: unref(paginat),
@@ -75,11 +74,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
75
74
  ref: refTable,
76
75
  class: [
77
76
  unref(cs).z("main"),
78
- unref(cs).is("radio", (_b = unref(tableConfig).config) == null ? void 0 : _b.isradio)
77
+ unref(cs).is("radio", unref(tableConfig).config?.isradio)
79
78
  ],
80
79
  value: unref(data).list,
81
80
  list: unref(tableList),
82
- size: (_c = unref(tableConfig).config) == null ? void 0 : _c.size,
81
+ size: unref(tableConfig).config?.size,
83
82
  paginat: unref(paginat),
84
83
  loading: unref(loading),
85
84
  options: props.options,
@@ -99,7 +98,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
99
98
  };
100
99
  })
101
100
  ]), 1040, ["class", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])),
102
- ((_d = unref(tableConfig).paginat) == null ? void 0 : _d.is) ? (openBlock(), createBlock(unref(Pagin), mergeProps({ key: 2 }, unref(pagconfig), {
101
+ unref(tableConfig).paginat?.is ? (openBlock(), createBlock(unref(Pagin), mergeProps({ key: 2 }, unref(pagconfig), {
103
102
  class: unref(cs).z("paginat"),
104
103
  paginat: unref(paginat),
105
104
  total: unref(data).total,
@@ -7,7 +7,7 @@ const elementPlus = require("element-plus");
7
7
  const column = require("./column.cjs");
8
8
  function getLists(arrs, emit, table, form, formValue) {
9
9
  const arr = [];
10
- arrs == null ? void 0 : arrs.forEach((obj, index) => {
10
+ arrs?.forEach((obj, index) => {
11
11
  if (obj.children && obj.children.length > 0) {
12
12
  if (use.useHide(obj)) {
13
13
  arr.push(
@@ -5,7 +5,7 @@ import { ElTableColumn } from "element-plus";
5
5
  import { setProps, setHeader, columnRender } from "./column.js";
6
6
  function getLists(arrs, emit, table, form, formValue) {
7
7
  const arr = [];
8
- arrs == null ? void 0 : arrs.forEach((obj, index) => {
8
+ arrs?.forEach((obj, index) => {
9
9
  if (obj.children && obj.children.length > 0) {
10
10
  if (useHide(obj)) {
11
11
  arr.push(
@@ -48,10 +48,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
48
48
  isSort = false;
49
49
  }, 400);
50
50
  const tableDefaultSort = vue.computed(() => {
51
- var _a, _b;
52
51
  return {
53
- prop: (_a = props.defaultSort) == null ? void 0 : _a.prop,
54
- order: (_b = props.defaultSort) == null ? void 0 : _b.order
52
+ prop: props.defaultSort?.prop,
53
+ order: props.defaultSort?.order
55
54
  };
56
55
  });
57
56
  const rowStyle = vue.computed(() => {
@@ -114,8 +113,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
114
113
  return rowStyle2;
115
114
  } else {
116
115
  return (scope) => {
117
- var _a;
118
- const prop = (_a = props.form) == null ? void 0 : _a.prop;
116
+ const prop = props.form?.prop;
119
117
  const obj = lists.value[scope.columnIndex];
120
118
  const defaultFormfilter = () => {
121
119
  return obj.isform && obj.compon && prop && scope.row[prop];
@@ -142,8 +140,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
142
140
  }
143
141
  });
144
142
  function validate() {
145
- var _a;
146
- (_a = formRef.value) == null ? void 0 : _a.validate((valid) => {
143
+ formRef.value?.validate((valid) => {
147
144
  if (valid) {
148
145
  emit("submit", dataFormValue.value);
149
146
  }
@@ -46,10 +46,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
46
  isSort = false;
47
47
  }, 400);
48
48
  const tableDefaultSort = computed(() => {
49
- var _a, _b;
50
49
  return {
51
- prop: (_a = props.defaultSort) == null ? void 0 : _a.prop,
52
- order: (_b = props.defaultSort) == null ? void 0 : _b.order
50
+ prop: props.defaultSort?.prop,
51
+ order: props.defaultSort?.order
53
52
  };
54
53
  });
55
54
  const rowStyle = computed(() => {
@@ -112,8 +111,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
111
  return rowStyle2;
113
112
  } else {
114
113
  return (scope) => {
115
- var _a;
116
- const prop = (_a = props.form) == null ? void 0 : _a.prop;
114
+ const prop = props.form?.prop;
117
115
  const obj = lists.value[scope.columnIndex];
118
116
  const defaultFormfilter = () => {
119
117
  return obj.isform && obj.compon && prop && scope.row[prop];
@@ -140,8 +138,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
140
138
  }
141
139
  });
142
140
  function validate() {
143
- var _a;
144
- (_a = formRef.value) == null ? void 0 : _a.validate((valid) => {
141
+ formRef.value?.validate((valid) => {
145
142
  if (valid) {
146
143
  emit("submit", dataFormValue.value);
147
144
  }
@@ -43,7 +43,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
43
43
  empty
44
44
  });
45
45
  return (_ctx, _cache) => {
46
- var _a, _b, _c;
47
46
  return vue.openBlock(), vue.createElementBlock("div", {
48
47
  class: vue.normalizeClass(vue.unref(cs).z()),
49
48
  style: vue.normalizeStyle(vue.unref(cs).vdo({ height: vue.unref(height) }))
@@ -52,10 +51,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
52
51
  height: vue.unref(height),
53
52
  ref_key: "refTable",
54
53
  ref: refTable,
55
- class: [vue.unref(cs).z("main"), vue.unref(cs).is("radio", (_a = vue.unref(tableConfig).config) == null ? void 0 : _a.isradio)],
54
+ class: [vue.unref(cs).z("main"), vue.unref(cs).is("radio", vue.unref(tableConfig).config?.isradio)],
56
55
  value: vue.unref(data).list,
57
56
  list: vue.unref(tableList),
58
- size: (_b = vue.unref(tableConfig).config) == null ? void 0 : _b.size,
57
+ size: vue.unref(tableConfig).config?.size,
59
58
  paginat: vue.unref(paginat),
60
59
  loading: vue.unref(loading),
61
60
  options: props.options,
@@ -75,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
75
74
  };
76
75
  })
77
76
  ]), 1040, ["height", "class", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"]),
78
- ((_c = vue.unref(tableConfig).paginat) == null ? void 0 : _c.is) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Pagin), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
77
+ vue.unref(tableConfig).paginat?.is ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Pagin), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
79
78
  class: vue.unref(cs).z("paginat"),
80
79
  paginat: vue.unref(paginat),
81
80
  total: vue.unref(data).total,
@@ -41,7 +41,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  empty
42
42
  });
43
43
  return (_ctx, _cache) => {
44
- var _a, _b, _c;
45
44
  return openBlock(), createElementBlock("div", {
46
45
  class: normalizeClass(unref(cs).z()),
47
46
  style: normalizeStyle(unref(cs).vdo({ height: unref(height) }))
@@ -50,10 +49,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
49
  height: unref(height),
51
50
  ref_key: "refTable",
52
51
  ref: refTable,
53
- class: [unref(cs).z("main"), unref(cs).is("radio", (_a = unref(tableConfig).config) == null ? void 0 : _a.isradio)],
52
+ class: [unref(cs).z("main"), unref(cs).is("radio", unref(tableConfig).config?.isradio)],
54
53
  value: unref(data).list,
55
54
  list: unref(tableList),
56
- size: (_b = unref(tableConfig).config) == null ? void 0 : _b.size,
55
+ size: unref(tableConfig).config?.size,
57
56
  paginat: unref(paginat),
58
57
  loading: unref(loading),
59
58
  options: props.options,
@@ -73,7 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
73
72
  };
74
73
  })
75
74
  ]), 1040, ["height", "class", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"]),
76
- ((_c = unref(tableConfig).paginat) == null ? void 0 : _c.is) ? (openBlock(), createBlock(unref(Pagin), mergeProps({ key: 0 }, unref(pagconfig), {
75
+ unref(tableConfig).paginat?.is ? (openBlock(), createBlock(unref(Pagin), mergeProps({ key: 0 }, unref(pagconfig), {
77
76
  class: unref(cs).z("paginat"),
78
77
  paginat: unref(paginat),
79
78
  total: unref(data).total,