@maxax/ui 1.1.20 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { camelize, isNumber, isString, removeClass, addClass, pascalCase, isClient as isClient$1, hasClass, withInstall, guid, isFunction, isElement, isObject as isObject$1, isUndefined, downloadFileStatic, downloadFileByResponseData, attrAccept as attrAccept$1, isBoolean, getSlot, isArray, deepMerge, cloneDeep as cloneDeep$2, classNames, call, isNull, getValueKey, tryConstructArray, isNil, tryDeconstructArray, tryDeconstructObject, isEmpty, isPascalCase, mergeArray, getStyle as getStyle$1, kebabCase, findNodeAll, calculate } from "@maxax/utils";
2
- import { shallowRef, shallowReadonly, onUnmounted, onMounted, nextTick, getCurrentScope, onScopeDispose, toValue, getCurrentInstance, watch, computed, unref, Fragment, isVNode, Comment, Text, watchEffect, onBeforeUnmount, inject, ref, isRef, toRaw, defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, h, useAttrs, mergeProps, createBlock, createCommentVNode, withCtx, createTextVNode, toDisplayString, createVNode, useSlots, createSlots, provide, reactive, toRefs, resolveComponent, Transition, withDirectives, withModifiers, normalizeStyle, withKeys, resolveDynamicComponent, vShow, render as render$1, useTemplateRef, renderList, triggerRef, TransitionGroup, toRef, normalizeProps, guardReactiveProps, vModelText, createApp, mergeDefaults, toHandlers } from "vue";
2
+ import { shallowRef, shallowReadonly, onUnmounted, onMounted, nextTick, getCurrentScope, onScopeDispose, toValue, getCurrentInstance, watch, computed, unref, Fragment, isVNode, Comment, Text, watchEffect, onBeforeUnmount, inject, ref, isRef, toRaw, defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, h, useAttrs, mergeProps, createBlock, createCommentVNode, withCtx, createTextVNode, toDisplayString, createVNode, useSlots, createSlots, provide, reactive, toRefs, resolveComponent, Transition, withDirectives, withModifiers, normalizeStyle, withKeys, resolveDynamicComponent, vShow, render as render$1, useTemplateRef, renderList, triggerRef, TransitionGroup, toRef, normalizeProps, guardReactiveProps, vModelText, createApp, toHandlers, mergeDefaults } from "vue";
3
3
  import BScroll from "@better-scroll/core";
4
4
  import { NTooltip, NButton, NInput, NButtonGroup, NDropdown, NProgress, NModal, NSwitch, NCard, NCascader, NDatePicker, NDrawer, NDrawerContent, NSelect, NInputNumber, NUpload, NAutoComplete, NDynamicTags, NTreeSelect, NTimePicker, NCheckbox, NCheckboxGroup, NRadio, NRadioButton, NRadioGroup, NSlider, NTransfer, NDivider, NColorPicker, NRate, NCol, NFormItem, NForm, NRow, NPopover, NTabs, NTabPane, NScrollbar, NEmpty, NPagination, NSpin } from "naive-ui";
5
5
  import { b as buildLocaleContext, z as zhCN } from "./utils-Doo526pz.js";
@@ -22438,11 +22438,44 @@ function handleFieldColumn(columns) {
22438
22438
  column.field || (column.field = column.type || "");
22439
22439
  });
22440
22440
  }
22441
+ function handleCheckboxColumn(propsRef, columns) {
22442
+ const { showCheckboxColumn } = unref(propsRef);
22443
+ const existIndex = columns.findIndex((column) => column.type === "checkbox");
22444
+ if (showCheckboxColumn) {
22445
+ if (existIndex === -1) {
22446
+ const isFixedLeft = columns.some((item) => item.fixed === "left");
22447
+ columns.unshift({
22448
+ field: "imaxCheckbox",
22449
+ type: "checkbox",
22450
+ width: 50,
22451
+ align: "center",
22452
+ ...isFixedLeft ? { fixed: "left" } : {}
22453
+ });
22454
+ }
22455
+ } else if (existIndex !== -1) {
22456
+ columns.splice(existIndex, 1);
22457
+ }
22458
+ }
22459
+ function handleRadioColumn(propsRef, columns) {
22460
+ const { showRadioColumn } = unref(propsRef);
22461
+ const existIndex = columns.findIndex((column) => column.type === "radio");
22462
+ if (showRadioColumn) {
22463
+ if (existIndex === -1) {
22464
+ const isFixedLeft = columns.some((item) => item.fixed === "left");
22465
+ columns.unshift({
22466
+ field: "imaxRadio",
22467
+ type: "radio",
22468
+ width: 50,
22469
+ align: "center",
22470
+ ...isFixedLeft ? { fixed: "left" } : {}
22471
+ });
22472
+ }
22473
+ } else if (existIndex !== -1) {
22474
+ columns.splice(existIndex, 1);
22475
+ }
22476
+ }
22441
22477
  function handleIndexColumn(propsRef, getPaginationRef, columns) {
22442
- const {
22443
- showIndexColumn,
22444
- treeConfig
22445
- } = unref(propsRef);
22478
+ const { showIndexColumn, treeConfig } = unref(propsRef);
22446
22479
  let pushIndexColumns = false;
22447
22480
  if (unref(treeConfig)) {
22448
22481
  return;
@@ -22462,23 +22495,16 @@ function handleIndexColumn(propsRef, getPaginationRef, columns) {
22462
22495
  type: "seq",
22463
22496
  width: 68,
22464
22497
  align: "center",
22465
- ...isFixedLeft ? {
22466
- fixed: "left"
22467
- } : {},
22498
+ ...isFixedLeft ? { fixed: "left" } : {},
22468
22499
  slots: {
22469
- default({
22470
- rowIndex
22471
- }) {
22500
+ default({ rowIndex }) {
22472
22501
  const getPagination = unref(getPaginationRef);
22473
22502
  if (isBoolean$1(getPagination)) {
22474
22503
  return `${rowIndex + 1}`;
22475
22504
  }
22476
- const {
22477
- currentPage = 1,
22478
- pageSize = PAGE_SIZE
22479
- } = getPagination;
22505
+ const { currentPage = 1, pageSize = PAGE_SIZE } = getPagination;
22480
22506
  const seq = ((currentPage < 1 ? 1 : currentPage) - 1) * pageSize + rowIndex + 1;
22481
- return createVNode("span", null, [seq]);
22507
+ return h("span", seq);
22482
22508
  }
22483
22509
  }
22484
22510
  });
@@ -22505,6 +22531,8 @@ function useColumns(propsRef, getPaginationRef) {
22505
22531
  const getColumnsRef = computed(() => {
22506
22532
  const columns = cloneDeep$1(unref(columnsRef));
22507
22533
  handleFieldColumn(columns);
22534
+ handleCheckboxColumn(propsRef, columns);
22535
+ handleRadioColumn(propsRef, columns);
22508
22536
  handleIndexColumn(propsRef, getPaginationRef, columns);
22509
22537
  if (!columns) {
22510
22538
  return [];
@@ -22527,11 +22555,14 @@ function useColumns(propsRef, getPaginationRef) {
22527
22555
  const columns = cloneDeep$1(viewColumns);
22528
22556
  return columns.filter((column) => isIfShow(column));
22529
22557
  });
22530
- watch(() => unref(propsRef).columns, (columns) => {
22531
- var _a;
22532
- columnsRef.value = columns || [];
22533
- cacheColumns = (_a = columns == null ? void 0 : columns.filter((item) => !item.type)) != null ? _a : [];
22534
- });
22558
+ watch(
22559
+ () => unref(propsRef).columns,
22560
+ (columns) => {
22561
+ var _a;
22562
+ columnsRef.value = columns || [];
22563
+ cacheColumns = (_a = columns == null ? void 0 : columns.filter((item) => !item.type)) != null ? _a : [];
22564
+ }
22565
+ );
22535
22566
  function setCacheColumnsByField(field, value) {
22536
22567
  if (!field || !value) {
22537
22568
  return;
@@ -22573,10 +22604,7 @@ function useColumns(propsRef, getPaginationRef) {
22573
22604
  }
22574
22605
  }
22575
22606
  function getColumns(opt) {
22576
- const {
22577
- ignoreIndex,
22578
- ignoreAction
22579
- } = opt || {};
22607
+ const { ignoreIndex, ignoreAction } = opt || {};
22580
22608
  let columns = toRaw(unref(getColumnsRef));
22581
22609
  if (ignoreIndex) {
22582
22610
  columns = columns.filter((item) => item.field !== "seq");
@@ -23227,121 +23255,74 @@ function useTableForm(propsRef, { fetch: fetch2, getLoading, setPagination, setS
23227
23255
  handleSearchInfoReload
23228
23256
  };
23229
23257
  }
23230
- const setting = {
23231
- api: null,
23232
- size: DEFAULT_SIZE,
23233
- autoCreateKey: true,
23234
- showIndexColumn: true,
23235
- fetchSetting: () => FETCH_SETTING,
23236
- columns: () => [],
23237
- fit: true,
23238
- padding: false,
23239
- minHeight: 180,
23240
- border: "inner",
23241
- showHeader: true,
23242
- delayHover: 250,
23243
- autoResize: true,
23244
- // maxHeight: 325,
23245
- showOverflow: true,
23246
- showHeaderOverflow: "tooltip",
23247
- showFooterOverflow: "tooltip",
23248
- sortConfig: () => ({
23249
- remote: true
23250
- }),
23251
- resizeConfig: () => ({
23252
- refreshDelay: 250
23253
- }),
23254
- radioConfig: () => ({
23255
- strict: true
23256
- }),
23257
- rowConfig: () => ({
23258
- useKey: true,
23259
- isCurrent: true,
23260
- isHover: true,
23261
- keyField: "_ROW_KEY_"
23262
- }),
23263
- checkboxConfig: () => ({
23264
- strict: true
23265
- }),
23266
- tooltipConfig: () => ({
23267
- enterable: true
23268
- }),
23269
- validConfig: () => ({
23270
- showMessage: true,
23271
- autoClear: true,
23272
- autoPos: true,
23273
- message: "inline",
23274
- msgMode: "single"
23275
- }),
23276
- columnConfig: () => ({
23277
- resizable: true,
23278
- useKey: true,
23279
- maxFixedSize: 4
23280
- }),
23281
- customConfig: () => ({
23282
- mode: "modal"
23283
- }),
23284
- toolbarConfig: () => ({
23285
- custom: true,
23286
- zoom: true
23287
- })
23288
- };
23289
23258
  const _hoisted_1$4 = { class: "max-table-selection-count" };
23290
23259
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
23291
23260
  __name: "BasicTable",
23292
- props: /* @__PURE__ */ mergeDefaults({
23261
+ props: {
23293
23262
  layouts: {},
23294
- columns: {},
23263
+ columns: { default: () => [] },
23295
23264
  pagerConfig: {},
23296
23265
  proxyConfig: {},
23297
- toolbarConfig: {},
23266
+ toolbarConfig: { default: () => ({
23267
+ custom: true,
23268
+ zoom: true
23269
+ }) },
23298
23270
  formConfig: {},
23299
23271
  zoomConfig: {},
23300
- size: {},
23301
- id: { type: [String, Function] },
23272
+ size: { default: DEFAULT_SIZE },
23273
+ id: {},
23302
23274
  data: {},
23303
23275
  height: {},
23304
- minHeight: {},
23276
+ minHeight: { default: 180 },
23305
23277
  maxHeight: {},
23306
23278
  stripe: { type: Boolean },
23307
- padding: { type: Boolean },
23279
+ padding: { type: Boolean, default: false },
23308
23280
  round: { type: Boolean },
23309
- border: { type: [Boolean, String] },
23281
+ border: { type: [Boolean, String], default: "inner" },
23310
23282
  loading: { type: Boolean },
23311
23283
  align: {},
23312
23284
  headerAlign: {},
23313
23285
  footerAlign: {},
23314
- showHeader: { type: Boolean },
23286
+ showHeader: { type: Boolean, default: true },
23315
23287
  showFooter: { type: Boolean },
23316
23288
  footerData: {},
23317
- footerMethod: { type: Function },
23318
- rowClassName: { type: [String, Function] },
23319
- cellClassName: { type: [String, Function] },
23320
- headerRowClassName: { type: [String, Function] },
23321
- headerCellClassName: { type: [String, Function] },
23322
- footerRowClassName: { type: [String, Function] },
23323
- footerCellClassName: { type: [String, Function] },
23324
- cellStyle: { type: [Object, Function] },
23325
- rowStyle: { type: [Object, Function] },
23326
- headerCellStyle: { type: [Object, Function] },
23327
- headerRowStyle: { type: [Object, Function] },
23328
- footerRowStyle: { type: [Object, Function] },
23329
- footerCellStyle: { type: [Object, Function] },
23289
+ footerMethod: {},
23290
+ rowClassName: {},
23291
+ cellClassName: {},
23292
+ headerRowClassName: {},
23293
+ headerCellClassName: {},
23294
+ footerRowClassName: {},
23295
+ footerCellClassName: {},
23296
+ cellStyle: {},
23297
+ rowStyle: {},
23298
+ headerCellStyle: {},
23299
+ headerRowStyle: {},
23300
+ footerRowStyle: {},
23301
+ footerCellStyle: {},
23330
23302
  showCustomHeader: { type: Boolean },
23331
23303
  mergeHeaderCells: {},
23332
23304
  mergeCells: {},
23333
23305
  mergeFooterCells: {},
23334
23306
  mergeFooterItems: {},
23335
- spanMethod: { type: Function },
23336
- footerSpanMethod: { type: Function },
23337
- showOverflow: { type: [Boolean, String, null] },
23338
- showHeaderOverflow: { type: [Boolean, String, null] },
23339
- showFooterOverflow: { type: [Boolean, String, null] },
23307
+ spanMethod: {},
23308
+ footerSpanMethod: {},
23309
+ showOverflow: { type: [Boolean, String, null], default: true },
23310
+ showHeaderOverflow: { type: [Boolean, String, null], default: "tooltip" },
23311
+ showFooterOverflow: { type: [Boolean, String, null], default: "tooltip" },
23340
23312
  keepSource: { type: Boolean },
23341
- autoResize: { type: Boolean },
23313
+ autoResize: { type: Boolean, default: true },
23342
23314
  syncResize: { type: [Boolean, String, Number] },
23343
- columnConfig: {},
23344
- rowConfig: {},
23315
+ columnConfig: { default: () => ({
23316
+ resizable: true,
23317
+ useKey: true,
23318
+ maxFixedSize: 4
23319
+ }) },
23320
+ rowConfig: { default: () => ({
23321
+ useKey: true,
23322
+ isCurrent: true,
23323
+ isHover: true,
23324
+ keyField: "_ROW_KEY_"
23325
+ }) },
23345
23326
  cellConfig: {},
23346
23327
  headerCellConfig: {},
23347
23328
  footerCellConfig: {},
@@ -23352,17 +23333,29 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23352
23333
  dragConfig: {},
23353
23334
  rowDragConfig: {},
23354
23335
  columnDragConfig: {},
23355
- customConfig: {},
23356
- resizeConfig: {},
23336
+ customConfig: { default: () => ({
23337
+ mode: "modal"
23338
+ }) },
23339
+ resizeConfig: { default: () => ({
23340
+ refreshDelay: 250
23341
+ }) },
23357
23342
  resizableConfig: {},
23358
23343
  seqConfig: {},
23359
- sortConfig: {},
23344
+ sortConfig: { default: () => ({
23345
+ remote: true
23346
+ }) },
23360
23347
  filterConfig: {},
23361
23348
  floatingFilterConfig: {},
23362
- radioConfig: {},
23363
- checkboxConfig: {},
23349
+ radioConfig: { default: () => ({
23350
+ strict: true
23351
+ }) },
23352
+ checkboxConfig: { default: () => ({
23353
+ strict: true
23354
+ }) },
23364
23355
  headerTooltipConfig: {},
23365
- tooltipConfig: {},
23356
+ tooltipConfig: { default: () => ({
23357
+ enterable: true
23358
+ }) },
23366
23359
  footerTooltipConfig: {},
23367
23360
  exportConfig: {},
23368
23361
  importConfig: {},
@@ -23376,8 +23369,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23376
23369
  keyboardConfig: {},
23377
23370
  clipConfig: {},
23378
23371
  editConfig: {},
23379
- validConfig: {},
23372
+ validConfig: { default: () => ({
23373
+ showMessage: true,
23374
+ autoClear: true,
23375
+ autoPos: true,
23376
+ message: "inline",
23377
+ msgMode: "single"
23378
+ }) },
23380
23379
  editRules: {},
23380
+ undoHistoryConfig: {},
23381
23381
  emptyText: {},
23382
23382
  emptyRender: {},
23383
23383
  loadingConfig: {},
@@ -23396,109 +23396,111 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23396
23396
  columnKey: { type: Boolean },
23397
23397
  rowKey: { type: Boolean },
23398
23398
  rowId: {},
23399
- fit: { type: Boolean },
23399
+ fit: { type: Boolean, default: true },
23400
23400
  animat: { type: Boolean },
23401
- delayHover: {},
23402
- onSelection: { type: Function },
23403
- onReady: { type: Function },
23404
- onInitRendered: { type: Function },
23405
- onDataRendered: { type: Function },
23406
- onKeydownStart: { type: Function },
23407
- onKeydown: { type: Function },
23408
- onKeydownEnd: { type: Function },
23409
- onPaste: { type: Function },
23410
- onCopy: { type: Function },
23411
- onCut: { type: Function },
23412
- onContextMenu: { type: Function },
23413
- onColumnsChange: { type: Function },
23414
- onDataChange: { type: Function },
23415
- onFooterDataChange: { type: Function },
23416
- onCurrentRowChange: { type: Function },
23417
- onCurrentRowDisabled: { type: Function },
23418
- onCurrentColumnChange: { type: Function },
23419
- onCurrentColumnDisabled: { type: Function },
23420
- onRadioChange: { type: Function },
23421
- onCheckboxChange: { type: Function },
23422
- onCheckboxAll: { type: Function },
23423
- onCheckboxRangeStart: { type: Function },
23424
- onCheckboxRangeChange: { type: Function },
23425
- onCheckboxRangeEnd: { type: Function },
23426
- onCheckboxRangeSelect: { type: Function },
23427
- onCellClick: { type: Function },
23428
- onCellDblclick: { type: Function },
23429
- onCellMenu: { type: Function },
23430
- onCellMouseenter: { type: Function },
23431
- onCellMouseleave: { type: Function },
23432
- onHeaderCellClick: { type: Function },
23433
- onHeaderCellDblclick: { type: Function },
23434
- onHeaderCellMenu: { type: Function },
23435
- onFooterCellClick: { type: Function },
23436
- onFooterCellDblclick: { type: Function },
23437
- onFooterCellMenu: { type: Function },
23438
- onSortChange: { type: Function },
23439
- onClearSort: { type: Function },
23440
- onClearAllSort: { type: Function },
23441
- onFilterChange: { type: Function },
23442
- onClearFilter: { type: Function },
23443
- onClearAllFilter: { type: Function },
23444
- onFilterVisible: { type: Function },
23445
- onResizableChange: { type: Function },
23446
- onToggleRowGroupExpand: { type: Function },
23447
- onToggleRowExpand: { type: Function },
23448
- onToggleTreeExpand: { type: Function },
23449
- onMenuClick: { type: Function },
23450
- onEditClosed: { type: Function },
23451
- onEditActivated: { type: Function },
23452
- onEditDisabled: { type: Function },
23453
- onValidError: { type: Function },
23454
- onScroll: { type: Function },
23455
- onScrollBoundary: { type: Function },
23456
- onCustom: { type: Function },
23457
- onRowDragstart: { type: Function },
23458
- onRowDragover: { type: Function },
23459
- onRowDragend: { type: Function },
23460
- onRowRemoveDragend: { type: Function },
23461
- onRowInsertDragend: { type: Function },
23462
- onColumnDragstart: { type: Function },
23463
- onColumnDragover: { type: Function },
23464
- onColumnDragend: { type: Function },
23465
- onEnterAppendRow: { type: Function },
23466
- onProxyQuery: { type: Function },
23467
- onProxyDelete: { type: Function },
23468
- onProxySave: { type: Function },
23469
- onPageChange: { type: Function },
23470
- onFormSubmit: { type: Function },
23471
- onFormSubmitInvalid: { type: Function },
23472
- onFormReset: { type: Function },
23473
- onFormCollapse: { type: Function },
23474
- onToolbarButtonClick: { type: Function },
23475
- onToolbarToolClick: { type: Function },
23476
- onZoom: { type: Function },
23477
- onEditActived: { type: Function },
23401
+ delayHover: { default: 250 },
23402
+ onSelection: {},
23403
+ onReady: {},
23404
+ onInitRendered: {},
23405
+ onDataRendered: {},
23406
+ onKeydownStart: {},
23407
+ onKeydown: {},
23408
+ onKeydownEnd: {},
23409
+ onPaste: {},
23410
+ onCopy: {},
23411
+ onCut: {},
23412
+ onContextMenu: {},
23413
+ onColumnsChange: {},
23414
+ onDataChange: {},
23415
+ onFooterDataChange: {},
23416
+ onCurrentRowChange: {},
23417
+ onCurrentRowDisabled: {},
23418
+ onCurrentColumnChange: {},
23419
+ onCurrentColumnDisabled: {},
23420
+ onRadioChange: {},
23421
+ onCheckboxChange: {},
23422
+ onCheckboxAll: {},
23423
+ onCheckboxRangeStart: {},
23424
+ onCheckboxRangeChange: {},
23425
+ onCheckboxRangeEnd: {},
23426
+ onCheckboxRangeSelect: {},
23427
+ onCellClick: {},
23428
+ onCellDblclick: {},
23429
+ onCellMenu: {},
23430
+ onCellMouseenter: {},
23431
+ onCellMouseleave: {},
23432
+ onHeaderCellClick: {},
23433
+ onHeaderCellDblclick: {},
23434
+ onHeaderCellMenu: {},
23435
+ onFooterCellClick: {},
23436
+ onFooterCellDblclick: {},
23437
+ onFooterCellMenu: {},
23438
+ onSortChange: {},
23439
+ onClearSort: {},
23440
+ onClearAllSort: {},
23441
+ onFilterChange: {},
23442
+ onClearFilter: {},
23443
+ onClearAllFilter: {},
23444
+ onFilterVisible: {},
23445
+ onResizableChange: {},
23446
+ onToggleRowGroupExpand: {},
23447
+ onToggleRowExpand: {},
23448
+ onToggleTreeExpand: {},
23449
+ onMenuClick: {},
23450
+ onEditClosed: {},
23451
+ onEditActivated: {},
23452
+ onEditDisabled: {},
23453
+ onValidError: {},
23454
+ onScroll: {},
23455
+ onScrollBoundary: {},
23456
+ onCustom: {},
23457
+ onRowDragstart: {},
23458
+ onRowDragover: {},
23459
+ onRowDragend: {},
23460
+ onRowRemoveDragend: {},
23461
+ onRowInsertDragend: {},
23462
+ onColumnDragstart: {},
23463
+ onColumnDragover: {},
23464
+ onColumnDragend: {},
23465
+ onEnterAppendRow: {},
23466
+ onProxyQuery: {},
23467
+ onProxyDelete: {},
23468
+ onProxySave: {},
23469
+ onPageChange: {},
23470
+ onFormSubmit: {},
23471
+ onFormSubmitInvalid: {},
23472
+ onFormReset: {},
23473
+ onFormCollapse: {},
23474
+ onToolbarButtonClick: {},
23475
+ onToolbarToolClick: {},
23476
+ onZoom: {},
23477
+ onEditActived: {},
23478
23478
  card: { type: Boolean },
23479
23479
  toolbarFixed: { type: Boolean },
23480
23480
  uid: {},
23481
23481
  immediate: { type: Boolean },
23482
- api: { type: Function },
23483
- dynamicApi: { type: Function },
23484
- beforeFetch: { type: Function },
23485
- afterFetch: { type: Function },
23486
- handleSearchInfoFn: { type: Function },
23487
- fetchSetting: {},
23482
+ api: { type: Function, default: void 0 },
23483
+ dynamicApi: {},
23484
+ beforeFetch: {},
23485
+ afterFetch: {},
23486
+ handleSearchInfoFn: {},
23487
+ fetchSetting: { default: () => FETCH_SETTING },
23488
23488
  defSort: {},
23489
23489
  searchInfo: {},
23490
23490
  useSearchForm: { type: Boolean },
23491
23491
  sumFields: {},
23492
23492
  avgFields: {},
23493
23493
  pagination: { type: [Object, Boolean] },
23494
- autoCreateKey: { type: Boolean },
23495
- rKey: { type: [String, Function] },
23494
+ autoCreateKey: { type: Boolean, default: true },
23495
+ rKey: {},
23496
23496
  showTableSetting: { type: Boolean },
23497
23497
  tableSetting: {},
23498
- showIndexColumn: { type: Boolean },
23498
+ showIndexColumn: { type: Boolean, default: true },
23499
23499
  showSelection: { type: Boolean },
23500
- relationForm: { type: Function }
23501
- }, setting),
23500
+ showCheckboxColumn: { type: Boolean },
23501
+ showRadioColumn: { type: Boolean },
23502
+ relationForm: {}
23503
+ },
23502
23504
  emits: ["fetch-success", "fetch-error", "selection-change", "page-change"],
23503
23505
  setup(__props, { expose: __expose, emit: __emit }) {
23504
23506
  const props = __props;
@@ -23512,7 +23514,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23512
23514
  return { ...props, ...unref(innerPropsRef) };
23513
23515
  });
23514
23516
  const wrapRef = ref(null);
23515
- const tableElRef = ref();
23517
+ const tableElRef = ref(null);
23516
23518
  const tableData = ref([]);
23517
23519
  const getWrapperClass = computed(() => {
23518
23520
  return [b(), { [is("card")]: getProps.value.card }, { [is("toolbar-fixed")]: getProps.value.toolbarFixed }];
@@ -23553,6 +23555,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23553
23555
  };
23554
23556
  return propsData;
23555
23557
  });
23558
+ function getInstance() {
23559
+ return tableElRef.value;
23560
+ }
23556
23561
  const tableAction = {
23557
23562
  emit,
23558
23563
  reload,
@@ -23589,7 +23594,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23589
23594
  handleSearchInfoChange,
23590
23595
  handleSearchInfoReload,
23591
23596
  setSelection,
23592
- instance: () => tableElRef.value
23597
+ instance: getInstance
23593
23598
  };
23594
23599
  createTableContext({ ...tableAction, wrapRef, getBindValues });
23595
23600
  __expose(tableAction);